|
1 |
| - .macro voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release |
| 1 | + .macro voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req |
2 | 2 | .byte 0
|
3 | 3 | _voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
4 | 4 | .endm
|
5 | 5 |
|
6 |
| - .macro voice_directsound_no_resample base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release |
| 6 | + .macro voice_directsound_no_resample base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req |
7 | 7 | .byte 8
|
8 | 8 | _voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
9 | 9 | .endm
|
10 | 10 |
|
11 |
| - .macro voice_directsound_alt base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release |
| 11 | + .macro voice_directsound_alt base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req |
12 | 12 | .byte 16
|
13 | 13 | _voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
|
14 | 14 | .endm
|
15 | 15 |
|
16 |
| - .macro _voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release |
| 16 | + .macro _voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req |
17 | 17 | .byte \base_midi_key
|
18 | 18 | .byte 0
|
19 | 19 | .if \pan != 0
|
|
28 | 28 | .byte \release
|
29 | 29 | .endm
|
30 | 30 |
|
31 |
| - .macro voice_square_1 sweep, duty_cycle, attack, decay, sustain, release |
32 |
| - _voice_square_1 1, \sweep, \duty_cycle, \attack, \decay, \sustain, \release |
| 31 | + .macro voice_square_1 base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 32 | + _voice_square_1 1, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release |
33 | 33 | .endm
|
34 | 34 |
|
35 |
| - .macro voice_square_1_alt sweep, duty_cycle, attack, decay, sustain, release |
36 |
| - _voice_square_1 9, \sweep, \duty_cycle, \attack, \decay, \sustain, \release |
| 35 | + .macro voice_square_1_alt base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 36 | + _voice_square_1 9, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release |
37 | 37 | .endm
|
38 | 38 |
|
39 |
| - .macro _voice_square_1 type, sweep, duty_cycle, attack, decay, sustain, release |
40 |
| - .byte \type, 60, 0 |
| 39 | + .macro _voice_square_1 type:req, base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 40 | + .byte \type |
| 41 | + .byte \base_midi_key |
| 42 | + .if \pan != 0 |
| 43 | + .byte (0x80 | \pan) |
| 44 | + .else |
| 45 | + .byte 0 |
| 46 | + .endif |
41 | 47 | .byte \sweep
|
42 | 48 | .byte (\duty_cycle & 0x3)
|
43 | 49 | .byte 0, 0, 0
|
|
47 | 53 | .byte (\release & 0x7)
|
48 | 54 | .endm
|
49 | 55 |
|
50 |
| - .macro voice_square_2 duty_cycle, attack, decay, sustain, release |
51 |
| - _voice_square_2 2, \duty_cycle, \attack, \decay, \sustain, \release |
| 56 | + .macro voice_square_2 base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 57 | + _voice_square_2 2, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release |
52 | 58 | .endm
|
53 | 59 |
|
54 |
| - .macro voice_square_2_alt duty_cycle, attack, decay, sustain, release |
55 |
| - _voice_square_2 10, \duty_cycle, \attack, \decay, \sustain, \release |
| 60 | + .macro voice_square_2_alt base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 61 | + _voice_square_2 10, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release |
56 | 62 | .endm
|
57 | 63 |
|
58 |
| - .macro _voice_square_2 type, duty_cycle, attack, decay, sustain, release |
59 |
| - .byte \type, 60, 0, 0 |
| 64 | + .macro _voice_square_2 type:req, base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req |
| 65 | + .byte \type |
| 66 | + .byte \base_midi_key |
| 67 | + .if \pan != 0 |
| 68 | + .byte (0x80 | \pan) |
| 69 | + .else |
| 70 | + .byte 0 |
| 71 | + .endif |
| 72 | + .byte 0 |
60 | 73 | .byte (\duty_cycle & 0x3)
|
61 | 74 | .byte 0, 0, 0
|
62 | 75 | .byte (\attack & 0x7)
|
|
65 | 78 | .byte (\release & 0x7)
|
66 | 79 | .endm
|
67 | 80 |
|
68 |
| - .macro voice_programmable_wave wave_samples_pointer, attack, decay, sustain, release |
69 |
| - _voice_programmable_wave 3, \wave_samples_pointer, \attack, \decay, \sustain, \release |
| 81 | + .macro voice_programmable_wave base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req |
| 82 | + _voice_programmable_wave 3, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release |
70 | 83 | .endm
|
71 | 84 |
|
72 |
| - .macro voice_programmable_wave_alt wave_samples_pointer, attack, decay, sustain, release |
73 |
| - _voice_programmable_wave 11, \wave_samples_pointer, \attack, \decay, \sustain, \release |
| 85 | + .macro voice_programmable_wave_alt base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req |
| 86 | + _voice_programmable_wave 11, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release |
74 | 87 | .endm
|
75 | 88 |
|
76 |
| - .macro _voice_programmable_wave type, wave_samples_pointer, attack, decay, sustain, release |
77 |
| - .byte \type, 60, 0, 0 |
| 89 | + .macro _voice_programmable_wave type:req, base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req |
| 90 | + .byte \type |
| 91 | + .byte \base_midi_key |
| 92 | + .if \pan != 0 |
| 93 | + .byte (0x80 | \pan) |
| 94 | + .else |
| 95 | + .byte 0 |
| 96 | + .endif |
| 97 | + .byte 0 |
78 | 98 | .4byte \wave_samples_pointer
|
79 | 99 | .byte (\attack & 0x7)
|
80 | 100 | .byte (\decay & 0x7)
|
81 | 101 | .byte (\sustain & 0xF)
|
82 | 102 | .byte (\release & 0x7)
|
83 | 103 | .endm
|
84 | 104 |
|
85 |
| - .macro voice_noise period, attack, decay, sustain, release |
86 |
| - _voice_noise 4, \period, \attack, \decay, \sustain, \release |
| 105 | + .macro voice_noise base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req |
| 106 | + _voice_noise 4, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release |
87 | 107 | .endm
|
88 | 108 |
|
89 |
| - .macro voice_noise_alt period, attack, decay, sustain, release |
90 |
| - _voice_noise 12, \period, \attack, \decay, \sustain, \release |
| 109 | + .macro voice_noise_alt base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req |
| 110 | + _voice_noise 12, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release |
91 | 111 | .endm
|
92 | 112 |
|
93 |
| - .macro _voice_noise type, period, attack, decay, sustain, release |
94 |
| - .byte \type, 60, 0, 0 |
| 113 | + .macro _voice_noise type:req, base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req |
| 114 | + .byte \type |
| 115 | + .byte \base_midi_key |
| 116 | + .if \pan != 0 |
| 117 | + .byte (0x80 | \pan) |
| 118 | + .else |
| 119 | + .byte 0 |
| 120 | + .endif |
| 121 | + .byte 0 |
95 | 122 | .byte (\period & 0x1)
|
96 | 123 | .byte 0, 0, 0
|
97 | 124 | .byte (\attack & 0x7)
|
|
100 | 127 | .byte (\release & 0x7)
|
101 | 128 | .endm
|
102 | 129 |
|
103 |
| - .macro voice_keysplit voice_group_pointer, keysplit_table_pointer |
| 130 | + .macro voice_keysplit voice_group_pointer:req, keysplit_table_pointer:req |
104 | 131 | .byte 0x40, 0, 0, 0
|
105 | 132 | .4byte \voice_group_pointer
|
106 | 133 | .4byte \keysplit_table_pointer
|
107 | 134 | .endm
|
108 | 135 |
|
109 |
| - .macro voice_keysplit_all voice_group_pointer |
| 136 | + .macro voice_keysplit_all voice_group_pointer:req |
110 | 137 | .byte 0x80, 0, 0, 0
|
111 | 138 | .4byte \voice_group_pointer
|
112 | 139 | .4byte 0
|
113 | 140 | .endm
|
114 | 141 |
|
115 |
| - .macro cry sample |
| 142 | + .macro cry sample:req |
116 | 143 | .byte 0x20, 60, 0, 0
|
117 | 144 | .4byte \sample
|
118 | 145 | .byte 0xff, 0, 0xff, 0
|
119 | 146 | .endm
|
120 | 147 |
|
121 |
| - .macro cry2 sample |
| 148 | + .macro cry2 sample:req |
122 | 149 | .byte 0x30, 60, 0, 0
|
123 | 150 | .4byte \sample
|
124 | 151 | .byte 0xff, 0, 0xff, 0
|
|
0 commit comments