Hi there, I’ve been writing an Interactive fiction for a few days in Inform 7 and for context i am trying to make a voiceline for spell casting in the style of ‘zork grand inquisitor’ I’m trying to Include
Simple Multimedia Effects for v10 by Mathbrush
OR
Music by Daniel Stelzer
either way if i add
Include Music by Daniel Stelzer
or
Include Simple Multimedia Effects for v10 by Mathbrush
both return with the same problems:
I have manually downloaded
The script builds fine without the addons but obviously sound is not happening without them despite the code being right to trigger and locate the sound files
Check the name of the file in the Extensions section of the IDE. It might differ from what you’re writing. Additionally, make sure that you put a period/full stop after your include code, or it might not work. Lastly, make sure whatever extension you use is compatible with your version of Inform 7, and that you’re downloading the right version.
I don’t believe that “music” has been updated to version 10 of inform yet. Simple Multimedia Effects should work if you download the version of Glulx entry points contained in this thread:
I think the errors you are getting are from the old way of redefining Inform 6 features.
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!)
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.
(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!
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
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”.
"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;
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.