Skip to navigation

Sound: musicData

Name: musicData [Show more] Type: Variable Category: Sound Summary: Data for the game's music
Context: See this variable in context in the source code References: This variable is used as follows: * ProcessMusic uses musicData

Music data is as follows: * If a value is 200 + x, then the sound counter for all the following notes is set to 4 * x, measured in 1/50 second (i.e. calls to the interrupt handler) * Otherwise the value is the pitch of the note to play Each note is played on a separate tone channel, working through channels 1 to 3 in sequence. Setting the sound counter stops ProcessSound from doing anything until the counter runs down. This means that the last three notes are played together, so we can play three-note chords by playing two notes with a counter of zero, followed by a third note with the counter set to the duration of the chord. Setting the counter to zero for the last chord in a piece of music ensures that the last chords plays until it naturally decays according to the sound envelope for sound #3.
.musicData \ Music data offset 0: Hyperspace EQUB 200 + 0 \ Chord 1 = 8, 36, 36 with sound counter 6 * 4 = 24 EQUB 8 EQUB 36 EQUB 200 + 6 EQUB 36 EQUB 200 + 0 \ Chord 2 = 20, 48, 48 with sound counter 6 * 4 = 24 EQUB 20 EQUB 48 EQUB 200 + 6 EQUB 48 EQUB 200 + 0 \ Chord 3 = 28, 56, 56 with sound counter 6 * 4 = 24 EQUB 28 EQUB 56 EQUB 200 + 6 EQUB 56 EQUB 200 + 0 \ Chord 4 = 0, 28, 28 with sound counter 6 * 4 = 24 EQUB 0 EQUB 28 EQUB 200 + 6 EQUB 28 EQUB 200 + 0 \ Chord 5 = 8, 36, 36 with sound counter 0 EQUB 8 EQUB 36 EQUB 36 EQUB &FF \ End of music data \ Music data offset 25: Transfer into a new robot \ \ Note that the transfer music plays the U-turn music as \ its last two chords, as there is no terminator after \ chord 2 below EQUB 200 + 0 \ Chord 1 = 8, 36, 36 with sound counter 6 * 4 = 24 EQUB 8 EQUB 36 EQUB 200 + 6 EQUB 36 EQUB 200 + 0 \ Chord 2 = 20, 48, 48 with sound counter 6 * 4 = 24 EQUB 20 EQUB 48 EQUB 200 + 6 EQUB 48 EQUB 200 + 0 \ Chord 2 = 16, 44, 44 with sound counter 6 * 4 = 24 EQUB 16 EQUB 44 EQUB 200 + 6 EQUB 44 \ Music data offset 25: U-turn EQUB 200 + 0 \ Chord 1 = 0, 28, 28 with sound counter 6 * 4 = 24 EQUB 0 EQUB 28 EQUB 200 + 6 EQUB 28 EQUB 200 + 0 \ Chord 2 = 8, 36, 36 with sound counter 0 EQUB 8 EQUB 36 EQUB 36 EQUB &FF \ End of music data \ Music data offset 50: Game over EQUB 200 + 4 \ Note 1 = 8 with sound counter 4 * 4 = 16 EQUB 8 EQUB 36 \ Note 2 = 36 with sound counter 4 * 4 = 16 EQUB 64 \ Note 3 = 64 with sound counter 4 * 4 = 16 EQUB 68 \ Note 4 = 68 with sound counter 4 * 4 = 16 EQUB 200 + 15 \ Note 5 = 8 with sound counter 15 * 4 = 60 EQUB 84 EQUB 200 + 1 \ Arpeggiated chord of five short notes, each with EQUB 104 \ sound counter 1 * 4 = 4:g EQUB 84 \ EQUB 68 \ 104, 84, 68, 64, 36 EQUB 64 EQUB 36 EQUB 200 + 12 \ Final note = 8 with counter 15 * 4 = 48 EQUB 8 EQUB &FF \ End of music data \ Music data offset 66: Landscape successfully finished EQUB 200 + 1 \ Chord 1 = 8, 36, 36 with sound counter 12 * 4 = 48 and EQUB 8 \ the first two notes each introduced with a counter of EQUB 36 \ 1 * 4 = 4 EQUB 200 + 12 EQUB 36 EQUB 200 + 1 \ Chord 2 = 0, 28, 28 with sound counter 5 * 4 = 20 and EQUB 0 \ the first two notes each introduced with a counter of EQUB 28 \ 1 * 4 = 4 EQUB 200 + 5 EQUB 28 EQUB 200 + 1 \ Chord 3 = 28, 56, 56 with sound counter 6 * 4 = 24 and EQUB 28 \ the first two notes each introduced with a counter of EQUB 56 \ 1 * 4 = 4 EQUB 200 + 6 EQUB 56 EQUB 200 + 1 \ Chord 4 = 20, 48, 48 with sound counter 7 * 4 = 28 and EQUB 20 \ the first two notes each introduced with a counter of EQUB 48 \ 1 * 4 = 4 EQUB 200 + 7 EQUB 48 EQUB 200 + 1 \ Chord 5 = 16, 28, 28 with sound counter 9 * 4 = 36 and EQUB 16 \ the first two notes each introduced with a counter of EQUB 28 \ 1 * 4 = 4 EQUB 200 + 9 EQUB 28 EQUB 200 + 1 \ Chord 6 = 8, 36, 36 with sound counter 1 * 4 = 1 and EQUB 8 \ the first two notes each introduced with a counter of EQUB 36 \ 1 * 4 = 4 EQUB 36 EQUB &FF \ End of music data