Some games, from Version 3 onward, have sound effects attached. These are not stored in the story files (or the Z-machine) itself, and the interpreter is simply expected to know where to find them. Other games have only one sound effect, usable in a much more restricted way: a beep or bell sound, which we shall call a "bleep".
9.1.1
In Version 6, the interpreter should set bit 5 of 'Flags 1' if it can provide sound effects beyond a bleep.
9.1.2
In Version 5 and later, a game should have bit 7 of 'Flags 2' set in its story file if it wants to use sound effects beyond a bleep. The interpreter should then clear this bit if it cannot oblige.
Several Infocom games bleep (using sound_effect with only one operand, always equal to 1 or 2). Two provided sampled sound effects but did not bleep: 'The Lurking Horror' and 'Sherlock'. Their story files contain the following usages of sound_effect:
sound_effect number 2 volume (in TLH) sound_effect number 2 volume/repeats function (in Sherlock) sound_effect 0 3 sound_effect number 3 sound_effect 0 4except that, probably due to a bug in its own code, 'TLH' can also generate
sound_effect 4 8 sound_effect 4095 2 15A further difficulty with 'TLH' is that it assumes the interpreter is as slow as Infocom's Amiga interpreter was: it fires off several sound effects in one game round, assuming there will be time for it to play most of each one. To simulate this, sound_effect must be rewritten to pause sometimes:
if a new sound effect is begun while there is still one playing which was started since the last keyboard input, then wait until that earlier one finishes one cycle before replacing it with the new sound effect.
Infocom's MS-DOS interpreters for V4 to V6 set bit 5 of 'Flags 1' in all circumstances (i.e., whether or not sound effects are available). This would be incorrect behaviour for a standard interpreter.
Infocom implemented sound effects differently on different machines. The format of Infocom's shipped sound effects files has been documented by Stefan Jokisch and his notes are available from ftp.gmd.de. See also Andrew Plotkin's draft Blorb format for a more modern way to make sound effects available to newer games.
Section 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 / 16
Appendix A / B / C / D / E / F