I had a quick look. The problem with the “Fatal Error” message seems related to changes to Glulx Entry Points, which may have introduced a bug. However, that’s not really relevant, since that is related to issues with printing out text while waiting for input, and the code only printed out text in order to allow us to test that the notification worked. I will have a look at that, but that’s not the main point here.
The following code will play two sounds, one after the other. It won’t work properly on Gargoyle, though. Personally, I would not try to hack this with timer events: I would just note that Gargoyle has a bug that needs fixing. Timer events are going to be a lot less reliable in use than sound notifications, as timer events aren’t guaranteed to give you accurate timings: they just give you the chance to run something at roughly some point in the future. Trying to write games that work around interpreter bugs is usually a futile exercise - if the interpreters aren’t being updated then eventually they will be useless.
This only uses one little bit of Inform 6, needed to play the sound file with the appropriate flags to trigger a notification event. If you wanted more elaborate patterns of sounds playing then the Glk input handling rule would need to be more complicated, and possibly use the values in the notification event, but that’s not what was asked for If needed I can produce a more elaborate example.
[code]“Sound Experiment” by David Kinder
Include Glulx Entry Points by Emily Short.
Use direct event handling.
The Sound Stage is a room. “Enter ‘chime’ to play two chimes.”
Sound of Chiming One is the file “Chime1.aiff”.
Sound of Chiming Two is the file “Chime2.aiff”.
Playing chimes is an action applying to nothing. Carry out playing chimes:
play Sound of Chiming One with notification;
say “The chimes have started playing.”
Understand “chime” as playing chimes.
Glulx input handling rule for an independent of the player g-event:
if the current glk event is a sound-notify-event:
play Sound of Chiming Two.
To play (SFX - sound name) with notification:
(- glk_schannel_play_ext(gg_foregroundchan,ResourceIDsOfSounds–>{SFX},1,1); -).
[/code]