SugarCube is a kickass story format for Twine with tons of cool features, including save slots and the ability to save your game on your disk. I'm using SugarCube for (do not) forget, the game I'm trying to finish.
It's a game with a lot of pictures, and also some music. Something a bit like dubstep, with more dub than step, ambient drones, and binaural beats and stuff like that.
I was already familiar with L's sound macros, which gives a good control on sounds and music in Twine, but, of course, while it works fine with Sugarcane, it doesn't with SugarCube.
This is because the storeArea div is called store-area in SugarCube. So all you need to do is to change a line as follows.
Line 86, change this:
var div = document.getElementById("storeArea").firstChild;
var div = document.getElementById("store-area").firstChild;
I've declared my sound files in the StoryInit passage with the set method, and it works fine. Note your sounds don't need to be in the same folder than your html file. You can specify a folder to store your sounds, like this. Do not forget the "<<" and ">>" after and before:
set $noise = "sounds/noise.mp3"
then call them from any passage, like that: