------------------ AUDIO INSTRUCTIONS ------------------ ///00-B5/// Plays a note, rest, or tie at a given pitch and beat OPCODE / 14 = beat (see list below) OPCODE % 14 = pitch, rest, or tie (see list below) BEAT DURATIONS {ROM $042304-$042310} * 224 ticks () * 220 ticks () * 216 ticks () 0 = 192 ticks (whole note) 1 = 144 ticks (half note, dotted) * 120 ticks () * 110 ticks () 2 = 96 ticks (half note) * 80 ticks (quarter note, double-dotted) 3 = 72 ticks (quarter note, dotted) * 64 ticks (half note triplet, x3 = one whole note) 4 = 48 ticks (quarter note) 5 = 36 ticks (8th note dotted) 6 = 32 ticks (quarter note triplet, x3 = one half note) * 26 ticks () 7 = 24 ticks (8th note) * 18 ticks (16th note dotted) 8 = 16 ticks (8th note triplet, x3 = one quarter note) 9 = 12 ticks (16th note) * 9 ticks (32nd note dotted) 10 = 8 ticks (16th note triplet, x3 = one 8th note) 11 = 6 ticks (32nd note) * 4 ticks (32nd note triplet, x3 = one 16th note) 12 = 3 ticks (64th note) * 2 ticks (64th note triplet, x3 = one 32nd note) * 1 tick (128th note triplet, x3 = one 64th note) 13 (see B6-C3) *not in ROM, must use B6-C3 to set these beat lengths PITCHES 0 ;A 1 ;A# 2 ;B 3 ;C 4 ;C# 5 ;D 6 ;D# 7 ;E 8 ;F 9 ;F# 10 ;G 11 ;G# 12 ;rest 13 ;tie ///B6-C3/// Same as 00-C2, but contains 1 parameter with a user-defined duration B6-C3 xx ;Duration = xx ///C4-FF/// C4 ;Octave up 1 C5 ;Octave down 1 C6 xx ;Octave = xx C7 ;Slur next note C8 xx ;Noise on, channel 0-7 = xx bits 0-7 C9 ;Noise on, all channels CA ;Noise off CB ;Frequency mode on CC ;Frequency mode off CD xx ;Play sound effect = xx CE xx ;Play embedded sound effect = xx CF xx ;Transpose 1/16 half steps = (+/-)xx D0 ;Terminate script D1 xx ;Beat duration = xx *higher values = slower* ;10000 / xx = tempo in beats per minute D2 xx ;Audio memory $69 = xx, read by event command FD 96 and FD 97 ///D3 xx ;UNKNOWN *NEVER USED* D4 xx ;Repeat begin, count = xx D5 ;Repeat end (reset octave) D6 ;Repeat begin first ending D7 ;Repeat infinitely, end repeat @ $D1 D8 ;ADSR reset D9 xx ;ADSR attack = xx DA xx ;ADSR decay = xx DB xx ;ADSR sustain = xx DC xx ;ADSR release = xx DD xx ;Sample length = xx (max 15) DE xx ;Sample = xx DF xy ;Noise transpose, pitch = y *0-15 raises, 31-16 lowers*, VOXCON = x E0 xx ;Sample fadeout = xx, max 31 ///E1 xx ;UNKNOWN *NEVER USED* E2 xx ;Volume = xx E3 xx ;Volume shift, amount = (+/-)xx E4 xx yy ;Volume slide, length = xx, volume = (+/-)yy *affects next note* E5 xx yy ;Portamento, length = xx, pitch = (+/-)yy *affects next note* E6 ;Portamento looping *must follow $E5* E7 xx ;Speaker balance = xx E8 xx yy ;Pansweep duration = xx, end balance = yy E9 xx yy ;Pansweep loop duration = xx, reach = yy ///EA ;UNKNOWN *NEVER USED, seems to raise one octave* ///EB ;UNKNOWN *NEVER USED, seems to raise one octave* EC xx ;Transpose 1/4 pitch, from 0 = (+/-)xx *0 is reset* ED xx ;Transpose 1/4 pitch = (+/-)xx EE ;Percussion mode on EF ;Percussion mode off F0 xx yy ;Tremolo, amplitude = xx, wavelength = yy F1 xx yy zz ;Vibrato, amplitude = xx, wavelength = yy, delay = zz F2 xx ;Beat duration change = (+/-)xx *triggered by event command $97* F3 ;Vibrato off F4 xx yy ;Growling, roughness = xx, wavelength = yy ///F5 ;UNKNOWN *NEVER USED* F6 xx ;Portamento on, length = xx F7 ;Growling off F8 ;Dizzy effect on F9 ;Dizzy effect off FA ;Reverb on FB ;Reverb off FC xx yy zz ;Reverb, delay time = xx, decay ratio : 128 = yy, echo volume = zz ///FD ;UNKNOWN *NEVER USED* ///FE ;UNKNOWN *NEVER USED* ///FF ;UNKNOWN *NEVER USED* 4/4 = 192 ticks 13/8 = 312 ticks