31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 #define PERIOD 80_000_000 / 40_000
50 #endif // DOXYGEN_SHOULD_SKIP_THIS
58 #define INC_HZ 52.4588
63 #define REST (float) 255
64 #define END (float) 254
65 #define BEAT_VAL (float) 253
66 #define TEMPO (float) 252
67 #define HOLDS (float) 251
68 #define CH0 (float) 250
69 #define CH1 (float) 249
70 #define CH2 (float) 248
71 #define CH3 (float) 247
72 #define HOLD0 (float) 246
73 #define HOLD1 (float) 245
74 #define HOLD2 (float) 244
75 #define HOLD3 (float) 243
88 #define B0b (float) 10
93 #define D1b (float) 13
95 #define E1b (float) 15
98 #define G1b (float) 18
100 #define A1b (float) 20
101 #define A1 (float) 21
102 #define B1b (float) 22
103 #define B1 (float) 23
106 #define C2 (float) 24
107 #define D2b (float) 25
108 #define D2 (float) 26
109 #define E2b (float) 27
110 #define E2 (float) 28
111 #define F2 (float) 29
112 #define G2b (float) 30
113 #define G2 (float) 31
114 #define A2b (float) 32
115 #define A2 (float) 33
116 #define B2b (float) 34
117 #define B2 (float) 35
120 #define C3 (float) 36
121 #define D3b (float) 37
122 #define D3 (float) 38
123 #define E3b (float) 39
124 #define E3 (float) 40
125 #define F3 (float) 41
126 #define G3b (float) 42
127 #define G3 (float) 43
128 #define A3b (float) 44
129 #define A3 (float) 45
130 #define B3b (float) 46
131 #define B3 (float) 47
134 #define C4 (float) 48
135 #define D4b (float) 49
136 #define D4 (float) 50
137 #define E4b (float) 51
138 #define E4 (float) 52
139 #define F4 (float) 53
140 #define G4b (float) 54
141 #define G4 (float) 55
142 #define A4b (float) 56
143 #define A4 (float) 57
144 #define B4b (float) 58
145 #define B4 (float) 59
148 #define C5 (float) 60
149 #define D5b (float) 61
150 #define D5 (float) 62
151 #define E5b (float) 63
152 #define E5 (float) 64
153 #define F5 (float) 65
154 #define G5b (float) 66
155 #define G5 (float) 67
156 #define A5b (float) 68
157 #define A5 (float) 69
158 #define B5b (float) 70
159 #define B5 (float) 71
162 #define C6 (float) 72
163 #define D6b (float) 73
164 #define D6 (float) 74
165 #define E6b (float) 75
166 #define E6 (float) 76
167 #define F6 (float) 77
168 #define G6b (float) 78
169 #define G6 (float) 79
170 #define A6b (float) 80
171 #define A6 (float) 81
172 #define B6b (float) 82
173 #define B6 (float) 83
176 #define C7 (float) 84
177 #define D7b (float) 85
178 #define D7 (float) 86
179 #define E7b (float) 87
180 #define E7 (float) 88
181 #define F7 (float) 89
182 #define G7b (float) 90
183 #define G7 (float) 91
184 #define A7b (float) 92
185 #define A7 (float) 93
186 #define B7b (float) 94
187 #define B7 (float) 95
190 #define C8 (float) 96
191 #define D8b (float) 97
192 #define D8 (float) 98
193 #define E8b (float) 99
194 #define E8 (float) 100
195 #define F8 (float) 101
196 #define G8b (float) 102
197 #define G8 (float) 103
198 #define A8b (float) 104
199 #define A8 (float) 105
200 #define B8b (float) 106
201 #define B8 (float) 107
203 #endif // MUSIC_NOTES
206 #ifndef DOXYGEN_SHOULD_SKIP_THIS
208 typedef struct audiosynthpasm_struct
210 volatile int osc_sample;
211 volatile int osc_envelope;
212 volatile int osc_attack;
213 volatile int osc_decay;
214 volatile int osc_sustain;
215 volatile int osc_release;
216 volatile int osc_waveform;
217 volatile int osc_state;
218 volatile int osc_target[4];
219 volatile int osc_vol[4];
220 volatile int osc_inc[4];
221 volatile int osc_acc[4];
222 volatile int freqtable[12];
224 volatile int ctraval;
225 volatile int pinmask;
230 #endif // DOXYGEN_SHOULD_SKIP_THIS
269 void sound_volume(sound_t *device,
int channel,
int volume);
281 void sound_note(sound_t *device,
int channel,
int note);
293 void sound_wave(sound_t *device,
int channel,
int wave);
308 void sound_freq(sound_t *device,
int channel,
int freq);
311 #ifndef DOXYGEN_SHOULD_SKIP_THIS
313 void sound_freqRaw(sound_t *device,
int channel,
int value);
315 void sound_adsr(sound_t *device,
int channel,
int attack,
int decay,
316 int sustain,
int release);
317 void sound_envelopeSet(sound_t *device,
int channel,
int value);
318 void sound_envelopeStart(sound_t *device,
int channel,
int enable);
320 void sound_playChords(sound_t *device,
float *chords);
322 void replace_byte(
int *address,
int intOffset,
int byteOffset,
int newVal);
323 void sound_param(sound_t *device,
int type,
int channel,
int value);
324 void sound_loadPatch(sound_t *device,
int *patchAddr);
325 void sound_sampleSet(sound_t *device,
int value);
327 void sound_playSound(sound_t *device,
int channel,
int value);
328 void sound_endSound(sound_t *device,
int channel);
329 void sound_endAllSound(sound_t *device);
331 #endif // DOXYGEN_SHOULD_SKIP_THIS