Hi Aviram,
Welcome here. Music would a nice addition, but as far as I now, and this is a question for you @adventuron, we can only play sound through the beep command right?
You can play music and sound effects in mp3 files. There's a guide in the Adventuron Cookbook. I'm pretty sure you won't be able to use this if you plan on doing the 8-bit export to DAAD, but you can probably do the Spectrum-style beeps. Adventuron will be able to confirm this.
Adventuron supports sound / music and sfx playback (in different channels).
The Opposite Edge of Slumber used these commands in the previous jam.
These features are NOT 8-bit export compatible.
You can also use relative paths for referencing your sound effects, but you would need to compile your game to the folder containing (or parent folder of a subfolder containing) the mp3 files to test them out (or use http or https) during development.
I haven't documented all the sound commands in the cookbook (yet). I'll do it tomorrow. But the six commands you should be using are
So far, there is only one channel per sound category so playing a different music will stop the previous music.
start_at = river locations {
river : location "You are in the river.\n" ;
} on_tick {
: if (is_just_entered () ) {
: if (is_at "river") {
: play_music sound="song_river";
}
: else {
: stop_music;
}
}
} assets {
sounds {
// NOTE :: Make sure that only reference content you are
// licensed to use. // ALSO :: You can use relative paths here, but you can only
// test in compiled versions of your code (not the
// web editor)
song_river : sound_sample "https://somedomainid.com/sounds/river.mp3" ;
}
}