.soundData EQUB &10, &00 \ Sound data block #0: SOUND &10, 1, 7, 5 EQUB &01, &00 \ EQUB &07, &00 \ Used for the first part of sounds #0 (rotating enemy), EQUB &05, &00 \ #1 (rotating meanie) and #6 (game over) EQUB &11, &00 \ Sound data block #1: SOUND &11, 0, 120, 10 EQUB &00, &00 \ EQUB &78, &00 \ Used for the second part of sounds #0 (rotating EQUB &0A, &00 \ enemy), #1 (rotating meanie) and #6 (game over) EQUB &12, &00 \ Sound data block #2: SOUND &12, 3, 34, 20 EQUB &03, &00 \ EQUB &22, &00 \ Used for sounds #3 (music) and #4 (scanner) EQUB &14, &00 EQUB &13, &00 \ Sound data block #3: SOUND &13, 4, 144, 20 EQUB &04, &00 \ EQUB &90, &00 \ Used for sound #5 (ping) EQUB &14, &00 EQUB &10, &00 \ Sound data block #4: SOUND &10, 2, 4, 40 EQUB &02, &00 \ EQUB &04, &00 \ Used for sound #2 (create/absorb object white noise) EQUB &28, &00Name: soundData [Show more] Type: Variable Category: Sound Summary: OSWORD blocks for making the various game soundsContext: See this variable in context in the source code References: This variable is used as follows: * GetPlayerDrain uses soundData * MakeSound uses soundData * MakeSoundEnvelope uses soundData * ProcessActionKeys (Part 2 of 2) uses soundData * ProcessMusic uses soundData * ProcessSound uses soundData
Sound data. To make a sound, the MakeSound routine passes the bytes in this table to OSWORD 7. These bytes are the OSWORD equivalents of the parameters passed to the SOUND keyword in BASIC. The parameters have these meanings: channel/flush, amplitude (or envelope number if 1-4), pitch, duration where each value consists of two bytes, with the low byte first and the high byte second. For the channel/flush parameter, the top nibble of the low byte is the flush control (where a flush control of 0 queues the sound, and a flush control of 1 makes the sound instantly), while the bottom nibble of the low byte is the channel number. When written in hexadecimal, the first figure gives the flush control, while the second is the channel (so &13 indicates flush control = 1 and channel = 3).