Skip to main content

Sound effects

The engine in ten minutes · Play a sound · AdLib sounds (ADL) · Speaker and Tandy sounds (SND) · Sound and music

In brief​

The game names its sounds by number, from 0 to 119. A number is not a sound in itself: it selects an entry of the sound-effect table of the sound file loaded with the current level, which tells the sound driver what to play. This page lists which events of the game play which number. Level scripts play their own numbers with SCRIPT_PLAY_SOUND; their uses are described on the level pages.

A sound is played in one of two ways:1

  • at once, as the event happens;
  • from a block, as an environmental sound: the game keeps it waiting, with a level that falls with the block's distance from the party, and plays it at the next environmental request or at the end of the pass of the game loop; a block 16 or more blocks away plays nothing. Only these sounds carry a volume, and only the AdLib driver uses it.

Nothing is played while the "Sounds" option is off or no sound driver is set. Sound 0 is used to silence the sound in progress: the game plays it when a level is loaded, when the dialogue screen opens, and in the introduction and the ending.

The sounds of the game​

Positions of blocks are written as in the rest of the documentation; the sound numbers are decimal.

Party and items​

EventSoundHow
The party bumps into something it cannot enter ("You can't go that way")29At once2
A character eats9At once3
A character drinks a potion10At once; a potion of speed also plays 1004
A horn is blown64 to 67, by its value 1 to 4At once5
A character throws a weapon11At once6
A bow fires, or an item is launched as an arrow26At once; any other launcher or launched item plays 117
A melee attack ends with a result of 032At once8
A flying item lands18From its block9
A character gains a level23At once10
A character is hurt21At once11
A character dies22At once11

Magic​

EventSoundHow
A spell startsThe spell's own soundAt once12
A spell warning: a spell that cannot be cast, Aid on a character who already has it79At once13
An explosion35At once with the explosion picture; from the party's block, with no picture, while the party rests, at the outer visible positions, or beside the centre column when the object flies across the view; nothing when the block is out of sight14
Turn undead95At once15

Monsters​

EventSoundHow
A monster steps into a new blockThe step sound of its type (sound_2 of the INF monster type)From the new block, except while the party rests16
A monster attacks in meleeThe attack sound of its type (sound_1)From the party's block, once per attack17
A monster casts a spellThe spell's own soundFrom the monster's block18
A monster uses its mind blast103From the monster's block19
The final opponent of level 16 changes form56At once, with the DRANX pictures20

Doors and walls​

EventSoundHow
A door opens by one step3From the party's block, at any distance21
A door closes by one step4From the party's block, at any distance; 5 when it reaches its closed state21
A door switch is used6At once22

Dungeon and levels​

EventSoundHow
Ambient sound, every 18 × (1d10 + 3) ticks27 or 28From the party's block index plus 0 to 1123
A level or sublevel is loaded0At once24

Screens and sequences​

EventSoundHow
The party creation screen opens0, then 13, its musicAt once25
A button of the creation screens is pressed76, not heardAt once25
The party is complete and the game starts15At once25
The dialogue screen opens, closes0, 2At once26
The conversation with Insal, Calandra, Shorn starts57, 53, 55At once; when Calandra is answered "talk", 0, then 91 three ticks later, before the recruitment dialogue27
The portal animation33 and 19, then 24 or 86 and 31 or 90 as the frames goAt once28
The dream that can replace a rest on level 354At once29
The defeat scene56At once30

The introduction and the ending play their own numbers from their own sound files; their pages list them.

Anomaly

ANOMALY-158 — The buttons of the party creation screens ask for sound 76, which the sound file loaded at that moment does not hold: its entry is empty in both INTRO.ADL and INTRO.SND, so pressing a button is silent with every driver. A faithful reimplementation plays nothing.25

Sources​

Locations refer to the game executable reference. The call sites were found by searching the executable and its overlays for every call of the sound routines.

Footnotes​

  1. Play a sound effect, the environmental sound and the option settings. ↩

  2. Refuse a step. ↩

  3. Eat the item in hand. ↩

  4. Drink a potion. ↩

  5. Blow a horn and the horn sounds. ↩

  6. Throw a weapon. ↩

  7. Launch an item and use a launcher, which test for ITEM_TYPE_BOW. ↩

  8. Use a weapon slot. ↩

  9. End a flight. ↩

  10. Gain a level. ↩

  11. Damage characters. ↩ ↩2

  12. Start a spell. ↩

  13. Spell messages and the magic object hit. ↩

  14. The explosion routine described with the explosion animations, the visible blocks and the resting flag. ↩

  15. Turn undead. ↩

  16. Check a candidate move. ↩

  17. Close-range action. ↩

  18. Monster spell. ↩

  19. Ranged action. ↩

  20. The DRANX sequence. ↩

  21. Advance door operations and the door and wall step. ↩ ↩2

  22. Operate a door switch. ↩

  23. The game loop. ↩

  24. Select a sublevel. ↩

  25. The party creation screen, read the input and press a button. ↩ ↩2 ↩3 ↩4

  26. The dialogue screen and its restore. ↩

  27. The non-player character dialogues. ↩

  28. The portal animation. ↩

  29. The dream sequence. ↩

  30. The defeat scene. ↩