123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- StopAllMusic: MACRO
- ld a, $ff
- call PlaySound
- ENDM
- Ch0 EQU 0
- Ch1 EQU 1
- Ch2 EQU 2
- Ch3 EQU 3
- Ch4 EQU 4
- Ch5 EQU 5
- Ch6 EQU 6
- Ch7 EQU 7
- audio: MACRO
- db (_NARG - 2) << 6 | \2
- dw \1_\2
- IF _NARG > 2
- db \3
- dw \1_\3
- ENDC
- IF _NARG > 3
- db \4
- dw \1_\4
- ENDC
- IF _NARG > 4
- db \5
- dw \1_\5
- ENDC
- ENDM
- ;format: length [0, 7], pitch change [-7, 7]
- pitchenvelope: MACRO
- db $10
- IF \2 > 0
- db (\1 << 4) | \2
- ELSE
- db (\1 << 4) | (%1000 | (\2 * -1))
- ENDC
- ENDM
- ;format: length [0, 15], volume [0, 15], volume change [-7, 7], pitch
- squarenote: MACRO
- db $20 | \1
- IF \3 < 0
- db (\2 << 4) | (%1000 | (\3 * -1))
- ELSE
- db (\2 << 4) | \3
- ENDC
- dw \4
- ENDM
- ;format: length [0, 15], volume [0, 15], volume change [-7, 7], pitch
- noisenote: MACRO
- db $20 | \1
- IF \3 < 0
- db (\2 << 4) | (%1000 | (\3 * -1))
- ELSE
- db (\2 << 4) | \3
- ENDC
- db \4
- ENDM
- ;format: pitch length (in 16ths)
- C_: MACRO
- db $00 | (\1 - 1)
- ENDM
- C#: MACRO
- db $10 | (\1 - 1)
- ENDM
- D_: MACRO
- db $20 | (\1 - 1)
- ENDM
- D#: MACRO
- db $30 | (\1 - 1)
- ENDM
- E_: MACRO
- db $40 | (\1 - 1)
- ENDM
- F_: MACRO
- db $50 | (\1 - 1)
- ENDM
- F#: MACRO
- db $60 | (\1 - 1)
- ENDM
- G_: MACRO
- db $70 | (\1 - 1)
- ENDM
- G#: MACRO
- db $80 | (\1 - 1)
- ENDM
- A_: MACRO
- db $90 | (\1 - 1)
- ENDM
- A#: MACRO
- db $A0 | (\1 - 1)
- ENDM
- B_: MACRO
- db $B0 | (\1 - 1)
- ENDM
- ;format: instrument length (in 16ths)
- snare1: MACRO
- db $B0 | (\1 - 1)
- db $01
- ENDM
- snare2: MACRO
- db $B0 | (\1 - 1)
- db $02
- ENDM
- snare3: MACRO
- db $B0 | (\1 - 1)
- db $03
- ENDM
- snare4: MACRO
- db $B0 | (\1 - 1)
- db $04
- ENDM
- snare5: MACRO
- db $B0 | (\1 - 1)
- db $05
- ENDM
- triangle1: MACRO
- db $B0 | (\1 - 1)
- db $06
- ENDM
- triangle2: MACRO
- db $B0 | (\1 - 1)
- db $07
- ENDM
- snare6: MACRO
- db $B0 | (\1 - 1)
- db $08
- ENDM
- snare7: MACRO
- db $B0 | (\1 - 1)
- db $09
- ENDM
- snare8: MACRO
- db $B0 | (\1 - 1)
- db $0A
- ENDM
- snare9: MACRO
- db $B0 | (\1 - 1)
- db $0B
- ENDM
- cymbal1: MACRO
- db $B0 | (\1 - 1)
- db $0C
- ENDM
- cymbal2: MACRO
- db $B0 | (\1 - 1)
- db $0D
- ENDM
- cymbal3: MACRO
- db $B0 | (\1 - 1)
- db $0E
- ENDM
- mutedsnare1: MACRO
- db $B0 | (\1 - 1)
- db $0F
- ENDM
- triangle3: MACRO
- db $B0 | (\1 - 1)
- db $10
- ENDM
- mutedsnare2: MACRO
- db $B0 | (\1 - 1)
- db $11
- ENDM
- mutedsnare3: MACRO
- db $B0 | (\1 - 1)
- db $12
- ENDM
- mutedsnare4: MACRO
- db $B0 | (\1 - 1)
- db $13
- ENDM
- ;format: rest length (in 16ths)
- rest: MACRO
- db $C0 | (\1 - 1)
- ENDM
- ; format: notetype speed, volume, fade
- notetype: MACRO
- db $D0 | \1
- db (\2 << 4) | \3
- ENDM
- dspeed: MACRO
- db $D0 | \1
- ENDM
- octave: MACRO
- db $E8 - \1
- ENDM
- toggleperfectpitch: MACRO
- db $E8
- ENDM
- ;format: vibrato delay, rate, depth
- vibrato: MACRO
- db $EA
- db \1
- db (\2 << 4) | \3
- ENDM
- pitchbend: MACRO
- db $EB
- db \1
- db \2
- ENDM
- duty: MACRO
- db $EC
- db \1
- ENDM
- tempo: MACRO
- db $ED
- db \1 / $100
- db \1 % $100
- ENDM
- stereopanning: MACRO
- db $EE
- db \1
- ENDM
- volume: MACRO
- db $F0
- db (\1 << 4) | \2
- ENDM
- executemusic: MACRO
- db $F8
- ENDM
- dutycycle: MACRO
- db $FC
- db \1
- ENDM
- ;format: callchannel address
- callchannel: MACRO
- db $FD
- dw \1
- ENDM
- ;format: loopchannel count, address
- loopchannel: MACRO
- db $FE
- db \1
- dw \2
- ENDM
- endchannel: MACRO
- db $FF
- ENDM
|