===== Music Commands =====
==== Overview ====
These commands are used in the [[ff3:ff3us:doc:asm:list:music |music tracks]]
==== Notes ====
1/1 1/2 1/3 3/8 1/4 1/6 3/16 1/8 1/12 1/16 1/24 1/32 1/48 1/64
------------------------------------------------------------------------
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D | C
0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B | C#
1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 | D
2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 | D#
38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 | E
46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 | F
54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 | F#
62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F | G
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D | G#
7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B | A
8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 | A#
9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 | B
A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 | Tie
B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 | Rest
Common names and ticks for note lengths: ($17D1)
----------------------------------------
1/1 $0: Whole Note C0
1/2 $1: Half Note 60
1/3 $2: Half Note Triplet 40
3/8 $3: Dotted Quarter Note 48
1/4 $4: Quarter Note 30
1/6 $5: Quarter Note Triplet 20
3/16 $6: Dotted Eighth Note 24
1/8 $7: Eighth Note 18
1/12 $8: Triplet 10
1/16 $9: Sixteenth Note 0C
1/24 $A: Sixteenth Note Triplet 08
1/32 $B: Thirty-second Note 06
1/48 $C: Thirty-second Note Tripet 04
1/64 $D: Sixty-fourth Note 03
==== Track Commands ====
C4: xx $11D3 Set Voice Volume to xx (00-7F)
C5: xx yy $11E4 Set Voice Volume w/ Envelope (yy: volume, xx: envelope duration)
C6: xx $1236 Set Voice Pan to (xx: 01 = Left, 40 = Center, 7F = Right, top bit inactive)
C7: xx yy $1246 Set Voice Pan w/ Envelope (yy: 01 = Left, 40 = Center, 7F = Right, top bit inactive, xx = envelope duration)
C8: xx yy $1266 Change Pitch w/ Envelope (xx: envelope duration, yy: change in pitch, signed)
C9: xx yy zz $12E3 Enable Vibrato (xx: delay in ticks, yy: cycle duration, ??zzzzzz: amplitude, max 1/4 step)
CA: $138C Disable Vibrato
CB: xx yy zz $1396 Enable Tremolo (xx: delay in ticks, yy: cycle duration, ??zzzzzz: amplitude, max 50%)
CC: $13EA Disable Tremolo
CD: xx yy $13F4 Enable Pansweep (xx: delay in ticks, yy: cycle duration)
CE: $144A Disable Pansweep
CF: xx $14CB Set Noise Clock (00-1F)
D0: $148D Enable Noise
D1: $14BB Disable Noise
D2: $14D9 Enable Pitch Modulation
D3: $14F2 Disable Pitch Modulation
D4: $1464 Enable Echo
D5: $147D Disable Echo
D6: xx $1460 Set Octave to xx
D7: $1456 Increment Octave
D8: $145C Decrement Octave
D9: xx $1275 Set Transpose
DA: xx $1271 Add to Transpose
DB: xx $174E Set Detune
DC: xx $1502 Set Instrument
DD: xx $1538 Set ADSR Attack Value (0-15)
DE: xx $1568 Set ADSR Decay Value (0-7)
DF: xx $157B Set ADSR Sustain Value (0-7)
E0: xx $158D Set ADSR Release Value (0-31)
E1: $159D Reset ADSR Default Values
E2: xx $16C0 Loop Start (loop xx+1 times)
E3: $16F0 Loop End
E4: $15B4 Enable Slur (key on at beginning of first note only, no key off at end of note unless the next note is a rest)
E5: $0FD3 Disable Slur
E6: $15DE Enable Drum Roll (no key off at end of note unless the next note is a rest)
E7: $0FD3 Disable Drum Roll
E8: xx $174B Add to Note Duration (xx = duration in ticks)
E9: xx $1602 Play Game Sound Effect (voice A)
EA: xx $1606 Play Game Sound Effect (voice B)
EB: $1770 End of Script
EC: $1770 End of Script
ED: $1770 End of Script
EE: $1770 End of Script
EF: $1770 End of Script
==== Master Commands ====
F0: xx $11AF Set Tempo
F1: xx yy $11B8 Set Tempo w/ Envelope
F2: xx $1205 Set Song Echo Volume
F3: xx yy $1212 Set Song Echo Volume w/ Envelope
F4: xx $11D0 Set Song Volume
F5: xx yyyy $1665 Jump to yyyy When Loop Count Reaches xx
F6: xxxx $164A Jump to xxxx
F7: xx yy $1279 Set Echo Feedback to yy over xx frames
F8: xx yy $129B Set Filter ------yy
F9: $1752 Increment Output Code
FA: $1755 Clear Output Code
FB: $15B0 Ignore Song Volume
FC: xxxx $1759 Conditional Jump to xxxx
FD: $1770 End of Script
FE: $1770 End of Script
FF: $1770 End of Script