Thanks so much for your repllies!
It built correctly after adding the ends here line to the new script!
back to happily creating!
(havent tested the sounds yet!! too excited that it built! lol!)
just to clarify
in the beginning of the script i put
include Simple Multimedia Effects for v10 by Mathbrush.
When play begins:
upload-audio "RAMLIG" with internal name sound of ramligcast;
early in the script i set up the path
Sound of ramligcast is the file "RAMLIG.ogg".
The .ogg is in Materials/Sounds
in my (if) condition script i put
play the sound of ramligcast;
and play the game in a sound supporting interpreter ?
That should work. If it doesn’t then let us know!
It should compile fine for offline interpreters but will only work online with the Bisquixe interpreter. There is a way to get it to work with just quixe by manually editing the html if that’s something you prefer.
I honestly have no idea what I’m doing in order to run it with Bisquixe! haha! advice would be appreciated! thanks so much
(p.s day 4 of using Inform here! but I am picking up how to construct a game very quick its mostly everything outside like interpreters and extensions tripping me up!!)
A new interpreter is just like a new extension, but instead of the extensions folder you put it on the templates folder.
You can download it at the first link in this post:
The one annoying thing is that you have to put your sound files in twice. Once as .ogg files in the sounds folder in Materials (just like the inform book describes) and once as mp3s in an identical folder called sounds in the Release folder. It’s because the offline interpreters don’t use mp3s and Safari only uses mp3s. Sorry about that!
you’re a genius friend! all working!
Hi again!! I was just wondering if your multiple sounds addon allows seamless looping of music before certain conditions decide it otherwise
i didn’t plan on it when writing this post but it certainly adds a layer of depth
It does allow looping and you can pause and play sounds at any time.
However some browsers (I think safari) playing music on loop introduces a small pause between the end and the beginning. This is a problem with mp3s and the safari mobile browser in general
would you be so kind as to give me a quick example of how to cause a looping sound
more specifically (sorry i cant find any documentation on the sound looping) how to add a background loop to a specified room
You’ll need pieces of a sound extension like Daniel Stelzer’s Music. The extension as a whole doesn’t work right now in Inform 10 (I think you should try it just in case), but adapting parts of it should work. I will try to work up a sample game that does what you ask and then I’ll send it to you. My strategy will be to copy the “play on loop” part of his code as well as all the other code it depends on.
You can do this all directly with glulx op codes but those are hard to read and meant to be “behind the scenes”.
appreciate the help ive had a go but can’t quite figure it out
Here is a working example:
"SoundTest" by Mathbrush
Include Simple Multimedia Effects for v10 by Mathbrush.
Include Music by Daniel Stelzer.
Sound of Background Music is the file "Strings-of-Sadness.ogg".
When play begins:
upload-audio "Strings-of-Sadness" with internal name sound of Background Music;
Room A is a room.
Room B is north of room A.
After going to Room B:
loop sound of Background Music;
continue the action;
Every turn:
if the player is not in Room B:
stop Sound of Background Music;
For this I used Eric Matyas sound files.
Turns out Daniel Stelzer’s Music works just fine! I got it here:
https://apricot.com/~zed/i7friends/
If I remember correctly now, it’s only the fade-in/fade-out that doesn’t work with my current extension and needs to be updated. But fade-in/fade-out doesn’t work anyway on mobile safari because Apple doesn’t allow volume control by anyone but the end user.
Edit: Okay, it’s actually having trouble when releasing to a website, so I’ll keep checking on this. Works offline for now.
Editedit: Nevermind, it works great! I was just on my work computer and was using an old version of Bisquixe that didn’t have sound enabled. Once I downloaded the newest version it worked great.
Awesome!! I’ll work through it using your example and let you know when I succeed / encounter anything i didn’t manage
Perfection!!
my only issue now is some of (and for some reason not all) of the sound effects i included in actions yesterday are now not playing but im sure thats just me making some sort of silly error perhaps
for example at this point there is supposed to be a noise for picking up the scroll but it has stopped playing as of including music by daniel stelzer
where as this function still plays the sound
((they use the exact same method to play the sound))
upload-audio "SCROLL" with internal name sound of takescroll;
upload-audio "RAMLIG" with internal name sound of ramligcast;
Sound of takescroll is the file "SCROLL.ogg".
Sound of ramligcast is the file "RAMLIG.ogg".
in the non functioning if condition:
play the sound of takescroll on foreground;
in the functioning if condition:
play the sound of ramligcast on foreground;
Are you playing the music on a different channel than foreground? Just want to check before trying other things.
my background music plays on the background and allows me to hear the casting of RAMLIG over the top when playing in the foreground
but for some reason a few other sound effects wont play