├── CheapSynth_FM4osc2Poly_v0_5_6
├── ADSRslow.h
└── CheapSynth_FM4osc2Poly_v0_5_6.ino
├── CheapSynth_FM4osc2Poly_v0_6
└── CheapSynth_FM4osc2Poly_v0_6.ino
├── CheapSynth_FM4oscZoom_v0_5_5.ino
├── CheapSynth_SeqMode_v0_9_0.ino
├── Mozzi_drumsDG0_0_2BETA
├── Mozzi_drumsDG0_0_2BETA.ino
├── hihatc909.h
├── hihato909.h
├── kick909.h
└── snare909.h
├── PolyDrums_v0_1_3_DelayLPF
├── ADSRslow.h
├── PolyDrums_v0_1_3_DelayLPF.ino
├── Wave.h
├── hihatc909.h
├── hihato909.h
├── kick909.h
└── snare909.h
├── PolyDrums_v0_1_5_DelayNoLPF
├── ADSRslow.h
├── PolyDrums_v0_1_5_DelayNoLPF.ino
├── hihatc909.h
├── hihato909.h
├── kick909.h
└── snare909.h
├── PolyDrums_v0_2_0_DelayDuty
├── PolyDrums_v0_2_0_DelayDuty.ino
├── hihatc909.h
├── hihato909.h
├── kick909.h
└── snare909.h
├── README.md
├── WaveClass3PolyPlusLPF_BETA
├── Wave.h
├── WaveClass3PolyPlusLPF_BETA.ino
├── hihatc909.h
├── hihato909.h
├── kick909.h
└── snare909.h
├── WaveClass4PolyPlusLPF_BETA
├── ADSRslow.h
├── Wave.h
└── WaveClass4PolyPlusLPF_BETA.ino
└── fm_v1_ino
└── fm_v1_ino.ino
/CheapSynth_FM4osc2Poly_v0_5_6/ADSRslow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ADSR.h
3 | *
4 | * Copyright 2012 Tim Barrass.
5 | *
6 | * This file is part of Mozzi.
7 | *
8 | * Mozzi is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * Mozzi is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with Mozzi. If not, see .
20 | *
21 | */
22 |
23 | #ifndef ADSR_H_
24 | #define ADSR_H_
25 |
26 | #include "Arduino.h"
27 | //#include
28 | #include "Line.h"
29 | #include "mozzi_fixmath.h"
30 |
31 | /** A simple ADSR envelope generator.
32 | @todo Test whether using the template parameter makes any difference to speed,
33 | and rationalise which units which do and don't need them.
34 | Template objects are messy when you try to use pointers to them,
35 | you have to include the whole template shebang in the pointer handling.
36 | */
37 | template
38 | class ADSR
39 | {
40 | private:
41 |
42 | const unsigned int AUDIO_TICKS_PER_CONTROL;
43 |
44 | unsigned int phase_control_step_counter;
45 | unsigned int phase_num_control_steps;
46 |
47 | enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
48 |
49 |
50 | struct phase{
51 | byte phase_type;
52 | unsigned int control_steps;
53 | unsigned long audio_steps;
54 | Q8n0 level;
55 | }attack,decay,sustain,release,idle;
56 |
57 | phase * current_phase;
58 |
59 | // Linear audio rate transitions for envelope
60 | Line transition;
61 |
62 | inline
63 | unsigned int convertMsecToControlSteps(unsigned int msec){
64 | return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
65 | }
66 |
67 | inline
68 | void setPhase(phase * next_phase) {
69 | phase_control_step_counter = 0;
70 | phase_num_control_steps = next_phase->control_steps;
71 | transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase-> control_steps);
72 | current_phase = next_phase;
73 | }
74 |
75 |
76 |
77 | inline
78 | void checkForAndSetNextPhase(phase * next_phase) {
79 | if (++phase_control_step_counter >= phase_num_control_steps){
80 | setPhase(next_phase);
81 | }
82 | }
83 |
84 |
85 | inline
86 | void checkForAndSetIdle() {
87 | if (++phase_control_step_counter >= phase_num_control_steps){
88 | transition.set(0,0,1);
89 | current_phase = &idle;
90 | }
91 | }
92 |
93 |
94 |
95 | inline
96 | void setTime(phase * p, unsigned int msec)
97 | {
98 | p->control_steps=convertMsecToControlSteps(msec);
99 | p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
100 | }
101 |
102 |
103 | public:
104 |
105 | /** Constructor.
106 | */
107 | ADSR():AUDIO_TICKS_PER_CONTROL(AUDIO_RATE/CONTROL_UPDATE_RATE)
108 | {
109 | attack.phase_type = ATTACK;
110 | decay.phase_type = DECAY;
111 | sustain.phase_type = SUSTAIN;
112 | release.phase_type = RELEASE;
113 | idle.phase_type = IDLE;
114 | release.level = 0;
115 | }
116 |
117 |
118 | /** Updates the internal controls of the ADSR.
119 | Call this in updateControl().
120 | */
121 | void update(){ // control rate
122 |
123 | switch(current_phase->phase_type) {
124 |
125 | case ATTACK:
126 | checkForAndSetNextPhase(&decay);
127 | break;
128 |
129 | case DECAY:
130 | checkForAndSetNextPhase(&sustain);
131 | break;
132 |
133 | case SUSTAIN:
134 | checkForAndSetNextPhase(&release);
135 | break;
136 |
137 | case RELEASE:
138 | checkForAndSetIdle();
139 | break;
140 |
141 | }
142 | }
143 |
144 | /** Advances one audio step along the ADSR and returns the level.
145 | Call this in updateAudio().
146 | @return the next value, as an unsigned int.
147 | */
148 | inline
149 | unsigned int next()
150 | {
151 | return Q16n16_to_Q16n0(transition.next());
152 | }
153 |
154 |
155 |
156 | /** Start the attack phase of the ADSR. THis will restart the ADSR no matter what phase it is up to.
157 | */
158 | inline
159 | void noteOn(){
160 | setPhase(&attack);
161 | }
162 |
163 |
164 |
165 | /** Start the release phase of the ADSR.
166 | @todo fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
167 | */
168 | inline
169 | void noteOff(){
170 | setPhase(&release);
171 | }
172 |
173 |
174 |
175 |
176 |
177 | /** Set the attack level of the ADSR.
178 | @param value the attack level.
179 | */
180 | inline
181 | void setAttackLevel(byte value)
182 | {
183 | attack.level=value;
184 | }
185 |
186 |
187 |
188 | /** Set the decay level of the ADSR.
189 | @param value the decay level.
190 | */
191 | inline
192 | void setDecayLevel(byte value)
193 | {
194 | decay.level=value;
195 | }
196 |
197 |
198 | /** Set the sustain level of the ADSR.
199 | @param value the sustain level. Usually the same as the decay level,
200 | for a steady sustained note.
201 | */
202 | inline
203 | void setSustainLevel(byte value)
204 | {
205 | sustain.level=value;
206 | }
207 |
208 | /** Set the release level of the ADSR. Normally you'd make this 0,
209 | but you have the option of some other value.
210 | @param value the release level (normally 0).
211 | */
212 | inline
213 | void setReleaseLevel(byte value)
214 | {
215 | release.level=value;
216 | }
217 |
218 |
219 |
220 | /** Set the attack and decay levels of the ADSR. This assumes a conventional
221 | ADSR where the sustain continues at the same level as the decay, till the release ramps to 0.
222 | @param attack the new attack level.
223 | @param value the new sustain level.
224 | */
225 | inline
226 | void setADLevels(byte attack, byte decay)
227 | {
228 | setAttackLevel(attack);
229 | setDecayLevel(decay);
230 | setSustainLevel(decay);
231 | setReleaseLevel(0);
232 | }
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | /** Set the attack time of the ADSR in milliseconds.
241 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
242 | @param value the unsigned int attack time in milliseconds.
243 | */
244 | inline
245 | void setAttackTime(unsigned int msec)
246 | {
247 | setTime(&attack, msec);
248 | }
249 |
250 |
251 | /** Set the decay time of the ADSR in milliseconds.
252 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
253 | @param value the unsigned int decay time in milliseconds.
254 | */
255 | inline
256 | void setDecayTime(unsigned int msec)
257 | {
258 | setTime(&decay, msec);
259 | }
260 |
261 |
262 | /** Set the sustain time of the ADSR in milliseconds.
263 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
264 | The sustain phase will finish if the ADSR recieves a noteOff().
265 | @param value the unsigned int sustain time in milliseconds.
266 | */
267 | inline
268 | void setSustainTime(unsigned int msec)
269 | {
270 | setTime(&sustain, msec);
271 | }
272 |
273 |
274 |
275 | /** Set the release time of the ADSR in milliseconds.
276 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
277 | @param value the unsigned int release time in milliseconds.
278 | */
279 | inline
280 | void setReleaseTime(unsigned int msec)
281 | {
282 | setTime(&release, msec);
283 | }
284 |
285 |
286 |
287 | /** Set the attack, decay and release times of the ADSR in milliseconds.
288 | The actual times will be resolved within the resolution of CONTROL_RATE.
289 | @param attack_ms the new attack time in milliseconds.
290 | @param decay_ms the new decay time in milliseconds.
291 | @param decay_ms the new sustain time in milliseconds.
292 | @param release_ms the new release time in milliseconds.
293 | */
294 | inline
295 | void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
296 | {
297 | setAttackTime(attack_ms);
298 | setDecayTime(decay_ms);
299 | setSustainTime(sustain_ms);
300 | setReleaseTime(release_ms);
301 | }
302 |
303 |
304 | };
305 |
306 | #endif /* ADSR_H_ */
307 |
308 |
--------------------------------------------------------------------------------
/CheapSynth_SeqMode_v0_9_0.ino:
--------------------------------------------------------------------------------
1 | // CheapSynth "sequencer" mode 2013 - quite clumsily stuck (by Dave Green) on top of
2 | // "A very simple MIDI synth."
3 | // Greg Kennedy 2011
4 | // http://forum.arduino.cc/index.php?topic=79326.0
5 | //
6 | // You should be able to spot the note arrays further down, and can use the modulation MIDI control
7 | // to adjust the "modulation depth" (ie how grainy the notes sound)
8 | //
9 | // Other controls: Program Up + Down = change tempo
10 | // Continue = "Pause"
11 |
12 | #include
13 |
14 | #include
15 | #include
16 | #include // table for Oscils to play
17 | #include // table for Oscils to play
18 | #include // table for Oscils to play
19 | #include // for mtof
20 |
21 | #define CONTROL_RATE 128 // powers of 2 please
22 |
23 | // Mozzi example uses COS waves for carrier and modulator
24 | // gets brutal very fast if you use a saw/square carrier
25 | // gets subtly more brutal if you use smaller wavetables (fewer samples per cycle)
26 | Oscil oscCarrier(SQUARE_ANALOGUE512_DATA);
27 | Oscil oscModulator(COS256_DATA);
28 |
29 | int midiNotes[] = {
30 | //these are MIDI note values, ie 12 = C, 24 = next C up
31 | //NB note values of 25+ currently considered as absolute (ie don't change with keypress)
32 | /*
33 | 16,16,28,28,16,16,26,28,//lee coombs
34 | 16,16,28,28,16,16,26,28,
35 | 16,16,28,28,16,16,26,28,
36 | 16,16,28,28,16,16,26,28,
37 | */
38 | //octaves - blue mon, hung up, erasure? etc
39 | 12,24,12,24,12,24,12,24,12,24,12,24,12,24,12,24,
40 | 12,24,12,24,12,24,12,24,12,24,12,24,12,24,12,24,
41 |
42 | //descending bass (eg Bowie's Heroes)
43 | 24,24,21,19,24,24,21,19,24,24,21,19,24,24,21,19,
44 | 24,24,21,19,24,24,21,19,24,24,21,19,24,24,21,19,
45 |
46 | //different accented octaves (similar to OMD's Enola Gay)
47 | 12,12,24,12,12,24,12,24,
48 | 12,12,24,12,12,24,12,24,
49 | 12,12,24,12,12,24,12,24,
50 | 12,12,24,12,12,24,12,24,
51 |
52 | /// 12/8 shuffle rhythm (eg Muse)
53 | 12,12,24,12,12,24,12,12,24,12,12,24,
54 | 12,12,24,12,12,24,12,12,24,12,12,24,
55 | };
56 |
57 | int modOffsets[] = {
58 | /*
59 | //lee C
60 | 12, 12, 12, 12, 12, 19, 12, 12,
61 | 12, 12, 12, 12, 12, 19, 12, 12,
62 | 12, 12, 12, 12, 12, 19, 12, 12,
63 | 12, 12, 12, 12, 12, 19, 12, 12,
64 | */
65 | 12, 12, 12, 12, 12, 12, 12, 12, //octaves
66 | 12, 12, 12, 12, 12, 12, 12, 12,
67 | 12, 12, 12, 12, 12, 12, 12, 12,
68 | 12, 12, 12, 12, 12, 12, 12, 12,
69 |
70 | // here I'm using different modulation offsets to distinguish between adjacent notes
71 | // (probably also easy to devise a system to play a rest (ie amplitude=0) if note value=0??
72 | 0,12,0,0,12,0,0,0,0,12,0,0,12,0,0,0,//descending bass
73 | 0,12,0,0,12,0,0,0,0,12,0,0,12,0,0,0,
74 |
75 | 0,12,0,0,12,0,0,0,0,12,0,0,12,0,0,0,//accented octaves
76 | 0,12,0,0,12,0,0,0,0,12,0,0,12,0,0,0,
77 |
78 | 12, 12, 12, 12, 12, 12, 12, 12, // shuffle
79 | 12, 12, 12, 12, 12, 12, 12, 12,
80 | 12, 12, 12, 12, 12, 12, 12, 12,
81 | 12, 12, 12, 12, 12, 12, 12, 12,
82 | };
83 |
84 | //float modDepths[] = {
85 | // 0, 1, 3, 0.5, 6, 2, 1, 2,
86 | // 0.5, 8, 3, 0.5, 2, 2, 1, 0.125
87 | //};
88 |
89 | float note = 24;
90 | int lastByte;
91 | float bendByte =50;
92 |
93 | int tuneOffset = 0;
94 | int tickLengthConverter = 26;
95 | int arraySize = 32;
96 | int controlTick = 0;
97 | int arrayIndex = 0;
98 | int sequenced;
99 | int playflag = 1;
100 |
101 | float carrierFreq = 10.f;
102 | float modFreq = 10.f;
103 | float bendRead = 10.f;
104 | long modDepth = 1;
105 |
106 | float amplitude = 1.f;
107 |
108 | void setParams(){
109 | // mtof converts MIDI note range to Hz freq
110 | sequenced=midiNotes[arrayIndex + (arraySize*tuneOffset)];
111 |
112 | if (sequenced<25) {sequenced += note; } else {sequenced += 36; }
113 | //if (tuneOffset >0) {sequenced -= 12; }
114 |
115 | carrierFreq = mtof(sequenced);
116 |
117 | // FM harmonics are most musical when modulator's @ simple musical offsets from carrier
118 | // EG +12 semitones (1 oct), -24 semitones (-2 oct), +19 semitones (+1 octave and a fifth)
119 | modFreq = mtof( ( sequenced + modOffsets[arrayIndex+ (arraySize*tuneOffset)] ) );
120 |
121 | // I like to make modulation depth (in Hz) some ratio of the carrier's freq
122 | // That way, the perceived intensity of the FM is the same throughout the note range
123 | // modDepth = (long) 6;
124 | bendRead=(bendByte / 30);
125 | modDepth = (long) carrierFreq * bendRead * bendRead; // 7 was good
126 |
127 | // Set oscillator frequencies
128 | oscCarrier.setFreq(carrierFreq);
129 | oscModulator.setFreq(modFreq);
130 | }
131 |
132 | // Move on to the next note
133 | void incrementIndexes(){
134 | arrayIndex ++;
135 | int sizelimit=arraySize-1;
136 |
137 | //Sample code on how to view what's going on
138 | Serial.end();
139 | Serial.begin(115200);
140 | Serial.print(" arrayIndex:");
141 | Serial.println( arrayIndex
142 | );
143 | Serial.println();
144 | Serial.end();
145 | Serial.begin(31250);
146 |
147 | if (tuneOffset==3) {sizelimit = 23;} // hack to allow patterns of different length
148 | if(arrayIndex>sizelimit){
149 | arrayIndex = 0;
150 | }
151 | }
152 |
153 | // NOW BACK TO YOUR REGULARLY SCHEDULED MIDI SCAN - comments by Greg Kennedy 2011
154 |
155 | #define statusLed 13
156 | #define tonePin 8
157 |
158 | // MIDI channel to answer to, 0x00 - 0x0F
159 | #define myChannel 0x00
160 | // set to TRUE and the device will respond to all channels
161 | #define respondAllChannels true
162 |
163 | // midi commands
164 | #define MIDI_CMD_NOTE_OFF 0x80
165 | #define MIDI_CMD_NOTE_ON 0x90
166 | #define MIDI_CMD_KEY_PRESSURE 0xA0
167 | #define MIDI_CMD_CONTROLLER_CHANGE 0xB0
168 | #define MIDI_CMD_PROGRAM_CHANGE 0xC0
169 | #define MIDI_CMD_CHANNEL_PRESSURE 0xD0
170 | #define MIDI_CMD_PITCH_BEND 0xB0
171 |
172 | // this is a placeholder: there are
173 | // in fact real midi commands from F0-FF which
174 | // are not channel specific.
175 | // this simple synth will just ignore those though.
176 | #define MIDI_CMD_SYSEX 0xF0
177 |
178 | // a dummy "ignore" state for commands which
179 | // we wish to ignore.
180 | #define MIDI_IGNORE 0x00
181 |
182 | // midi "state" - which data byte we are receiving
183 | #define MIDI_STATE_BYTE1 0x00
184 | #define MIDI_STATE_BYTE2 0x01
185 |
186 | // MIDI note to frequency
187 | // This isn't exact and may sound a bit detuned at lower notes, because
188 | // the floating point values have been rounded to uint16.
189 | // Based on A440 tuning.
190 |
191 | // I would prefer to use the typedef for this (prog_uint16_t), but alas that triggers a gcc bug
192 | // and does not put anything into the flash memory.
193 |
194 | // Also note the limitations of tone() which at 16mhz specifies a minimum frequency of 31hz - in other words, notes below
195 | // B0 will play at the wrong frequency since the timer can't run that slowly!
196 | uint16_t frequency[128] PROGMEM = {8, 9, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 31, 33, 35, 37, 39, 41, 44, 46, 49, 52, 55, 58, 62, 65, 69, 73, 78, 82, 87, 92, 98, 104, 110, 117, 123, 131, 139, 147, 156, 165, 175, 185, 196, 208, 220, 233, 247, 262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494, 523, 554, 587, 622, 659, 698, 740, 784, 831, 880, 932, 988, 1047, 1109, 1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, 1976, 2093, 2217, 2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, 3729, 3951, 4186, 4435, 4699, 4978, 5274, 5588, 5920, 5920, 6645, 7040, 7459, 7902, 8372, 8870, 9397, 9956, 10548, 11175, 11840, 12544};
197 |
198 | //setup: declaring iputs and outputs and begin serial
199 | void setup() {
200 | startMozzi(CONTROL_RATE);
201 |
202 | pinMode(statusLed,OUTPUT); // declare the LED's pin as output
203 |
204 | pinMode(tonePin,OUTPUT); // setup tone output pin
205 |
206 | //start serial with midi baudrate 31250
207 | // or 38400 for debugging (eg MIDI over serial from PC)
208 | Serial.begin(31250);
209 |
210 | // indicate we are ready to receive data!
211 | digitalWrite(statusLed,HIGH);
212 | }
213 |
214 | //loop: wait for serial data - DG: in hindsight, this should really go in updateControl()
215 | // (impressed that it even works this way round!)
216 | void loop () {
217 | audioHook();
218 | static byte lastCommand = MIDI_IGNORE;
219 | static byte state;
220 |
221 | while (Serial.available()) {
222 |
223 | // read the incoming byte:
224 | byte incomingByte = Serial.read();
225 |
226 | // Command byte?
227 | if (incomingByte & 0b10000000) {
228 | if (respondAllChannels ||
229 | (incomingByte & 0x0F) == myChannel) { // See if this is our channel
230 |
231 | if (incomingByte==0xFC) {tuneOffset--; {if (tuneOffset<0) tuneOffset=3;} }
232 | if (incomingByte==0xFA) {tuneOffset++; {if (tuneOffset>3) tuneOffset=0;} }
233 | if (incomingByte==0xFB) {playflag++; {if (playflag>1) playflag=0;} }
234 |
235 | lastCommand = incomingByte & 0xF0;
236 | } else { // Not our channel. Ignore command.
237 | lastCommand = MIDI_IGNORE;
238 | }
239 | state = MIDI_STATE_BYTE1; // Reset our state to byte1.
240 | } else if (state == MIDI_STATE_BYTE1) { // process first data byte
241 | if ( lastCommand==MIDI_CMD_NOTE_OFF )
242 | { // if we received a "note off", make sure that is what is currently playing
243 | if (note == incomingByte) noTone(tonePin);
244 | state = MIDI_STATE_BYTE2; // expect to receive a velocity byte
245 | } else if ( lastCommand == MIDI_CMD_NOTE_ON ){ // if we received a "note on", we wait for the note (databyte)
246 | lastByte=incomingByte; // save the current note
247 | state = MIDI_STATE_BYTE2; // expect to receive a velocity byte
248 | }
249 | // implement whatever further commands you want here
250 | else if ( lastCommand == MIDI_CMD_PITCH_BEND ){
251 | bendByte=incomingByte; // save the current note
252 | state = MIDI_STATE_BYTE1; // expect to receive a velocity byte
253 | }
254 |
255 | else if ( lastCommand == MIDI_CMD_PROGRAM_CHANGE )
256 | {
257 | tickLengthConverter = 31 - (incomingByte % 32);
258 |
259 | // save the current note
260 | state = MIDI_STATE_BYTE1; // expect to receive a velocity byte
261 | }
262 |
263 |
264 | } else { // process second data byte
265 | if (lastCommand == MIDI_CMD_NOTE_ON) {
266 | if (incomingByte != 0) {
267 | note = lastByte;
268 | // tone(tonePin,(unsigned int)pgm_read_word(&frequency[note]));
269 | // NB ToneMIDISynth generally good for diagnosing MIDI activity
270 | // setParams();
271 | } else if (note == lastByte) {
272 | noTone(tonePin);
273 | }
274 | }
275 | state = MIDI_STATE_BYTE1; // message data complete
276 | // This should be changed for SysEx
277 | }
278 | }
279 | }
280 |
281 | void updateControl(){
282 | if(controlTick == 0)
283 | {
284 | setParams();
285 | incrementIndexes();
286 | }
287 |
288 | // Update controlTick
289 | controlTick +=playflag;
290 |
291 | if(controlTick > tickLengthConverter)
292 | {
293 | controlTick = 0;
294 | }
295 | }
296 |
297 | int updateAudio(){
298 | long vibrato = modDepth * oscModulator.next();
299 | return (int) (oscCarrier.phMod(vibrato)) * amplitude;
300 | }
301 |
--------------------------------------------------------------------------------
/Mozzi_drumsDG0_0_2BETA/Mozzi_drumsDG0_0_2BETA.ino:
--------------------------------------------------------------------------------
1 | /* Example of a sound being triggered by MIDI input.
2 | *
3 | * Demonstrates playing notes with Mozzi in response to MIDI input,
4 | * using the standard Arduino MIDI library:
5 | * http://playground.arduino.cc/Main/MIDILibrary
6 | *
7 | * Mozzi help/discussion/announcements:
8 | * https://groups.google.com/forum/#!forum/mozzi-users
9 | *
10 | * Tim Barrass 2013.
11 | * This example code is in the public domain.
12 | *
13 | * sgreen - modified to use standard Arduino midi library, added saw wave, lowpass filter
14 | * Audio output from pin 9 (pwm)
15 | * Midi plug pin 2 (centre) to Arduino gnd, pin 5 to RX (0)
16 | * http://www.philrees.co.uk/midiplug.htm
17 | * Now with drums!
18 | */
19 |
20 |
21 | #include
22 | #include
23 | #include // oscillator template
24 | #include // for envelope
25 | #include
26 |
27 | //#include // sine table for oscillator
28 | #include
29 | #include "kick909.h"
30 | #include "snare909.h"
31 | #include "hihatc909.h"
32 | #include "hihato909.h"
33 |
34 | #include
35 | #include
36 | #include
37 | #include
38 |
39 | // use #define for CONTROL_RATE, not a constant
40 | #define CONTROL_RATE 128 // powers of 2 please
41 |
42 | unsigned long ctrlCounter = 0;
43 |
44 | // audio sinewave oscillator
45 | //Oscil osc(SIN2048_DATA);
46 | Oscil osc(SAW2048_DATA);
47 |
48 | // drums
49 | Sample kickSamp(kick909_DATA);
50 | Sample snareSamp(snare909_DATA);
51 | Sample hihatcSamp(hihatc909_DATA);
52 | Sample hihatoSamp(hihato_DATA);
53 |
54 | byte pattern[4][16] = {
55 | //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
56 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 hhc
57 | 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, // 1 hho
58 | 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, // 2 snare
59 | 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1 // 3 kick
60 | };
61 |
62 | // envelope generator
63 | ADSR envelope;
64 | LowPassFilter lpf;
65 | int crushCtrl = 0;
66 |
67 | #define LED 13 // to see if MIDI is being recieved
68 |
69 | void HandleNoteOn(byte channel, byte note, byte velocity) {
70 | //osc.setFreq(mtof(note)); // simple but less accurate frequency
71 | osc.setFreq_Q16n16(Q16n16_mtof(Q8n0_to_Q16n16(note))); // accurate frequency
72 | envelope.noteOn();
73 | digitalWrite(LED,HIGH);
74 | }
75 |
76 | void HandleNoteOff(byte channel, byte note, byte velocity) {
77 | envelope.noteOff();
78 | digitalWrite(LED,LOW);
79 | }
80 |
81 | void HandleControlChange (byte channel, byte number, byte value)
82 | {
83 | // http://www.indiana.edu/~emusic/cntrlnumb.html
84 | switch(number) {
85 | //case 1: // modulation wheel
86 | case 105:
87 | lpf.setCutoffFreq(value*2); // control messages are in [0, 127] range
88 | break;
89 | case 106:
90 | //lpf.setResonance(value*2);
91 | crushCtrl = value;
92 | break;
93 | }
94 | }
95 |
96 | void setup() {
97 | pinMode(LED, OUTPUT);
98 |
99 | // Initiate MIDI communications, listen to all channels
100 | MIDI.begin(MIDI_CHANNEL_OMNI);
101 |
102 | // Connect the HandleNoteOn function to the library, so it is called upon reception of a NoteOn.
103 | MIDI.setHandleNoteOn(HandleNoteOn); // Put only the name of the function
104 | MIDI.setHandleNoteOff(HandleNoteOff); // Put only the name of the function
105 | MIDI.setHandleControlChange(HandleControlChange);
106 |
107 | envelope.setADLevels(127,64);
108 | envelope.setTimes(50,200,10000,200); // 10000 is so the note will sustain 10 seconds unless a noteOff comes
109 |
110 | lpf.setResonance(200);
111 | lpf.setCutoffFreq(255);
112 |
113 | osc.setFreq(440); // default frequency
114 |
115 | kickSamp.setFreq((float) kick909_SAMPLERATE / (float) kick909_NUM_CELLS);
116 | snareSamp.setFreq((float) snare909_SAMPLERATE / (float) snare909_NUM_CELLS);
117 | hihatcSamp.setFreq((float) hihatc909_SAMPLERATE / (float) hihatc909_NUM_CELLS);
118 | hihatoSamp.setFreq((float) hihato_SAMPLERATE / (float) hihato_NUM_CELLS);
119 |
120 | //snareSamp.start();
121 |
122 | startMozzi(CONTROL_RATE);
123 | }
124 |
125 | int beat = 0;
126 | int oldBeat = 0;
127 |
128 | void updateControl(){
129 | MIDI.read();
130 | envelope.update();
131 |
132 | // drums
133 | ctrlCounter++;
134 | // this is called at 128Hz -> 120bmp!?
135 | beat = ((ctrlCounter*2*4)>>7);
136 | if (beat != oldBeat) {
137 | if (pattern[0][beat&0xf]) hihatcSamp.start();
138 | if (pattern[1][beat&0xf]) hihatoSamp.start();
139 | if (pattern[2][beat&0xf]) snareSamp.start();
140 | if (pattern[3][beat&0xf]) kickSamp.start();
141 | }
142 | oldBeat = beat;
143 | }
144 |
145 | // strip the low bits off!
146 | int bitCrush(int x, int a)
147 | {
148 | return (x>>a)<>8;
153 | // return (int) (envelope.next() * lpf.next(osc.next()))>>8;
154 | int x = (int) (envelope.next() * osc.next())>>8;
155 |
156 | //int x = (envelope.next() * lpf.next(osc.next()))>>8;
157 | //x = bitCrush(x, crushCtrl>>4);
158 | //x = (x * crushCtrl)>>4; // simple gain
159 | //x = bitCrush(x, 6);
160 | x = lpf.next(x);
161 |
162 | // drums please!
163 | int drums = kickSamp.next() + snareSamp.next() + hihatcSamp.next() + hihatoSamp.next();
164 | x += drums<<1;
165 | return x;
166 | }
167 |
168 |
169 | void loop() {
170 | audioHook(); // required here
171 | }
172 |
173 |
--------------------------------------------------------------------------------
/Mozzi_drumsDG0_0_2BETA/hihatc909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihatc909_H_
2 | #define hihatc909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihatc909_NUM_CELLS 1024
8 | #define hihatc909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihatc909_DATA [] = {1, -2, 1, -2, 2, 0, -4,
11 | 13, -18, 2, 3, 3, -1, 4, -9, 7, -5, -2, 4, -22, 23, -7, -8, -2, 7, -5, -8, 12,
12 | -4, 7, 7, -21, 12, -3, -18, 8, 1, 4, -20, 4, -5, -4, -2, 0, -2, -7, 3, -3, -3,
13 | -4, 3, -9, 12, -5, 20, 2, -25, 19, 0, 8, -12, -6, 4, 0, 15, -7, 8, 19, -9, -6,
14 | 0, -1, 0, -3, 12, -12, 7, 9, -18, 2, 4, 1, -7, -4, 7, 2, -3, 0, -3, 1, -2, -4,
15 | -4, -11, 7, -8, -2, 11, 2, 8, -1, 4, -3, -1, -2, -9, -6, -3, 3, -9, -9, 4, 1,
16 | -5, 1, 5, 0, 2, 2, -3, 9, 6, -7, 3, 5, 0, -2, 0, 7, -3, -2, -2, -3, 4, -2, 2,
17 | -3, 2, 0, -14, 4, 3, -4, 0, -5, 3, -2, -9, 3, 0, -1, -1, -5, -1, 5, -4, -6, 7,
18 | 1, -2, 2, 0, 4, -1, -7, 1, 3, 3, -1, -1, 6, 1, -2, 0, 3, -5, -9, 1, -1, -2, 0,
19 | -2, -1, 2, -1, -7, -2, -1, 1, -1, -4, 7, -5, -4, 5, 1, 1, 1, -2, 3, 2, -4, 0, 1,
20 | 3, -3, 1, -2, 0, 2, -1, 2, -2, -2, 0, -4, -3, 3, -3, 0, -1, -3, 2, -3, -6, 6,
21 | -2, 0, 1, 2, 0, -2, 2, 1, 1, -5, 1, -3, -2, -4, 3, -2, -2, 0, -2, 2, -4, 1, 4,
22 | -4, -1, 1, -1, -1, -2, 2, 1, 1, -4, 5, -4, 0, 1, -4, 3, -2, -1, 3, 0, -3, 0, -1,
23 | -1, -1, 0, -4, 3, -1, -3, 2, -1, -1, 0, 0, 1, 1, -1, 1, -2, -1, -1, -4, -1, 4,
24 | -1, -2, 1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, -3, 0, -1, -3, 2, -2, 1, 0, -2, -3,
25 | 1, -1, -3, 1, -1, -2, 1, 1, -2, -1, 0, 0, -2, 0, -1, -2, 2, -1, 0, -2, 1, -2, 0,
26 | 0, -4, 1, -1, -2, 1, 0, -2, 0, -2, 3, 0, -2, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0,
27 | 0, 0, -2, -1, 0, -1, 0, 0, -2, 0, 0, -2, -2, 0, -1, -1, 1, 0, -2, 0, 1, -1, 1,
28 | -1, 0, -1, 0, -1, -1, -1, -2, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, -1, -1, -1, 0, -1,
29 | 1, -1, -1, -1, -1, 1, -3, 0, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -2, 0, 0, 0,
30 | -2, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -2, 0, -2, -1, 0, 0, -1, 0, 0, -2, 0, -1,
31 | -1, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, -2, 0, -1, -1, 0, -1, -1, 0, -1,
32 | -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1,
33 | 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
34 | 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
35 | -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
36 | -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0,
37 | -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, -1, 0,
38 | -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0,
39 | -1, 0, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0,
40 | -1, -1, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0,
41 | -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1,
42 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1,
43 | -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, 0, -1,
44 | -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, 0,
45 | -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
46 | 0, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
47 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0,
48 | -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0,
49 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1,
50 | 0, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1,
51 | 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0,
52 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
53 | -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
54 | 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1,
55 | 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, };
56 |
57 | #endif /* hihatc909_H_ */
58 |
--------------------------------------------------------------------------------
/Mozzi_drumsDG0_0_2BETA/hihato909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihato_H_
2 | #define hihato_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihato_NUM_CELLS 2048
8 | #define hihato_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihato_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -2, 4, -4, -1, 3, 1, -8, 7, -2, -9, 3, -1,
12 | 1, -3, 0, -2, 4, -3, -4, -1, -3, 3, -2, -5, -1, 2, -1, -3, -1, 4, -2, 4, -3, -2,
13 | 4, -1, 6, 0, 8, -5, -5, 2, -2, 2, -2, -2, 7, -4, 6, -11, -6, 11, -6, 1, 4, 0,
14 | -14, 11, -6, -1, -2, -8, 5, -13, 1, 0, -8, 2, 7, 3, 1, -8, 5, 2, 2, -2, -8, 11,
15 | -1, 0, 2, -1, -3, 2, -3, -9, 2, -4, 6, -3, 1, 9, -7, -3, 2, -2, -2, -13, 2, 9,
16 | -3, 4, -3, 4, -6, 3, -1, -7, 13, -5, 3, 1, 1, -5, -13, 1, -2, 8, 0, 2, -4, 6,
17 | -1, 2, 3, -12, 4, -16, 0, -7, 2, 0, -3, 10, -6, 6, -3, -9, -2, 11, -7, -7, 11,
18 | 9, -3, 1, -1, -5, -6, -4, 2, -11, 8, 2, -4, 14, 0, -9, 7, -4, 6, -2, -10, -3, 1,
19 | 4, -12, 10, -1, 1, 0, 2, -3, 0, 5, 0, 5, -6, 0, -1, 0, -8, -3, -1, -1, 1, -3, 3,
20 | -3, 4, 8, -12, 0, -2, -7, 9, 2, 3, -6, -1, -4, 2, -7, -5, 12, -4, 7, 0, -2, 3,
21 | -1, -2, -3, 1, -3, -1, 2, -1, 2, -8, 1, 7, -8, -3, 1, 5, 4, -3, -3, 1, -3, -13,
22 | 2, 0, 1, 2, -13, 4, 4, 4, 0, 6, 2, -6, -9, -5, 12, -3, 1, -10, 10, -1, -7, 3,
23 | -2, 9, -18, 0, -5, 11, -4, 0, 6, -13, 3, -13, 14, 3, -5, 0, -3, 3, 1, -2, 1, 7,
24 | 5, -8, 6, 0, -8, 2, -3, 4, -6, 1, -14, 7, 8, -10, 7, -11, 10, -8, -13, 13, -3,
25 | 1, -2, 4, -4, -2, 0, 0, 8, -8, 2, 3, 5, -2, -1, -1, 4, 1, -13, 2, 2, -3, -5, 2,
26 | -1, 2, -2, 0, 0, 4, -6, -5, 6, -1, 2, -5, 1, 10, -8, -7, 8, -6, 6, 3, -15, 2, 0,
27 | -8, 6, 5, -4, 2, 0, -6, 5, -2, -4, 2, -3, -1, 5, -2, -2, 0, 1, 4, -8, 2, 4, 0,
28 | 0, -2, -1, -3, -1, -5, -3, 6, -18, 5, 10, -6, 10, -3, -4, 3, 1, -11, 4, -3, 5,
29 | -2, -7, 7, -5, 3, -4, 4, -3, 3, -3, -2, 6, -2, 4, -5, 5, -3, -9, -3, -4, 1, -2,
30 | 5, 2, -2, 7, -4, -5, 3, 0, 2, 2, -5, -2, 6, 5, -11, 3, -6, 2, 0, -3, 5, -4, 5,
31 | -6, 7, -11, 4, -3, -5, 1, -8, 4, -11, 17, 1, -3, -6, -2, 7, -2, -1, -5, 13, -5,
32 | -8, 1, 5, 3, -10, 5, -5, -4, 7, -7, 8, 5, 1, -2, -8, 7, -8, -2, 2, 1, 4, -5, -5,
33 | -2, 10, -10, -2, 1, -8, 0, -2, 5, 8, -4, -2, -4, 0, 4, -4, 1, -2, 5, 0, 8, -2,
34 | 1, -2, -4, 3, -6, 3, 0, -2, 2, 2, -5, -1, -7, -3, 1, 2, -6, 3, 0, -5, 6, -6, -1,
35 | 4, -2, -9, 4, 1, 3, 3, -2, 2, -1, -5, -2, 8, -1, -4, -6, 7, 2, 0, -3, 1, 2, -2,
36 | 1, -7, 5, -9, -2, 3, -4, 3, -1, -8, -3, 1, 0, -7, 5, 3, -3, -7, 2, 6, -2, 3, -7,
37 | 8, -7, 2, 1, 3, 7, -6, -1, -1, -2, -3, 5, -6, 3, 1, 0, -2, -1, -6, -5, 1, 3, 2,
38 | -4, 2, -2, -1, 0, -1, -3, -2, -5, -3, 3, 4, -1, 8, 0, -2, 0, -5, 1, 2, -3, -2,
39 | 8, -4, 0, -5, -2, -1, -3, 0, 5, 3, -8, 0, 0, 7, -7, -2, -1, -3, -3, -1, 1, 7, 5,
40 | -7, 1, 1, 4, -4, -3, 2, 5, -2, -6, 1, 1, -3, -7, -1, 3, -8, 3, -1, 2, 6, -11, 4,
41 | 1, -2, 0, -2, -3, 6, 6, -6, -1, 1, 2, 1, -1, -2, -1, -1, -5, 3, 0, -1, -1, -7,
42 | 0, -5, -1, 4, 0, 6, 0, -3, 1, 6, -5, 0, -3, -7, 6, -2, -2, 1, 5, -4, 4, -7, -4,
43 | 6, -3, 1, 0, -1, -4, -5, 2, -2, -5, 3, 1, 4, -1, 0, 1, 4, -1, -5, -1, -6, 2, -4,
44 | -1, 2, -1, 1, -4, -2, 0, 1, 2, -1, 0, 2, -2, 0, 4, 0, -4, 1, -5, 1, -2, 1, 4, 0,
45 | 2, 1, -3, -9, 0, -1, 2, -6, -2, 4, 1, -1, -4, 1, -1, 0, -3, 1, 1, 1, 0, 0, 6,
46 | -1, -8, -2, 1, 0, -2, -2, 5, 1, -3, -2, 5, 0, -3, -5, -8, 2, 1, 1, 0, 2, 2, -4,
47 | -1, -2, 2, -5, 0, 6, -4, 5, 0, -4, 1, -4, -8, 6, -3, -4, 4, -3, 3, 0, -1, -2, 1,
48 | -2, -2, 1, -2, -1, 0, 3, 1, 2, -1, -2, 0, -5, -1, 0, 7, 2, -4, 0, -2, -1, -2,
49 | -1, 0, 1, -4, -3, 5, 2, -2, 2, -4, 2, -6, -6, 6, -1, 4, -2, 0, 1, -1, -1, -1, 2,
50 | -3, 2, -5, -1, 4, -2, -1, -2, 2, -4, -5, 1, 2, 3, -1, 4, 1, -3, -2, -2, -2, 0,
51 | 2, -5, -2, 2, -1, 4, -4, -5, 3, -7, 2, 3, -3, 1, 2, 1, 1, -2, -3, 2, -4, 1, 0,
52 | -1, 4, 1, -4, 2, -3, -3, 2, -7, 0, 4, -1, -2, 1, 1, -7, 4, -1, -1, -1, -6, 3, 4,
53 | 0, -1, 1, -4, 3, -5, -3, 4, -2, 1, 0, 0, 1, 0, -2, -2, -2, -3, -2, -1, 0, 3, -1,
54 | 0, 0, -1, -1, -4, 1, 1, 1, 2, -2, 2, 0, -2, 0, -3, -2, -2, 0, 2, 1, -1, 0, -1,
55 | -2, 0, -3, 1, 1, -2, -3, 1, 0, 0, 1, -1, 1, -4, -1, 1, 3, 0, -1, 0, -1, -1, -4,
56 | 1, -1, 1, -1, -1, 3, -3, 0, -1, 2, -3, -2, 1, -3, 2, 2, -2, 0, 1, -6, 1, -1, 0,
57 | 3, -2, 0, 2, -2, -4, 1, -2, -2, -2, 2, -2, 2, 0, 0, 3, -2, 1, -2, 0, -3, 0, 1,
58 | -1, 0, -1, 2, -4, -2, 1, -4, 2, 0, -2, 1, 3, -2, 0, -1, -2, -3, -2, 1, -1, 0, 1,
59 | 4, -2, 2, -2, -4, 1, -3, -2, 1, 0, -2, 0, 0, -1, 0, -2, -2, 1, 0, 1, 0, 2, 1,
60 | -4, -2, 0, 0, -4, 1, -2, 1, 1, -4, 5, -1, -1, -2, -3, -1, 0, -3, -1, 4, -2, 0,
61 | 1, -1, 0, -2, -1, 2, -2, 1, 2, -1, 2, -1, -2, -1, -2, -5, -1, 1, 0, 0, 1, -2, 0,
62 | -1, -2, -1, 1, 0, -4, 1, 0, 1, -1, 2, -2, -4, -1, -1, 4, 0, -2, 0, -1, 0, 0, -5,
63 | 1, 1, -3, 0, 0, -2, 3, -1, -2, 3, -5, 0, 2, 0, 0, -2, -2, 1, 2, -6, 0, 1, -1, 1,
64 | -3, -1, 3, -2, -3, 2, 0, -3, 0, -2, 2, 1, -4, 2, 1, -2, -2, 1, -1, 4, -4, -4, 2,
65 | 2, -1, -1, -1, -4, 2, -3, 2, 2, -2, 0, -1, 0, 2, -3, -2, 2, 0, -4, -1, 1, -2, 2,
66 | -2, -1, 0, -2, -1, 1, -1, -1, 3, 0, -1, -1, 0, -1, -2, 1, -1, 1, -1, 2, 1, -1,
67 | -2, -1, 0, -5, 1, 0, -1, 2, 0, -2, -3, -1, 1, -2, -1, 1, 0, 1, 1, -2, 2, 0, -3,
68 | -1, 0, -2, -1, 2, -1, -1, 2, -3, -1, 2, -3, -2, -1, -1, -1, 1, -2, 1, 1, -1, 0,
69 | -2, 0, -2, 1, -1, 1, 1, 0, 0, -2, 0, -2, -1, -4, 0, 1, 0, 1, -1, 0, -1, -4, -2,
70 | -1, -1, -1, 0, 1, 2, -1, -3, 1, 0, 0, -1, -1, 0, 1, -3, 0, 2, 0, -2, -4, -1, 1,
71 | -1, -2, 2, 2, -1, -1, 0, -2, 1, -3, -3, 2, 0, -1, -1, 2, 1, -1, -2, -1, 0, -1,
72 | -2, 0, 1, -1, -2, 0, 2, -3, -1, 0, -2, 1, -1, 0, 3, -1, 0, -1, 0, -1, -1, -2,
73 | -1, 1, -1, 1, -3, -1, -1, -1, -1, -1, -1, -3, 2, -2, -1, 1, -1, 1, -2, -2, 1, 1,
74 | 0, -1, 1, -1, 0, -2, 1, 2, -3, 0, 0, -1, 0, -1, -2, 1, 0, -4, -1, 1, 0, 2, -3,
75 | -1, 1, -1, -2, 1, -1, 2, -1, -2, 1, -2, 0, -2, 0, 1, -2, -1, 0, 2, 0, -2, -1, 0,
76 | -1, -2, -1, 1, 3, -3, -2, 0, 0, -1, 0, 0, -1, -1, -3, -1, 1, 0, -2, 0, -1, 0,
77 | -2, 0, 0, 1, -1, 0, 1, -1, 3, -2, 0, 0, -3, 0, 2, -2, -1, 2, -1, -1, -1, -2, 0,
78 | -2, -2, 0, -1, -3, 0, 0, 0, 0, -3, 0, -1, 0, 0, 0, 1, 1, -1, -3, 0, 0, 0, -1,
79 | -3, 0, 1, -2, -1, 2, -2, -1, 0, -4, 1, 0, -2, 1, -1, 1, -1, 0, 0, 0, -1, -1, 0,
80 | -1, 1, -1, -1, 1, -1, -1, -2, -1, -1, -2, 0, 1, 0, -1, 1, -1, 0, 1, -1, -2, 1,
81 | 0, -2, 3, 0, 0, 0, -2, 0, -1, -1, -1, 0, -1, -1, -2, -1, 0, -2, -1, 0, -1, 0, 0,
82 | 0, 1, -1, 0, 0, -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, 0, -2, -1, 0, -1, -2, -1,
83 | 2, -1, -1, -1, -1, 1, -2, 1, -1, 0, 1, 0, -2, 0, 0, -3, 2, -2, -1, 0, -1, 0, 1,
84 | 1, -3, 1, -1, -2, 1, -3, 0, 1, -1, 0, 0, -2, 1, 0, -2, 0, -1, -1, 0, -2, -1, -1,
85 | -1, 0, -1, -1, 0, 0, -2, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -3, 1, -1, 0,
86 | -1, 0, 0, 0, 0, -2, -1, -1, 1, -3, -1, 2, -1, 0, -1, 0, 0, -2, -1, 1, -1, 0, -1,
87 | -2, 1, -1, -2, 0, 0, -1, -2, -2, 1, 1, -1, -2, 1, 0, -2, 0, 0, 0, 0, -2, 0, 1,
88 | -1, 0, -1, 0, -2, -1, -1, 1, 0, -1, 0, -1, 0, -1, -2, 1, -1, -2, 1, 0, 1, 0, -1,
89 | 0, 0, -2, -1, 1, -1, 0, -1, 0, 0, -1, -1, -1, 1, -3, -1, 0, 0, 0, -1, 1, 1, 0,
90 | -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -3, -2, 0, 0, 0, -1, 0, 1, -2, -2, -1,
91 | 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -2, 1, -2, 0, 1, -1, 1, -1, 0, -1, 0,
92 | -1, 0, 0, -1, 1, -1, 1, 0, -1, -2, 0, 0, -3, 0, -1, 1, -1, -2, 0, -1, 0, -1, -1,
93 | 0, -1, 0, 0, 1, -1, 1, -1, -2, 1, -2, 0, 0, -1, 0, 0, -1, -1, 1, -2, -2, 0, -1,
94 | 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, -1,
95 | 0, -1, 0, 0, -1, -2, 0, -1, -1, 0, -1, 1, 0, -1, 0, -1, -2, 0, 0, -1, 0, -1, -1,
96 | 0, -1, -1, -2, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, -1, -1, -1,
97 | -1, 0, 1, -1, -2, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0,
98 | -2, 0, -1, 0, 1, -2, -1, -1, 0, 0, -3, 1, 0, -1, 0, 0, 0, -2, 0, -2, 1, -1, -2,
99 | 1, 0, 0, -2, 0, 1, -2, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0,
100 | 1, -1, 0, 0, -1, 0, -2, 0, -1, 0, -1, 1, 0, -2, -2, 0, 0, -3, -1, 0, -1, 0, 0,
101 | -1, 0, };
102 |
103 | #endif /* hihato_H_ */
104 |
--------------------------------------------------------------------------------
/Mozzi_drumsDG0_0_2BETA/kick909.h:
--------------------------------------------------------------------------------
1 | #ifndef kick909_H_
2 | #define kick909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define kick909_NUM_CELLS 2048
8 | #define kick909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) kick909_DATA [] = {-1, 0, -1, 0, -1, 0, 0,
11 | 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1,
12 | 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1,
13 | -1, -1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 8, 9, 9, 10, 14, 17,
14 | 20, 24, 29, 50, 57, 49, 53, 54, 53, 53, 54, 53, 53, 53, 52, 51, 50, 48, 46, 45,
15 | 44, 42, 40, 38, 35, 33, 30, 26, 23, 19, 15, 12, 8, 5, 1, -2, -6, -9, -11, -13,
16 | -16, -17, -18, -20, -22, -23, -24, -24, -25, -26, -27, -27, -27, -27, -28, -28,
17 | -28, -28, -27, -27, -27, -26, -25, -24, -24, -23, -21, -20, -19, -17, -15, -13,
18 | -12, -10, -8, -5, -3, -1, 1, 3, 6, 8, 10, 12, 14, 17, 19, 21, 24, 25, 28, 30,
19 | 32, 33, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41,
20 | 40, 40, 39, 38, 38, 37, 37, 36, 36, 35, 34, 33, 32, 32, 30, 29, 28, 26, 24, 22,
21 | 20, 18, 17, 15, 13, 11, 9, 8, 6, 5, 3, 1, -1, -2, -4, -5, -7, -8, -9, -11, -13,
22 | -14, -16, -17, -18, -19, -20, -21, -22, -24, -25, -25, -26, -27, -27, -28, -29,
23 | -29, -30, -30, -30, -30, -31, -31, -31, -31, -31, -32, -31, -32, -32, -32, -32,
24 | -32, -32, -32, -32, -32, -32, -32, -32, -31, -31, -31, -30, -30, -30, -29, -28,
25 | -28, -27, -27, -26, -26, -25, -25, -24, -23, -22, -21, -20, -20, -19, -18, -17,
26 | -16, -15, -14, -13, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0, 1, 2, 3, 4, 6,
27 | 6, 8, 9, 10, 11, 12, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 27,
28 | 28, 29, 30, 30, 31, 32, 33, 33, 34, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36,
29 | 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36,
30 | 36, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28,
31 | 28, 27, 27, 26, 25, 25, 24, 23, 23, 21, 21, 20, 19, 18, 17, 16, 15, 14, 12, 11,
32 | 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9,
33 | -10, -11, -12, -12, -13, -14, -15, -16, -16, -17, -18, -19, -20, -20, -21, -22,
34 | -23, -23, -24, -25, -25, -26, -26, -27, -27, -28, -29, -29, -29, -30, -30, -31,
35 | -31, -32, -32, -32, -32, -33, -33, -33, -33, -33, -33, -34, -34, -34, -34, -34,
36 | -34, -34, -34, -34, -34, -34, -34, -34, -35, -35, -35, -35, -35, -35, -35, -35,
37 | -35, -35, -35, -35, -34, -34, -34, -34, -33, -33, -33, -33, -33, -32, -32, -32,
38 | -32, -31, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27,
39 | -27, -26, -26, -25, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18,
40 | -17, -17, -16, -15, -14, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -5,
41 | -5, -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13,
42 | 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28,
43 | 29, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 32, 33, 33, 34, 34, 34, 34,
44 | 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
45 | 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32,
46 | 32, 31, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25,
47 | 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 13, 12, 11, 11,
48 | 10, 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, 0, -1, -1, -2, -3, -4, -5, -5, -6, -7, -8, -9,
49 | -9, -10, -11, -12, -12, -13, -14, -14, -15, -16, -17, -17, -18, -19, -19, -20,
50 | -21, -21, -22, -23, -23, -24, -24, -25, -26, -26, -27, -27, -28, -28, -29, -30,
51 | -30, -30, -31, -31, -32, -32, -32, -33, -33, -33, -34, -34, -34, -34, -34, -35,
52 | -35, -35, -35, -35, -35, -35, -35, -36, -36, -36, -36, -36, -36, -36, -36, -36,
53 | -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
54 | -35, -35, -35, -35, -35, -34, -34, -34, -34, -34, -33, -33, -33, -33, -32, -32,
55 | -32, -32, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -27, -27,
56 | -26, -26, -26, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17,
57 | -17, -16, -15, -15, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -6, -5,
58 | -4, -3, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13,
59 | 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28,
60 | 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 32,
61 | 33, 33, 34, 33, 33, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32, 32, 32, 31,
63 | 31, 31, 31, 30, 30, 30, 29, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25, 25,
64 | 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 15, 14, 13, 12, 12, 11,
65 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0, -1, -2, -3, -3, -4, -5, -6, -7, -7, -8, -9,
66 | -10, -10, -11, -12, -12, -13, -14, -14, -15, -15, -16, -17, -17, -18, -18, -19,
67 | -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -25, -26, -26,
68 | -27, -27, -27, -27, -28, -28, -28, -28, -29, -29, -29, -29, -29, -29, -29, -29,
69 | -29, -29, -29, -30, -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, -29, -29,
70 | -29, -29, -29, -29, -29, -29, -29, -29, -29, -28, -28, -28, -28, -28, -28, -28,
71 | -28, -27, -27, -27, -27, -27, -26, -26, -26, -26, -26, -25, -25, -25, -25, -25,
72 | -24, -24, -24, -24, -23, -23, -23, -23, -23, -22, -22, -22, -21, -21, -21, -21,
73 | -20, -20, -20, -19, -19, -19, -18, -18, -18, -17, -17, -17, -16, -16, -15, -15,
74 | -15, -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -10, -10, -10, -9, -9,
75 | -8, -8, -8, -7, -7, -7, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -1,
76 | -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6,
77 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
79 | 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
80 | 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -3,
81 | -4, -4, -4, -4, -4, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7,
82 | -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10,
83 | -10, -10, -10, -10, -10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
84 | -11, -11, -11, -11, -11, -11, -11, -11, -12, -11, -11, -11, -11, -11, -11, -11,
85 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
86 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -10, -10,
87 | -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -9,
88 | -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8,
89 | -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6,
90 | -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4,
91 | -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
92 | -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
93 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
94 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
95 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
96 | -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
97 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4,
98 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
99 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
100 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
101 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
102 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
103 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
104 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
105 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
107 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
108 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2,
109 | -3, -2, -3, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
110 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
115 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
116 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
117 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, };
118 |
119 | #endif /* kick909_H_ */
120 |
--------------------------------------------------------------------------------
/Mozzi_drumsDG0_0_2BETA/snare909.h:
--------------------------------------------------------------------------------
1 | #ifndef snare909_H_
2 | #define snare909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define snare909_NUM_CELLS 2048
8 | #define snare909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) snare909_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
12 | -1, 0, 0, -2, -2, 0, -2, -1, -3, -2, 4, -3, -7, -2, 1, -7, 6, -3, -2, -6, -8, 8,
13 | -6, 0, -3, -1, -7, 0, -4, -11, -2, 3, -7, -9, 19, -1, 33, 43, 22, 60, 57, 49,
14 | 58, 55, 68, 65, 62, 60, 60, 69, 64, 61, 57, 58, 43, 50, 39, 37, 27, 17, 21, 15,
15 | 11, -2, -6, -12, -6, -23, -7, -22, -30, -22, -25, -27, -26, -31, -31, -21, -18,
16 | -8, -18, -4, 3, 1, 8, 12, 12, 19, 14, 42, 28, 21, 43, 45, 49, 46, 46, 43, 55,
17 | 44, 47, 44, 30, 46, 34, 38, 42, 24, 34, 27, 45, 23, 28, 38, 35, 36, 23, 30, 28,
18 | 40, 23, 32, 35, 29, 31, 31, 30, 28, 30, 30, 12, 13, 18, 8, 7, -2, 5, 6, -1, -7,
19 | -5, -9, -10, -11, -13, -17, -22, -25, -24, -24, -33, -28, -24, -30, -20, -28,
20 | -41, -28, -29, -26, -27, -37, -26, -29, -32, -20, -31, -26, -15, -20, -9, -14,
21 | -15, -12, -6, -7, -3, 8, 6, 15, 16, 12, 21, 30, 25, 35, 35, 29, 46, 44, 38, 49,
22 | 34, 48, 44, 44, 55, 38, 50, 41, 52, 43, 43, 53, 44, 56, 46, 39, 41, 44, 42, 42,
23 | 44, 41, 43, 35, 38, 39, 26, 30, 36, 31, 27, 26, 21, 20, 15, 9, 8, -2, 0, 10,
24 | -10, -13, -3, -17, -14, -14, -18, -7, -30, -24, -32, -26, -28, -37, -23, -35,
25 | -25, -40, -31, -34, -46, -30, -42, -38, -26, -37, -33, -32, -27, -32, -23, -23,
26 | -20, -13, -11, -10, -18, 0, -13, -3, -8, 3, -6, 4, 19, -1, 12, 14, 19, 10, 13,
27 | 9, 20, 19, 21, 23, 21, 34, 21, 24, 34, 20, 31, 28, 31, 36, 24, 33, 23, 31, 27,
28 | 30, 35, 37, 26, 17, 21, 19, 27, 21, 24, 17, 23, 19, 24, 19, 4, 23, 7, 15, 17,
29 | 14, 24, 8, 15, 10, 5, 6, 11, 12, -5, 9, 9, 10, 9, 1, 5, 0, -2, -2, 1, 1, -7, 0,
30 | 3, -2, -2, -8, -8, -19, -4, -18, -6, -4, -11, -5, -15, -1, -28, -12, -19, -10,
31 | -15, -23, -19, -23, -9, -25, -22, -21, -22, -18, -23, -18, -16, -31, -28, -23,
32 | -20, -27, -15, -26, -23, -22, -23, -16, -22, -29, -20, -11, -29, -12, -17, -14,
33 | -15, -12, -16, -22, -21, -8, -11, -16, -8, -13, -12, -8, -15, -14, -9, -14, -2,
34 | -13, 3, -9, -12, 9, 3, 0, 7, -3, 0, 9, 2, 9, 7, 5, 4, 18, 12, 3, 14, 17, 16, 19,
35 | 14, 6, 21, 24, 23, 18, 24, 18, 11, 25, 25, 20, 24, 22, 5, 27, 20, 13, 25, 28,
36 | 17, 19, 11, 14, 24, 10, 23, 10, 23, 19, 16, 9, 14, 9, 14, 17, 6, 13, 8, 11, -1,
37 | 17, 9, 0, 6, 4, -1, 3, -12, -10, -4, -12, -9, -14, -5, -24, -11, -14, -21, -16,
38 | -13, -18, -30, -17, -29, -25, -21, -21, -29, -30, -15, -34, -30, -21, -29, -25,
39 | -26, -28, -36, -27, -30, -28, -25, -21, -11, -31, -18, -21, -12, -12, -12, -13,
40 | -17, -15, -17, 0, -21, -9, 3, -3, -1, -7, 2, -3, 3, 3, -9, 13, 8, 5, -3, 9, 13,
41 | 3, 18, 6, 13, 13, 15, 12, 7, 10, 14, 12, 11, 3, 12, 15, 17, 6, 7, 26, -1, 16,
42 | 19, 8, 16, 12, 15, 1, 10, 20, 7, 7, 8, 17, 1, 3, 12, 8, 7, 10, 9, -4, 1, -3, 5,
43 | 1, 0, 1, 4, 3, -6, 1, -2, -2, -10, -7, -1, -3, -4, -19, 0, -10, -13, -4, -15,
44 | -8, -4, -13, -24, -10, -8, -13, -10, -11, -24, -14, -18, -6, -9, -24, -20, -10,
45 | -12, -18, -11, -14, -13, -18, -17, -28, -8, -27, -20, -14, -15, -11, -18, -9,
46 | -16, -15, -17, -16, -6, -13, -17, 3, -25, -1, -11, -4, -6, -8, -5, -14, 0, -11,
47 | 5, -3, 0, 0, -1, -12, 0, -2, -5, 6, 5, 4, 4, -11, 2, 3, -4, 12, 1, 5, -2, 3, -3,
48 | 0, 2, 6, 7, -7, 2, 1, 6, 5, -2, 0, 2, 1, 9, 1, 9, -5, -6, 7, -2, 5, -3, 16, -1,
49 | 1, 2, 4, 10, -3, 17, -2, 6, 7, 2, 9, -2, 1, -6, 10, -5, -1, 3, -8, 11, -6, 7,
50 | -1, -7, 2, -3, -6, 1, -3, -11, -3, -3, -7, -12, -4, -7, -10, -9, -18, -6, -11,
51 | -20, -3, -12, -6, -10, -24, -9, -16, -18, -9, -18, -20, -11, -9, -15, -24, -10,
52 | -20, -27, -13, -14, -13, -19, -18, -23, -21, -17, -14, -22, -15, -21, -19, -14,
53 | -19, -11, -15, -15, -17, -17, -18, -12, -12, -12, -8, -10, -17, -9, -14, -3, -5,
54 | -10, -9, -10, -8, -10, 7, -5, -3, 0, -2, 3, -3, 6, -6, -7, -1, 3, 5, 1, 4, -12,
55 | 8, 5, -1, 11, 6, -4, 3, 6, -1, 10, 1, 7, 2, 7, 6, -6, 2, 3, 3, 1, 6, 0, -3, 5,
56 | 5, 7, 1, -3, -2, -2, 6, 2, -3, 0, 3, 4, -4, 2, -5, -1, -2, -4, 0, -8, -8, -5, 2,
57 | -9, -6, -1, -2, -9, -6, -12, 1, -10, -14, -9, -13, -10, -10, -9, -10, -7, -17,
58 | -3, -13, -7, -12, -15, -16, -10, -9, -16, -7, -11, -11, -13, -14, -9, -11, -16,
59 | -17, -12, -10, -16, -10, -11, -14, -4, -14, -17, -7, -12, -6, -16, -2, -7, -9,
60 | -10, -9, -5, -18, 1, -8, 0, 1, -9, -16, -4, -3, -6, 4, -9, -2, -10, 0, 1, -10,
61 | 3, -1, -3, -2, -4, 0, 3, -3, 0, -1, 0, 2, -4, 2, -3, -8, 0, -5, 5, -7, -4, 3,
62 | -9, 6, -10, 5, 1, -4, 2, -8, 2, -6, 2, -1, 2, -2, -6, 1, -6, -5, -3, 7, -8, -5,
63 | 2, -7, -1, -8, 3, 0, 0, 1, -6, -3, -5, -3, -3, -9, -6, 1, -7, -5, -3, -3, -6,
64 | -11, -5, -1, -8, -15, -1, -8, -8, 0, -13, -9, 0, -14, -10, -9, -9, -11, -3, -11,
65 | -14, -7, -5, -4, -12, -18, -16, -2, -19, -7, -13, -5, -12, -10, -6, -23, -4,
66 | -10, -11, -8, -10, -14, -12, -5, -14, -13, -3, -8, -16, -10, -8, -15, -6, -13,
67 | -10, -11, -8, -6, -12, -9, -8, -10, -10, -8, -4, -13, -5, -6, -11, 2, -14, -2,
68 | -6, -7, -1, -11, 1, -4, -9, 3, -3, 2, -8, -1, -2, -7, -1, 0, 4, -3, 3, -7, 2,
69 | -3, -1, 1, -3, -2, -1, 7, -4, 1, -2, -2, -4, -3, 8, -9, 1, -1, -3, 4, -6, 3, 3,
70 | 0, -1, -5, -7, -2, 1, -4, 3, 0, -9, 0, -4, 4, -5, -4, 1, -3, -4, -5, -3, -7, -8,
71 | -7, 2, -9, -8, -2, -7, -3, -10, -6, -4, -12, -6, -10, -7, -10, -10, -5, -11, -3,
72 | -7, -13, -10, -8, -6, -15, -7, -7, -11, -9, -11, -8, -10, -11, -8, -6, -12, -8,
73 | -10, -8, -6, -10, -7, -8, -7, -8, -11, -3, -4, -5, -6, -12, -8, -6, -6, -3, -6,
74 | -6, -6, -2, 1, -12, -5, -4, -6, -1, -1, -7, -5, -4, -3, 1, -6, 2, -6, 0, -5, -9,
75 | 4, -7, -2, 2, -3, 1, -3, -4, -4, -1, -2, -4, 3, -5, -2, -3, -4, -1, -4, 1, -1,
76 | -10, 1, 0, -9, 2, -3, -6, -2, 6, -5, -6, -2, -3, -3, -4, -4, -6, -1, -5, -6, -1,
77 | -2, -9, -1, -2, -5, -3, 0, -5, -7, -5, -8, -1, -7, -6, -4, -2, -6, -7, -7, -8,
78 | -5, 0, -4, -12, -4, -10, -3, -4, -11, -3, -6, -6, -6, -9, -7, -9, -7, -5, -7,
79 | -2, -10, -10, -3, -10, -5, -7, -10, -6, -12, -6, -9, -4, -7, -8, -5, -12, -6,
80 | -5, -4, -9, -4, -7, -5, -5, -8, -7, -7, -9, -7, -5, -11, -3, -6, -3, -5, -8, -4,
81 | -3, -6, -8, -6, -5, -4, -5, -6, -2, -6, -6, -2, -5, -3, -4, -5, -7, -3, -2, -2,
82 | -2, -9, 1, -3, -8, 0, -3, 0, -5, -3, -2, -1, 0, -3, -3, -4, 1, -2, -8, 3, -1,
83 | -5, 1, 0, -3, -4, -4, -1, 0, -3, 2, -6, -1, -3, -6, 2, -4, -3, -3, -1, -1, -5,
84 | -3, 0, 0, -6, -1, -4, -5, -3, 0, -1, -4, -8, -4, 0, -9, 0, -4, -5, -4, -1, -5,
85 | -6, -4, -6, -3, -6, -6, -9, -4, -4, -7, -4, -3, -10, -6, -6, -5, -5, -8, -5, -9,
86 | -5, -6, -5, -6, -9, -8, -4, -5, -10, -3, -7, -6, -6, -4, -6, -9, -4, -6, -2, -7,
87 | -2, -3, -7, -4, -7, -3, -5, -3, -4, -7, -4, -3, -3, -2, -1, -5, -4, -3, -4, -3,
88 | -3, -2, -3, -1, -3, -7, 0, -3, 2, -1, -5, -3, -1, -3, -5, 1, -8, 2, -5, 0, -1,
89 | -6, -1, -2, 2, -5, -1, -1, -2, -2, -1, -6, 0, -5, -2, 0, -5, -2, -4, 1, -5, -4,
90 | -2, 0, -5, -3, 0, -5, -1, -2, -3, -3, -4, -2, -3, -3, -5, -4, -2, -6, -3, -6,
91 | -4, -3, -6, -3, -2, -5, -5, -5, -4, -5, -3, -3, -8, -2, -6, -3, -4, -9, -1, -8,
92 | -4, -4, -7, -2, -6, -3, -5, -4, -3, -5, -3, -8, -4, -8, -5, -3, -8, -1, -7, -2,
93 | -4, -6, -5, -3, -4, -3, -4, -4, -1, -5, -2, -5, -2, -3, -4, -3, -5, -2, -4, -1,
94 | -4, -4, -1, -3, -1, -4, -4, -3, -2, -3, -1, -3, -5, -2, -1, -3, -2, 0, -4, -2,
95 | -3, -4, -2, -3, -2, -2, -1, -3, -4, -2, -3, -2, -3, 0, -5, -2, -1, -3, -1, -2,
96 | -1, -5, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -4, -2, -1, -3, -2, -2, -2, -2,
97 | -1, -4, -4, -1, -3, -2, -1, -6, -1, -4, -4, -2, -5, -1, -4, -1, -4, -4, -2, -3,
98 | -4, -2, -4, -4, -3, -4, -1, -5, -5, -3, -3, -4, -4, -5, -3, -3, -6, -4, -4, -3,
99 | -4, -4, -3, -4, -3, -5, -5, -4, -6, -2, -6, -3, -4, -4, -3, -5, -2, -5, -5, -3,
100 | -3, -4, -4, -4, -2, -3, -4, -4, -4, -2, -3, -3, -3, -3, -3, -2, -2, -4, -1, -2,
101 | -3, -1, -3, -1, -2, -3, -3, -1, -4, -3, -1, -2, -2, -1, -2, -2, -2, -3, -1, -2,
102 | -1, -1, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -2, -1, -2, -2, -1, -2,
103 | -2, -2, -1, -2, -2, -1, -2, -2, -1, -2, -2, -2, -2, -1, -2, -3, -2, -2, -2, -2,
104 | -2, -2, -2, -2, -3, -3, -2, -2, -3, -2, -3, -3, -3, -3, -2, -3, -2, -3, -3, -3,
105 | -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -2, -2, -2, -2, -2, -3, -2, -2, -3,
107 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
108 | -1, -2, -2, -2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -1, -2, -2, -2, -2, -1, -2,
109 | -2, -2, -2, -1, -1, -2, -1, -2, -1, -2, -2, -1, -1, -1, -2, -1, -2, -1, -2, -1,
110 | -1, -2, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, };
115 |
116 | #endif /* snare909_H_ */
117 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/ADSRslow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ADSR.h
3 | *
4 | * Copyright 2012 Tim Barrass.
5 | *
6 | * This file is part of Mozzi.
7 | *
8 | * Mozzi is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * Mozzi is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with Mozzi. If not, see .
20 | *
21 | */
22 |
23 | #ifndef ADSR_H_
24 | #define ADSR_H_
25 |
26 | #include "Arduino.h"
27 | //#include
28 | #include "Line.h"
29 | #include "mozzi_fixmath.h"
30 |
31 | /** A simple ADSR envelope generator.
32 | @todo Test whether using the template parameter makes any difference to speed,
33 | and rationalise which units which do and don't need them.
34 | Template objects are messy when you try to use pointers to them,
35 | you have to include the whole template shebang in the pointer handling.
36 | */
37 | template
38 | class ADSR
39 | {
40 | private:
41 |
42 | const unsigned int AUDIO_TICKS_PER_CONTROL;
43 |
44 | unsigned int phase_control_step_counter;
45 | unsigned int phase_num_control_steps;
46 |
47 | enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
48 |
49 |
50 | struct phase{
51 | byte phase_type;
52 | unsigned int control_steps;
53 | unsigned long audio_steps;
54 | Q8n0 level;
55 | }attack,decay,sustain,release,idle;
56 |
57 | phase * current_phase;
58 |
59 | // Linear audio rate transitions for envelope
60 | Line transition;
61 |
62 | inline
63 | unsigned int convertMsecToControlSteps(unsigned int msec){
64 | return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
65 | }
66 |
67 | inline
68 | void setPhase(phase * next_phase) {
69 | phase_control_step_counter = 0;
70 | phase_num_control_steps = next_phase->control_steps;
71 | transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase-> control_steps);
72 | current_phase = next_phase;
73 | }
74 |
75 |
76 |
77 | inline
78 | void checkForAndSetNextPhase(phase * next_phase) {
79 | if (++phase_control_step_counter >= phase_num_control_steps){
80 | setPhase(next_phase);
81 | }
82 | }
83 |
84 |
85 | inline
86 | void checkForAndSetIdle() {
87 | if (++phase_control_step_counter >= phase_num_control_steps){
88 | transition.set(0,0,1);
89 | current_phase = &idle;
90 | }
91 | }
92 |
93 |
94 |
95 | inline
96 | void setTime(phase * p, unsigned int msec)
97 | {
98 | p->control_steps=convertMsecToControlSteps(msec);
99 | p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
100 | }
101 |
102 |
103 | public:
104 |
105 | /** Constructor.
106 | */
107 | ADSR():AUDIO_TICKS_PER_CONTROL(AUDIO_RATE/CONTROL_UPDATE_RATE)
108 | {
109 | attack.phase_type = ATTACK;
110 | decay.phase_type = DECAY;
111 | sustain.phase_type = SUSTAIN;
112 | release.phase_type = RELEASE;
113 | idle.phase_type = IDLE;
114 | release.level = 0;
115 | }
116 |
117 |
118 | /** Updates the internal controls of the ADSR.
119 | Call this in updateControl().
120 | */
121 | void update(){ // control rate
122 |
123 | switch(current_phase->phase_type) {
124 |
125 | case ATTACK:
126 | checkForAndSetNextPhase(&decay);
127 | break;
128 |
129 | case DECAY:
130 | checkForAndSetNextPhase(&sustain);
131 | break;
132 |
133 | case SUSTAIN:
134 | checkForAndSetNextPhase(&release);
135 | break;
136 |
137 | case RELEASE:
138 | checkForAndSetIdle();
139 | break;
140 |
141 | }
142 | }
143 |
144 | /** Advances one audio step along the ADSR and returns the level.
145 | Call this in updateAudio().
146 | @return the next value, as an unsigned int.
147 | */
148 | inline
149 | unsigned int next()
150 | {
151 | return Q16n16_to_Q16n0(transition.next());
152 | }
153 |
154 |
155 |
156 | /** Start the attack phase of the ADSR. THis will restart the ADSR no matter what phase it is up to.
157 | */
158 | inline
159 | void noteOn(){
160 | setPhase(&attack);
161 | }
162 |
163 |
164 |
165 | /** Start the release phase of the ADSR.
166 | @todo fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
167 | */
168 | inline
169 | void noteOff(){
170 | setPhase(&release);
171 | }
172 |
173 |
174 |
175 |
176 |
177 | /** Set the attack level of the ADSR.
178 | @param value the attack level.
179 | */
180 | inline
181 | void setAttackLevel(byte value)
182 | {
183 | attack.level=value;
184 | }
185 |
186 |
187 |
188 | /** Set the decay level of the ADSR.
189 | @param value the decay level.
190 | */
191 | inline
192 | void setDecayLevel(byte value)
193 | {
194 | decay.level=value;
195 | }
196 |
197 |
198 | /** Set the sustain level of the ADSR.
199 | @param value the sustain level. Usually the same as the decay level,
200 | for a steady sustained note.
201 | */
202 | inline
203 | void setSustainLevel(byte value)
204 | {
205 | sustain.level=value;
206 | }
207 |
208 | /** Set the release level of the ADSR. Normally you'd make this 0,
209 | but you have the option of some other value.
210 | @param value the release level (normally 0).
211 | */
212 | inline
213 | void setReleaseLevel(byte value)
214 | {
215 | release.level=value;
216 | }
217 |
218 |
219 |
220 | /** Set the attack and decay levels of the ADSR. This assumes a conventional
221 | ADSR where the sustain continues at the same level as the decay, till the release ramps to 0.
222 | @param attack the new attack level.
223 | @param value the new sustain level.
224 | */
225 | inline
226 | void setADLevels(byte attack, byte decay)
227 | {
228 | setAttackLevel(attack);
229 | setDecayLevel(decay);
230 | setSustainLevel(decay);
231 | setReleaseLevel(0);
232 | }
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | /** Set the attack time of the ADSR in milliseconds.
241 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
242 | @param value the unsigned int attack time in milliseconds.
243 | */
244 | inline
245 | void setAttackTime(unsigned int msec)
246 | {
247 | setTime(&attack, msec);
248 | }
249 |
250 |
251 | /** Set the decay time of the ADSR in milliseconds.
252 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
253 | @param value the unsigned int decay time in milliseconds.
254 | */
255 | inline
256 | void setDecayTime(unsigned int msec)
257 | {
258 | setTime(&decay, msec);
259 | }
260 |
261 |
262 | /** Set the sustain time of the ADSR in milliseconds.
263 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
264 | The sustain phase will finish if the ADSR recieves a noteOff().
265 | @param value the unsigned int sustain time in milliseconds.
266 | */
267 | inline
268 | void setSustainTime(unsigned int msec)
269 | {
270 | setTime(&sustain, msec);
271 | }
272 |
273 |
274 |
275 | /** Set the release time of the ADSR in milliseconds.
276 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
277 | @param value the unsigned int release time in milliseconds.
278 | */
279 | inline
280 | void setReleaseTime(unsigned int msec)
281 | {
282 | setTime(&release, msec);
283 | }
284 |
285 |
286 |
287 | /** Set the attack, decay and release times of the ADSR in milliseconds.
288 | The actual times will be resolved within the resolution of CONTROL_RATE.
289 | @param attack_ms the new attack time in milliseconds.
290 | @param decay_ms the new decay time in milliseconds.
291 | @param decay_ms the new sustain time in milliseconds.
292 | @param release_ms the new release time in milliseconds.
293 | */
294 | inline
295 | void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
296 | {
297 | setAttackTime(attack_ms);
298 | setDecayTime(decay_ms);
299 | setSustainTime(sustain_ms);
300 | setReleaseTime(release_ms);
301 | }
302 |
303 |
304 | };
305 |
306 | #endif /* ADSR_H_ */
307 |
308 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/Wave.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Wave.h
3 | *
4 | * Simon Green 2013.
5 | *
6 | * Based on Mozzi "Oscil.h"
7 | */
8 |
9 | #ifndef WAVE_H_
10 | #define WAVE_H_
11 |
12 | #include "Arduino.h"
13 | #include "mozzi_fixmath.h"
14 | #include
15 |
16 | // fractional bits for oscillator index precision
17 | #define OSCIL_F_BITS 16
18 | #define OSCIL_F_BITS_AS_MULTIPLIER 65536
19 | #define NUM_TABLE_CELLS 256
20 | #define ADJUST_FOR_NUM_TABLE_CELLS 8
21 | #define UPDATE_RATE AUDIO_RATE
22 |
23 | /** Generate waveform
24 | */
25 |
26 | enum WaveType { WAVE_SAW=0, WAVE_TRI, WAVE_RECT, WAVE_NOISE };
27 |
28 | class Wave
29 | {
30 | public:
31 | /** Constructor. "Wave mywave;" makes a Wave oscillator
32 | */
33 | Wave () {
34 | phase_fractional = 0;
35 | phase_increment_fractional = 0;
36 | wavetype = WAVE_SAW;
37 | noise = 0xACE1;
38 | pulse_width = 128;
39 | }
40 |
41 | /** Increments one step along the phase.
42 | @return the next value.
43 | */
44 | inline
45 | char next()
46 | {
47 | incrementPhase();
48 |
49 | char w;
50 | //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
51 | {
52 | int n = (phase_fractional >> OSCIL_F_BITS) & (NUM_TABLE_CELLS-1);
53 | switch(wavetype) {
54 | case WAVE_SAW:
55 | w = n - 128;
56 | break;
57 | case WAVE_TRI:
58 | if (n & 0x80) // >= 128
59 | w = ((n^0xFF)<<1)-128;
60 | else
61 | w = (n<<1)-128;
62 | break;
63 | case WAVE_RECT:
64 | if (n > pulse_width)
65 | w = 127;
66 | else
67 | w = -127;
68 | break;
69 | case WAVE_NOISE:
70 | noise = (noise >> 1) ^ (-(noise & 1) & 0xB400u);
71 | w = noise>>8;
72 | break;
73 | }
74 | }
75 | return w;
76 | }
77 |
78 | /** Set the wave type
79 | */
80 | inline
81 | void setType(WaveType x)
82 | {
83 | wavetype = x;
84 | }
85 |
86 | WaveType getType() { return wavetype; }
87 |
88 | /** Set the pulse width for rectangle wave
89 | */
90 | inline
91 | void setPulseWidth(unsigned char x)
92 | {
93 | pulse_width = x;
94 | }
95 |
96 | /** Set the oscillator frequency with an unsigned int. This is faster than using a
97 | float, so it's useful when processor time is tight, but it can be tricky with
98 | low and high frequencies, depending on the size of the wavetable being used. If
99 | you're not getting the results you expect, try explicitly using a float, or try
100 | setFreq_Q24n8() or or setFreq_Q16n16().
101 | @param frequency to play the wave table.
102 | */
103 | inline
104 | void setFreq (unsigned int frequency) {
105 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
106 | {
107 | phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
140 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>3)*frequency)/(UPDATE_RATE>>6))
141 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
142 | }
143 | }
144 |
145 |
146 | /** Set the frequency using Q16n16 fixed-point number format. This is useful in
147 | combination with Q16n16_mtof(), a fast alternative to mtof(), using Q16n16
148 | fixed-point format instead of floats. Note: this should work OK with tables 2048 cells or smaller and
149 | frequencies up to 4096 Hz. Can't be used with UPDATE_RATE less than 64 Hz.
150 | @param frequency in Q16n16 fixed-point number format.
151 | */
152 | inline
153 | void setFreq_Q16n16(Q16n16 frequency)
154 | {
155 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
156 | {
157 | //phase_increment_fractional = ((frequency * (NUM_TABLE_CELLS>>7))/(UPDATE_RATE>>6)) << (F_BITS-16+1);
158 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>7)*frequency)/(UPDATE_RATE>>6))
159 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - 16 + 1);
160 |
161 | }
162 | }
163 |
164 | private:
165 | /** Increments the phase of the oscillator without returning a sample.
166 | */
167 | inline
168 | void incrementPhase()
169 | {
170 | //phase_fractional += (phase_increment_fractional | 1); // odd phase incr, attempt to reduce frequency spurs in output
171 | phase_fractional += phase_increment_fractional;
172 | }
173 |
174 | unsigned long phase_fractional;
175 | volatile unsigned long phase_increment_fractional;
176 |
177 | unsigned char pulse_width;
178 | uint16_t noise;
179 |
180 | WaveType wavetype;
181 | };
182 |
183 | #endif /* WAVE_H_ */
184 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/hihatc909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihatc909_H_
2 | #define hihatc909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihatc909_NUM_CELLS 1024
8 | #define hihatc909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihatc909_DATA [] = {1, -2, 1, -2, 2, 0, -4,
11 | 13, -18, 2, 3, 3, -1, 4, -9, 7, -5, -2, 4, -22, 23, -7, -8, -2, 7, -5, -8, 12,
12 | -4, 7, 7, -21, 12, -3, -18, 8, 1, 4, -20, 4, -5, -4, -2, 0, -2, -7, 3, -3, -3,
13 | -4, 3, -9, 12, -5, 20, 2, -25, 19, 0, 8, -12, -6, 4, 0, 15, -7, 8, 19, -9, -6,
14 | 0, -1, 0, -3, 12, -12, 7, 9, -18, 2, 4, 1, -7, -4, 7, 2, -3, 0, -3, 1, -2, -4,
15 | -4, -11, 7, -8, -2, 11, 2, 8, -1, 4, -3, -1, -2, -9, -6, -3, 3, -9, -9, 4, 1,
16 | -5, 1, 5, 0, 2, 2, -3, 9, 6, -7, 3, 5, 0, -2, 0, 7, -3, -2, -2, -3, 4, -2, 2,
17 | -3, 2, 0, -14, 4, 3, -4, 0, -5, 3, -2, -9, 3, 0, -1, -1, -5, -1, 5, -4, -6, 7,
18 | 1, -2, 2, 0, 4, -1, -7, 1, 3, 3, -1, -1, 6, 1, -2, 0, 3, -5, -9, 1, -1, -2, 0,
19 | -2, -1, 2, -1, -7, -2, -1, 1, -1, -4, 7, -5, -4, 5, 1, 1, 1, -2, 3, 2, -4, 0, 1,
20 | 3, -3, 1, -2, 0, 2, -1, 2, -2, -2, 0, -4, -3, 3, -3, 0, -1, -3, 2, -3, -6, 6,
21 | -2, 0, 1, 2, 0, -2, 2, 1, 1, -5, 1, -3, -2, -4, 3, -2, -2, 0, -2, 2, -4, 1, 4,
22 | -4, -1, 1, -1, -1, -2, 2, 1, 1, -4, 5, -4, 0, 1, -4, 3, -2, -1, 3, 0, -3, 0, -1,
23 | -1, -1, 0, -4, 3, -1, -3, 2, -1, -1, 0, 0, 1, 1, -1, 1, -2, -1, -1, -4, -1, 4,
24 | -1, -2, 1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, -3, 0, -1, -3, 2, -2, 1, 0, -2, -3,
25 | 1, -1, -3, 1, -1, -2, 1, 1, -2, -1, 0, 0, -2, 0, -1, -2, 2, -1, 0, -2, 1, -2, 0,
26 | 0, -4, 1, -1, -2, 1, 0, -2, 0, -2, 3, 0, -2, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0,
27 | 0, 0, -2, -1, 0, -1, 0, 0, -2, 0, 0, -2, -2, 0, -1, -1, 1, 0, -2, 0, 1, -1, 1,
28 | -1, 0, -1, 0, -1, -1, -1, -2, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, -1, -1, -1, 0, -1,
29 | 1, -1, -1, -1, -1, 1, -3, 0, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -2, 0, 0, 0,
30 | -2, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -2, 0, -2, -1, 0, 0, -1, 0, 0, -2, 0, -1,
31 | -1, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, -2, 0, -1, -1, 0, -1, -1, 0, -1,
32 | -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1,
33 | 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
34 | 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
35 | -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
36 | -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0,
37 | -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, -1, 0,
38 | -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0,
39 | -1, 0, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0,
40 | -1, -1, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0,
41 | -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1,
42 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1,
43 | -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, 0, -1,
44 | -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, 0,
45 | -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
46 | 0, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
47 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0,
48 | -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0,
49 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1,
50 | 0, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1,
51 | 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0,
52 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
53 | -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
54 | 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1,
55 | 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, };
56 |
57 | #endif /* hihatc909_H_ */
58 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/hihato909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihato_H_
2 | #define hihato_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihato_NUM_CELLS 2048
8 | #define hihato_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihato_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -2, 4, -4, -1, 3, 1, -8, 7, -2, -9, 3, -1,
12 | 1, -3, 0, -2, 4, -3, -4, -1, -3, 3, -2, -5, -1, 2, -1, -3, -1, 4, -2, 4, -3, -2,
13 | 4, -1, 6, 0, 8, -5, -5, 2, -2, 2, -2, -2, 7, -4, 6, -11, -6, 11, -6, 1, 4, 0,
14 | -14, 11, -6, -1, -2, -8, 5, -13, 1, 0, -8, 2, 7, 3, 1, -8, 5, 2, 2, -2, -8, 11,
15 | -1, 0, 2, -1, -3, 2, -3, -9, 2, -4, 6, -3, 1, 9, -7, -3, 2, -2, -2, -13, 2, 9,
16 | -3, 4, -3, 4, -6, 3, -1, -7, 13, -5, 3, 1, 1, -5, -13, 1, -2, 8, 0, 2, -4, 6,
17 | -1, 2, 3, -12, 4, -16, 0, -7, 2, 0, -3, 10, -6, 6, -3, -9, -2, 11, -7, -7, 11,
18 | 9, -3, 1, -1, -5, -6, -4, 2, -11, 8, 2, -4, 14, 0, -9, 7, -4, 6, -2, -10, -3, 1,
19 | 4, -12, 10, -1, 1, 0, 2, -3, 0, 5, 0, 5, -6, 0, -1, 0, -8, -3, -1, -1, 1, -3, 3,
20 | -3, 4, 8, -12, 0, -2, -7, 9, 2, 3, -6, -1, -4, 2, -7, -5, 12, -4, 7, 0, -2, 3,
21 | -1, -2, -3, 1, -3, -1, 2, -1, 2, -8, 1, 7, -8, -3, 1, 5, 4, -3, -3, 1, -3, -13,
22 | 2, 0, 1, 2, -13, 4, 4, 4, 0, 6, 2, -6, -9, -5, 12, -3, 1, -10, 10, -1, -7, 3,
23 | -2, 9, -18, 0, -5, 11, -4, 0, 6, -13, 3, -13, 14, 3, -5, 0, -3, 3, 1, -2, 1, 7,
24 | 5, -8, 6, 0, -8, 2, -3, 4, -6, 1, -14, 7, 8, -10, 7, -11, 10, -8, -13, 13, -3,
25 | 1, -2, 4, -4, -2, 0, 0, 8, -8, 2, 3, 5, -2, -1, -1, 4, 1, -13, 2, 2, -3, -5, 2,
26 | -1, 2, -2, 0, 0, 4, -6, -5, 6, -1, 2, -5, 1, 10, -8, -7, 8, -6, 6, 3, -15, 2, 0,
27 | -8, 6, 5, -4, 2, 0, -6, 5, -2, -4, 2, -3, -1, 5, -2, -2, 0, 1, 4, -8, 2, 4, 0,
28 | 0, -2, -1, -3, -1, -5, -3, 6, -18, 5, 10, -6, 10, -3, -4, 3, 1, -11, 4, -3, 5,
29 | -2, -7, 7, -5, 3, -4, 4, -3, 3, -3, -2, 6, -2, 4, -5, 5, -3, -9, -3, -4, 1, -2,
30 | 5, 2, -2, 7, -4, -5, 3, 0, 2, 2, -5, -2, 6, 5, -11, 3, -6, 2, 0, -3, 5, -4, 5,
31 | -6, 7, -11, 4, -3, -5, 1, -8, 4, -11, 17, 1, -3, -6, -2, 7, -2, -1, -5, 13, -5,
32 | -8, 1, 5, 3, -10, 5, -5, -4, 7, -7, 8, 5, 1, -2, -8, 7, -8, -2, 2, 1, 4, -5, -5,
33 | -2, 10, -10, -2, 1, -8, 0, -2, 5, 8, -4, -2, -4, 0, 4, -4, 1, -2, 5, 0, 8, -2,
34 | 1, -2, -4, 3, -6, 3, 0, -2, 2, 2, -5, -1, -7, -3, 1, 2, -6, 3, 0, -5, 6, -6, -1,
35 | 4, -2, -9, 4, 1, 3, 3, -2, 2, -1, -5, -2, 8, -1, -4, -6, 7, 2, 0, -3, 1, 2, -2,
36 | 1, -7, 5, -9, -2, 3, -4, 3, -1, -8, -3, 1, 0, -7, 5, 3, -3, -7, 2, 6, -2, 3, -7,
37 | 8, -7, 2, 1, 3, 7, -6, -1, -1, -2, -3, 5, -6, 3, 1, 0, -2, -1, -6, -5, 1, 3, 2,
38 | -4, 2, -2, -1, 0, -1, -3, -2, -5, -3, 3, 4, -1, 8, 0, -2, 0, -5, 1, 2, -3, -2,
39 | 8, -4, 0, -5, -2, -1, -3, 0, 5, 3, -8, 0, 0, 7, -7, -2, -1, -3, -3, -1, 1, 7, 5,
40 | -7, 1, 1, 4, -4, -3, 2, 5, -2, -6, 1, 1, -3, -7, -1, 3, -8, 3, -1, 2, 6, -11, 4,
41 | 1, -2, 0, -2, -3, 6, 6, -6, -1, 1, 2, 1, -1, -2, -1, -1, -5, 3, 0, -1, -1, -7,
42 | 0, -5, -1, 4, 0, 6, 0, -3, 1, 6, -5, 0, -3, -7, 6, -2, -2, 1, 5, -4, 4, -7, -4,
43 | 6, -3, 1, 0, -1, -4, -5, 2, -2, -5, 3, 1, 4, -1, 0, 1, 4, -1, -5, -1, -6, 2, -4,
44 | -1, 2, -1, 1, -4, -2, 0, 1, 2, -1, 0, 2, -2, 0, 4, 0, -4, 1, -5, 1, -2, 1, 4, 0,
45 | 2, 1, -3, -9, 0, -1, 2, -6, -2, 4, 1, -1, -4, 1, -1, 0, -3, 1, 1, 1, 0, 0, 6,
46 | -1, -8, -2, 1, 0, -2, -2, 5, 1, -3, -2, 5, 0, -3, -5, -8, 2, 1, 1, 0, 2, 2, -4,
47 | -1, -2, 2, -5, 0, 6, -4, 5, 0, -4, 1, -4, -8, 6, -3, -4, 4, -3, 3, 0, -1, -2, 1,
48 | -2, -2, 1, -2, -1, 0, 3, 1, 2, -1, -2, 0, -5, -1, 0, 7, 2, -4, 0, -2, -1, -2,
49 | -1, 0, 1, -4, -3, 5, 2, -2, 2, -4, 2, -6, -6, 6, -1, 4, -2, 0, 1, -1, -1, -1, 2,
50 | -3, 2, -5, -1, 4, -2, -1, -2, 2, -4, -5, 1, 2, 3, -1, 4, 1, -3, -2, -2, -2, 0,
51 | 2, -5, -2, 2, -1, 4, -4, -5, 3, -7, 2, 3, -3, 1, 2, 1, 1, -2, -3, 2, -4, 1, 0,
52 | -1, 4, 1, -4, 2, -3, -3, 2, -7, 0, 4, -1, -2, 1, 1, -7, 4, -1, -1, -1, -6, 3, 4,
53 | 0, -1, 1, -4, 3, -5, -3, 4, -2, 1, 0, 0, 1, 0, -2, -2, -2, -3, -2, -1, 0, 3, -1,
54 | 0, 0, -1, -1, -4, 1, 1, 1, 2, -2, 2, 0, -2, 0, -3, -2, -2, 0, 2, 1, -1, 0, -1,
55 | -2, 0, -3, 1, 1, -2, -3, 1, 0, 0, 1, -1, 1, -4, -1, 1, 3, 0, -1, 0, -1, -1, -4,
56 | 1, -1, 1, -1, -1, 3, -3, 0, -1, 2, -3, -2, 1, -3, 2, 2, -2, 0, 1, -6, 1, -1, 0,
57 | 3, -2, 0, 2, -2, -4, 1, -2, -2, -2, 2, -2, 2, 0, 0, 3, -2, 1, -2, 0, -3, 0, 1,
58 | -1, 0, -1, 2, -4, -2, 1, -4, 2, 0, -2, 1, 3, -2, 0, -1, -2, -3, -2, 1, -1, 0, 1,
59 | 4, -2, 2, -2, -4, 1, -3, -2, 1, 0, -2, 0, 0, -1, 0, -2, -2, 1, 0, 1, 0, 2, 1,
60 | -4, -2, 0, 0, -4, 1, -2, 1, 1, -4, 5, -1, -1, -2, -3, -1, 0, -3, -1, 4, -2, 0,
61 | 1, -1, 0, -2, -1, 2, -2, 1, 2, -1, 2, -1, -2, -1, -2, -5, -1, 1, 0, 0, 1, -2, 0,
62 | -1, -2, -1, 1, 0, -4, 1, 0, 1, -1, 2, -2, -4, -1, -1, 4, 0, -2, 0, -1, 0, 0, -5,
63 | 1, 1, -3, 0, 0, -2, 3, -1, -2, 3, -5, 0, 2, 0, 0, -2, -2, 1, 2, -6, 0, 1, -1, 1,
64 | -3, -1, 3, -2, -3, 2, 0, -3, 0, -2, 2, 1, -4, 2, 1, -2, -2, 1, -1, 4, -4, -4, 2,
65 | 2, -1, -1, -1, -4, 2, -3, 2, 2, -2, 0, -1, 0, 2, -3, -2, 2, 0, -4, -1, 1, -2, 2,
66 | -2, -1, 0, -2, -1, 1, -1, -1, 3, 0, -1, -1, 0, -1, -2, 1, -1, 1, -1, 2, 1, -1,
67 | -2, -1, 0, -5, 1, 0, -1, 2, 0, -2, -3, -1, 1, -2, -1, 1, 0, 1, 1, -2, 2, 0, -3,
68 | -1, 0, -2, -1, 2, -1, -1, 2, -3, -1, 2, -3, -2, -1, -1, -1, 1, -2, 1, 1, -1, 0,
69 | -2, 0, -2, 1, -1, 1, 1, 0, 0, -2, 0, -2, -1, -4, 0, 1, 0, 1, -1, 0, -1, -4, -2,
70 | -1, -1, -1, 0, 1, 2, -1, -3, 1, 0, 0, -1, -1, 0, 1, -3, 0, 2, 0, -2, -4, -1, 1,
71 | -1, -2, 2, 2, -1, -1, 0, -2, 1, -3, -3, 2, 0, -1, -1, 2, 1, -1, -2, -1, 0, -1,
72 | -2, 0, 1, -1, -2, 0, 2, -3, -1, 0, -2, 1, -1, 0, 3, -1, 0, -1, 0, -1, -1, -2,
73 | -1, 1, -1, 1, -3, -1, -1, -1, -1, -1, -1, -3, 2, -2, -1, 1, -1, 1, -2, -2, 1, 1,
74 | 0, -1, 1, -1, 0, -2, 1, 2, -3, 0, 0, -1, 0, -1, -2, 1, 0, -4, -1, 1, 0, 2, -3,
75 | -1, 1, -1, -2, 1, -1, 2, -1, -2, 1, -2, 0, -2, 0, 1, -2, -1, 0, 2, 0, -2, -1, 0,
76 | -1, -2, -1, 1, 3, -3, -2, 0, 0, -1, 0, 0, -1, -1, -3, -1, 1, 0, -2, 0, -1, 0,
77 | -2, 0, 0, 1, -1, 0, 1, -1, 3, -2, 0, 0, -3, 0, 2, -2, -1, 2, -1, -1, -1, -2, 0,
78 | -2, -2, 0, -1, -3, 0, 0, 0, 0, -3, 0, -1, 0, 0, 0, 1, 1, -1, -3, 0, 0, 0, -1,
79 | -3, 0, 1, -2, -1, 2, -2, -1, 0, -4, 1, 0, -2, 1, -1, 1, -1, 0, 0, 0, -1, -1, 0,
80 | -1, 1, -1, -1, 1, -1, -1, -2, -1, -1, -2, 0, 1, 0, -1, 1, -1, 0, 1, -1, -2, 1,
81 | 0, -2, 3, 0, 0, 0, -2, 0, -1, -1, -1, 0, -1, -1, -2, -1, 0, -2, -1, 0, -1, 0, 0,
82 | 0, 1, -1, 0, 0, -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, 0, -2, -1, 0, -1, -2, -1,
83 | 2, -1, -1, -1, -1, 1, -2, 1, -1, 0, 1, 0, -2, 0, 0, -3, 2, -2, -1, 0, -1, 0, 1,
84 | 1, -3, 1, -1, -2, 1, -3, 0, 1, -1, 0, 0, -2, 1, 0, -2, 0, -1, -1, 0, -2, -1, -1,
85 | -1, 0, -1, -1, 0, 0, -2, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -3, 1, -1, 0,
86 | -1, 0, 0, 0, 0, -2, -1, -1, 1, -3, -1, 2, -1, 0, -1, 0, 0, -2, -1, 1, -1, 0, -1,
87 | -2, 1, -1, -2, 0, 0, -1, -2, -2, 1, 1, -1, -2, 1, 0, -2, 0, 0, 0, 0, -2, 0, 1,
88 | -1, 0, -1, 0, -2, -1, -1, 1, 0, -1, 0, -1, 0, -1, -2, 1, -1, -2, 1, 0, 1, 0, -1,
89 | 0, 0, -2, -1, 1, -1, 0, -1, 0, 0, -1, -1, -1, 1, -3, -1, 0, 0, 0, -1, 1, 1, 0,
90 | -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -3, -2, 0, 0, 0, -1, 0, 1, -2, -2, -1,
91 | 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -2, 1, -2, 0, 1, -1, 1, -1, 0, -1, 0,
92 | -1, 0, 0, -1, 1, -1, 1, 0, -1, -2, 0, 0, -3, 0, -1, 1, -1, -2, 0, -1, 0, -1, -1,
93 | 0, -1, 0, 0, 1, -1, 1, -1, -2, 1, -2, 0, 0, -1, 0, 0, -1, -1, 1, -2, -2, 0, -1,
94 | 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, -1,
95 | 0, -1, 0, 0, -1, -2, 0, -1, -1, 0, -1, 1, 0, -1, 0, -1, -2, 0, 0, -1, 0, -1, -1,
96 | 0, -1, -1, -2, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, -1, -1, -1,
97 | -1, 0, 1, -1, -2, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0,
98 | -2, 0, -1, 0, 1, -2, -1, -1, 0, 0, -3, 1, 0, -1, 0, 0, 0, -2, 0, -2, 1, -1, -2,
99 | 1, 0, 0, -2, 0, 1, -2, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0,
100 | 1, -1, 0, 0, -1, 0, -2, 0, -1, 0, -1, 1, 0, -2, -2, 0, 0, -3, -1, 0, -1, 0, 0,
101 | -1, 0, };
102 |
103 | #endif /* hihato_H_ */
104 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/kick909.h:
--------------------------------------------------------------------------------
1 | #ifndef kick909_H_
2 | #define kick909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define kick909_NUM_CELLS 2048
8 | #define kick909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) kick909_DATA [] = {-1, 0, -1, 0, -1, 0, 0,
11 | 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1,
12 | 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1,
13 | -1, -1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 8, 9, 9, 10, 14, 17,
14 | 20, 24, 29, 50, 57, 49, 53, 54, 53, 53, 54, 53, 53, 53, 52, 51, 50, 48, 46, 45,
15 | 44, 42, 40, 38, 35, 33, 30, 26, 23, 19, 15, 12, 8, 5, 1, -2, -6, -9, -11, -13,
16 | -16, -17, -18, -20, -22, -23, -24, -24, -25, -26, -27, -27, -27, -27, -28, -28,
17 | -28, -28, -27, -27, -27, -26, -25, -24, -24, -23, -21, -20, -19, -17, -15, -13,
18 | -12, -10, -8, -5, -3, -1, 1, 3, 6, 8, 10, 12, 14, 17, 19, 21, 24, 25, 28, 30,
19 | 32, 33, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41,
20 | 40, 40, 39, 38, 38, 37, 37, 36, 36, 35, 34, 33, 32, 32, 30, 29, 28, 26, 24, 22,
21 | 20, 18, 17, 15, 13, 11, 9, 8, 6, 5, 3, 1, -1, -2, -4, -5, -7, -8, -9, -11, -13,
22 | -14, -16, -17, -18, -19, -20, -21, -22, -24, -25, -25, -26, -27, -27, -28, -29,
23 | -29, -30, -30, -30, -30, -31, -31, -31, -31, -31, -32, -31, -32, -32, -32, -32,
24 | -32, -32, -32, -32, -32, -32, -32, -32, -31, -31, -31, -30, -30, -30, -29, -28,
25 | -28, -27, -27, -26, -26, -25, -25, -24, -23, -22, -21, -20, -20, -19, -18, -17,
26 | -16, -15, -14, -13, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0, 1, 2, 3, 4, 6,
27 | 6, 8, 9, 10, 11, 12, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 27,
28 | 28, 29, 30, 30, 31, 32, 33, 33, 34, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36,
29 | 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36,
30 | 36, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28,
31 | 28, 27, 27, 26, 25, 25, 24, 23, 23, 21, 21, 20, 19, 18, 17, 16, 15, 14, 12, 11,
32 | 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9,
33 | -10, -11, -12, -12, -13, -14, -15, -16, -16, -17, -18, -19, -20, -20, -21, -22,
34 | -23, -23, -24, -25, -25, -26, -26, -27, -27, -28, -29, -29, -29, -30, -30, -31,
35 | -31, -32, -32, -32, -32, -33, -33, -33, -33, -33, -33, -34, -34, -34, -34, -34,
36 | -34, -34, -34, -34, -34, -34, -34, -34, -35, -35, -35, -35, -35, -35, -35, -35,
37 | -35, -35, -35, -35, -34, -34, -34, -34, -33, -33, -33, -33, -33, -32, -32, -32,
38 | -32, -31, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27,
39 | -27, -26, -26, -25, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18,
40 | -17, -17, -16, -15, -14, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -5,
41 | -5, -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13,
42 | 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28,
43 | 29, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 32, 33, 33, 34, 34, 34, 34,
44 | 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
45 | 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32,
46 | 32, 31, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25,
47 | 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 13, 12, 11, 11,
48 | 10, 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, 0, -1, -1, -2, -3, -4, -5, -5, -6, -7, -8, -9,
49 | -9, -10, -11, -12, -12, -13, -14, -14, -15, -16, -17, -17, -18, -19, -19, -20,
50 | -21, -21, -22, -23, -23, -24, -24, -25, -26, -26, -27, -27, -28, -28, -29, -30,
51 | -30, -30, -31, -31, -32, -32, -32, -33, -33, -33, -34, -34, -34, -34, -34, -35,
52 | -35, -35, -35, -35, -35, -35, -35, -36, -36, -36, -36, -36, -36, -36, -36, -36,
53 | -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
54 | -35, -35, -35, -35, -35, -34, -34, -34, -34, -34, -33, -33, -33, -33, -32, -32,
55 | -32, -32, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -27, -27,
56 | -26, -26, -26, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17,
57 | -17, -16, -15, -15, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -6, -5,
58 | -4, -3, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13,
59 | 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28,
60 | 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 32,
61 | 33, 33, 34, 33, 33, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32, 32, 32, 31,
63 | 31, 31, 31, 30, 30, 30, 29, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25, 25,
64 | 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 15, 14, 13, 12, 12, 11,
65 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0, -1, -2, -3, -3, -4, -5, -6, -7, -7, -8, -9,
66 | -10, -10, -11, -12, -12, -13, -14, -14, -15, -15, -16, -17, -17, -18, -18, -19,
67 | -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -25, -26, -26,
68 | -27, -27, -27, -27, -28, -28, -28, -28, -29, -29, -29, -29, -29, -29, -29, -29,
69 | -29, -29, -29, -30, -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, -29, -29,
70 | -29, -29, -29, -29, -29, -29, -29, -29, -29, -28, -28, -28, -28, -28, -28, -28,
71 | -28, -27, -27, -27, -27, -27, -26, -26, -26, -26, -26, -25, -25, -25, -25, -25,
72 | -24, -24, -24, -24, -23, -23, -23, -23, -23, -22, -22, -22, -21, -21, -21, -21,
73 | -20, -20, -20, -19, -19, -19, -18, -18, -18, -17, -17, -17, -16, -16, -15, -15,
74 | -15, -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -10, -10, -10, -9, -9,
75 | -8, -8, -8, -7, -7, -7, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -1,
76 | -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6,
77 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
79 | 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
80 | 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -3,
81 | -4, -4, -4, -4, -4, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7,
82 | -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10,
83 | -10, -10, -10, -10, -10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
84 | -11, -11, -11, -11, -11, -11, -11, -11, -12, -11, -11, -11, -11, -11, -11, -11,
85 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
86 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -10, -10,
87 | -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -9,
88 | -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8,
89 | -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6,
90 | -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4,
91 | -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
92 | -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
93 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
94 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
95 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
96 | -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
97 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4,
98 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
99 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
100 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
101 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
102 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
103 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
104 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
105 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
107 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
108 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2,
109 | -3, -2, -3, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
110 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
115 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
116 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
117 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, };
118 |
119 | #endif /* kick909_H_ */
120 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_3_DelayLPF/snare909.h:
--------------------------------------------------------------------------------
1 | #ifndef snare909_H_
2 | #define snare909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define snare909_NUM_CELLS 2048
8 | #define snare909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) snare909_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
12 | -1, 0, 0, -2, -2, 0, -2, -1, -3, -2, 4, -3, -7, -2, 1, -7, 6, -3, -2, -6, -8, 8,
13 | -6, 0, -3, -1, -7, 0, -4, -11, -2, 3, -7, -9, 19, -1, 33, 43, 22, 60, 57, 49,
14 | 58, 55, 68, 65, 62, 60, 60, 69, 64, 61, 57, 58, 43, 50, 39, 37, 27, 17, 21, 15,
15 | 11, -2, -6, -12, -6, -23, -7, -22, -30, -22, -25, -27, -26, -31, -31, -21, -18,
16 | -8, -18, -4, 3, 1, 8, 12, 12, 19, 14, 42, 28, 21, 43, 45, 49, 46, 46, 43, 55,
17 | 44, 47, 44, 30, 46, 34, 38, 42, 24, 34, 27, 45, 23, 28, 38, 35, 36, 23, 30, 28,
18 | 40, 23, 32, 35, 29, 31, 31, 30, 28, 30, 30, 12, 13, 18, 8, 7, -2, 5, 6, -1, -7,
19 | -5, -9, -10, -11, -13, -17, -22, -25, -24, -24, -33, -28, -24, -30, -20, -28,
20 | -41, -28, -29, -26, -27, -37, -26, -29, -32, -20, -31, -26, -15, -20, -9, -14,
21 | -15, -12, -6, -7, -3, 8, 6, 15, 16, 12, 21, 30, 25, 35, 35, 29, 46, 44, 38, 49,
22 | 34, 48, 44, 44, 55, 38, 50, 41, 52, 43, 43, 53, 44, 56, 46, 39, 41, 44, 42, 42,
23 | 44, 41, 43, 35, 38, 39, 26, 30, 36, 31, 27, 26, 21, 20, 15, 9, 8, -2, 0, 10,
24 | -10, -13, -3, -17, -14, -14, -18, -7, -30, -24, -32, -26, -28, -37, -23, -35,
25 | -25, -40, -31, -34, -46, -30, -42, -38, -26, -37, -33, -32, -27, -32, -23, -23,
26 | -20, -13, -11, -10, -18, 0, -13, -3, -8, 3, -6, 4, 19, -1, 12, 14, 19, 10, 13,
27 | 9, 20, 19, 21, 23, 21, 34, 21, 24, 34, 20, 31, 28, 31, 36, 24, 33, 23, 31, 27,
28 | 30, 35, 37, 26, 17, 21, 19, 27, 21, 24, 17, 23, 19, 24, 19, 4, 23, 7, 15, 17,
29 | 14, 24, 8, 15, 10, 5, 6, 11, 12, -5, 9, 9, 10, 9, 1, 5, 0, -2, -2, 1, 1, -7, 0,
30 | 3, -2, -2, -8, -8, -19, -4, -18, -6, -4, -11, -5, -15, -1, -28, -12, -19, -10,
31 | -15, -23, -19, -23, -9, -25, -22, -21, -22, -18, -23, -18, -16, -31, -28, -23,
32 | -20, -27, -15, -26, -23, -22, -23, -16, -22, -29, -20, -11, -29, -12, -17, -14,
33 | -15, -12, -16, -22, -21, -8, -11, -16, -8, -13, -12, -8, -15, -14, -9, -14, -2,
34 | -13, 3, -9, -12, 9, 3, 0, 7, -3, 0, 9, 2, 9, 7, 5, 4, 18, 12, 3, 14, 17, 16, 19,
35 | 14, 6, 21, 24, 23, 18, 24, 18, 11, 25, 25, 20, 24, 22, 5, 27, 20, 13, 25, 28,
36 | 17, 19, 11, 14, 24, 10, 23, 10, 23, 19, 16, 9, 14, 9, 14, 17, 6, 13, 8, 11, -1,
37 | 17, 9, 0, 6, 4, -1, 3, -12, -10, -4, -12, -9, -14, -5, -24, -11, -14, -21, -16,
38 | -13, -18, -30, -17, -29, -25, -21, -21, -29, -30, -15, -34, -30, -21, -29, -25,
39 | -26, -28, -36, -27, -30, -28, -25, -21, -11, -31, -18, -21, -12, -12, -12, -13,
40 | -17, -15, -17, 0, -21, -9, 3, -3, -1, -7, 2, -3, 3, 3, -9, 13, 8, 5, -3, 9, 13,
41 | 3, 18, 6, 13, 13, 15, 12, 7, 10, 14, 12, 11, 3, 12, 15, 17, 6, 7, 26, -1, 16,
42 | 19, 8, 16, 12, 15, 1, 10, 20, 7, 7, 8, 17, 1, 3, 12, 8, 7, 10, 9, -4, 1, -3, 5,
43 | 1, 0, 1, 4, 3, -6, 1, -2, -2, -10, -7, -1, -3, -4, -19, 0, -10, -13, -4, -15,
44 | -8, -4, -13, -24, -10, -8, -13, -10, -11, -24, -14, -18, -6, -9, -24, -20, -10,
45 | -12, -18, -11, -14, -13, -18, -17, -28, -8, -27, -20, -14, -15, -11, -18, -9,
46 | -16, -15, -17, -16, -6, -13, -17, 3, -25, -1, -11, -4, -6, -8, -5, -14, 0, -11,
47 | 5, -3, 0, 0, -1, -12, 0, -2, -5, 6, 5, 4, 4, -11, 2, 3, -4, 12, 1, 5, -2, 3, -3,
48 | 0, 2, 6, 7, -7, 2, 1, 6, 5, -2, 0, 2, 1, 9, 1, 9, -5, -6, 7, -2, 5, -3, 16, -1,
49 | 1, 2, 4, 10, -3, 17, -2, 6, 7, 2, 9, -2, 1, -6, 10, -5, -1, 3, -8, 11, -6, 7,
50 | -1, -7, 2, -3, -6, 1, -3, -11, -3, -3, -7, -12, -4, -7, -10, -9, -18, -6, -11,
51 | -20, -3, -12, -6, -10, -24, -9, -16, -18, -9, -18, -20, -11, -9, -15, -24, -10,
52 | -20, -27, -13, -14, -13, -19, -18, -23, -21, -17, -14, -22, -15, -21, -19, -14,
53 | -19, -11, -15, -15, -17, -17, -18, -12, -12, -12, -8, -10, -17, -9, -14, -3, -5,
54 | -10, -9, -10, -8, -10, 7, -5, -3, 0, -2, 3, -3, 6, -6, -7, -1, 3, 5, 1, 4, -12,
55 | 8, 5, -1, 11, 6, -4, 3, 6, -1, 10, 1, 7, 2, 7, 6, -6, 2, 3, 3, 1, 6, 0, -3, 5,
56 | 5, 7, 1, -3, -2, -2, 6, 2, -3, 0, 3, 4, -4, 2, -5, -1, -2, -4, 0, -8, -8, -5, 2,
57 | -9, -6, -1, -2, -9, -6, -12, 1, -10, -14, -9, -13, -10, -10, -9, -10, -7, -17,
58 | -3, -13, -7, -12, -15, -16, -10, -9, -16, -7, -11, -11, -13, -14, -9, -11, -16,
59 | -17, -12, -10, -16, -10, -11, -14, -4, -14, -17, -7, -12, -6, -16, -2, -7, -9,
60 | -10, -9, -5, -18, 1, -8, 0, 1, -9, -16, -4, -3, -6, 4, -9, -2, -10, 0, 1, -10,
61 | 3, -1, -3, -2, -4, 0, 3, -3, 0, -1, 0, 2, -4, 2, -3, -8, 0, -5, 5, -7, -4, 3,
62 | -9, 6, -10, 5, 1, -4, 2, -8, 2, -6, 2, -1, 2, -2, -6, 1, -6, -5, -3, 7, -8, -5,
63 | 2, -7, -1, -8, 3, 0, 0, 1, -6, -3, -5, -3, -3, -9, -6, 1, -7, -5, -3, -3, -6,
64 | -11, -5, -1, -8, -15, -1, -8, -8, 0, -13, -9, 0, -14, -10, -9, -9, -11, -3, -11,
65 | -14, -7, -5, -4, -12, -18, -16, -2, -19, -7, -13, -5, -12, -10, -6, -23, -4,
66 | -10, -11, -8, -10, -14, -12, -5, -14, -13, -3, -8, -16, -10, -8, -15, -6, -13,
67 | -10, -11, -8, -6, -12, -9, -8, -10, -10, -8, -4, -13, -5, -6, -11, 2, -14, -2,
68 | -6, -7, -1, -11, 1, -4, -9, 3, -3, 2, -8, -1, -2, -7, -1, 0, 4, -3, 3, -7, 2,
69 | -3, -1, 1, -3, -2, -1, 7, -4, 1, -2, -2, -4, -3, 8, -9, 1, -1, -3, 4, -6, 3, 3,
70 | 0, -1, -5, -7, -2, 1, -4, 3, 0, -9, 0, -4, 4, -5, -4, 1, -3, -4, -5, -3, -7, -8,
71 | -7, 2, -9, -8, -2, -7, -3, -10, -6, -4, -12, -6, -10, -7, -10, -10, -5, -11, -3,
72 | -7, -13, -10, -8, -6, -15, -7, -7, -11, -9, -11, -8, -10, -11, -8, -6, -12, -8,
73 | -10, -8, -6, -10, -7, -8, -7, -8, -11, -3, -4, -5, -6, -12, -8, -6, -6, -3, -6,
74 | -6, -6, -2, 1, -12, -5, -4, -6, -1, -1, -7, -5, -4, -3, 1, -6, 2, -6, 0, -5, -9,
75 | 4, -7, -2, 2, -3, 1, -3, -4, -4, -1, -2, -4, 3, -5, -2, -3, -4, -1, -4, 1, -1,
76 | -10, 1, 0, -9, 2, -3, -6, -2, 6, -5, -6, -2, -3, -3, -4, -4, -6, -1, -5, -6, -1,
77 | -2, -9, -1, -2, -5, -3, 0, -5, -7, -5, -8, -1, -7, -6, -4, -2, -6, -7, -7, -8,
78 | -5, 0, -4, -12, -4, -10, -3, -4, -11, -3, -6, -6, -6, -9, -7, -9, -7, -5, -7,
79 | -2, -10, -10, -3, -10, -5, -7, -10, -6, -12, -6, -9, -4, -7, -8, -5, -12, -6,
80 | -5, -4, -9, -4, -7, -5, -5, -8, -7, -7, -9, -7, -5, -11, -3, -6, -3, -5, -8, -4,
81 | -3, -6, -8, -6, -5, -4, -5, -6, -2, -6, -6, -2, -5, -3, -4, -5, -7, -3, -2, -2,
82 | -2, -9, 1, -3, -8, 0, -3, 0, -5, -3, -2, -1, 0, -3, -3, -4, 1, -2, -8, 3, -1,
83 | -5, 1, 0, -3, -4, -4, -1, 0, -3, 2, -6, -1, -3, -6, 2, -4, -3, -3, -1, -1, -5,
84 | -3, 0, 0, -6, -1, -4, -5, -3, 0, -1, -4, -8, -4, 0, -9, 0, -4, -5, -4, -1, -5,
85 | -6, -4, -6, -3, -6, -6, -9, -4, -4, -7, -4, -3, -10, -6, -6, -5, -5, -8, -5, -9,
86 | -5, -6, -5, -6, -9, -8, -4, -5, -10, -3, -7, -6, -6, -4, -6, -9, -4, -6, -2, -7,
87 | -2, -3, -7, -4, -7, -3, -5, -3, -4, -7, -4, -3, -3, -2, -1, -5, -4, -3, -4, -3,
88 | -3, -2, -3, -1, -3, -7, 0, -3, 2, -1, -5, -3, -1, -3, -5, 1, -8, 2, -5, 0, -1,
89 | -6, -1, -2, 2, -5, -1, -1, -2, -2, -1, -6, 0, -5, -2, 0, -5, -2, -4, 1, -5, -4,
90 | -2, 0, -5, -3, 0, -5, -1, -2, -3, -3, -4, -2, -3, -3, -5, -4, -2, -6, -3, -6,
91 | -4, -3, -6, -3, -2, -5, -5, -5, -4, -5, -3, -3, -8, -2, -6, -3, -4, -9, -1, -8,
92 | -4, -4, -7, -2, -6, -3, -5, -4, -3, -5, -3, -8, -4, -8, -5, -3, -8, -1, -7, -2,
93 | -4, -6, -5, -3, -4, -3, -4, -4, -1, -5, -2, -5, -2, -3, -4, -3, -5, -2, -4, -1,
94 | -4, -4, -1, -3, -1, -4, -4, -3, -2, -3, -1, -3, -5, -2, -1, -3, -2, 0, -4, -2,
95 | -3, -4, -2, -3, -2, -2, -1, -3, -4, -2, -3, -2, -3, 0, -5, -2, -1, -3, -1, -2,
96 | -1, -5, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -4, -2, -1, -3, -2, -2, -2, -2,
97 | -1, -4, -4, -1, -3, -2, -1, -6, -1, -4, -4, -2, -5, -1, -4, -1, -4, -4, -2, -3,
98 | -4, -2, -4, -4, -3, -4, -1, -5, -5, -3, -3, -4, -4, -5, -3, -3, -6, -4, -4, -3,
99 | -4, -4, -3, -4, -3, -5, -5, -4, -6, -2, -6, -3, -4, -4, -3, -5, -2, -5, -5, -3,
100 | -3, -4, -4, -4, -2, -3, -4, -4, -4, -2, -3, -3, -3, -3, -3, -2, -2, -4, -1, -2,
101 | -3, -1, -3, -1, -2, -3, -3, -1, -4, -3, -1, -2, -2, -1, -2, -2, -2, -3, -1, -2,
102 | -1, -1, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -2, -1, -2, -2, -1, -2,
103 | -2, -2, -1, -2, -2, -1, -2, -2, -1, -2, -2, -2, -2, -1, -2, -3, -2, -2, -2, -2,
104 | -2, -2, -2, -2, -3, -3, -2, -2, -3, -2, -3, -3, -3, -3, -2, -3, -2, -3, -3, -3,
105 | -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -2, -2, -2, -2, -2, -3, -2, -2, -3,
107 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
108 | -1, -2, -2, -2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -1, -2, -2, -2, -2, -1, -2,
109 | -2, -2, -2, -1, -1, -2, -1, -2, -1, -2, -2, -1, -1, -1, -2, -1, -2, -1, -2, -1,
110 | -1, -2, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, };
115 |
116 | #endif /* snare909_H_ */
117 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_5_DelayNoLPF/ADSRslow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ADSRslow.h
3 | *
4 | * Copyright 2012 Tim Barrass.
5 | * - tiny modification by Dave Green in setPhase for calling at Control Rate
6 |
7 | * This file is part of Mozzi.
8 | *
9 | * Mozzi is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * Mozzi is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with Mozzi. If not, see .
21 | *
22 | */
23 |
24 | #ifndef ADSR_H_
25 | #define ADSR_H_
26 |
27 | #include "Arduino.h"
28 | //#include
29 | #include "Line.h"
30 | #include "mozzi_fixmath.h"
31 |
32 | /** A simple ADSR envelope generator.
33 | @todo Test whether using the template parameter makes any difference to speed,
34 | and rationalise which units which do and don't need them.
35 | Template objects are messy when you try to use pointers to them,
36 | you have to include the whole template shebang in the pointer handling.
37 | */
38 | template
39 | class ADSR
40 | {
41 | private:
42 |
43 | const unsigned int AUDIO_TICKS_PER_CONTROL;
44 |
45 | unsigned int phase_control_step_counter;
46 | unsigned int phase_num_control_steps;
47 |
48 | enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
49 |
50 |
51 | struct phase{
52 | byte phase_type;
53 | unsigned int control_steps;
54 | unsigned long audio_steps;
55 | Q8n0 level;
56 | }attack,decay,sustain,release,idle;
57 |
58 | phase * current_phase;
59 |
60 | // Linear audio rate transitions for envelope
61 | Line transition;
62 |
63 | inline
64 | unsigned int convertMsecToControlSteps(unsigned int msec){
65 | return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
66 | }
67 |
68 | inline
69 | void setPhase(phase * next_phase) {
70 | phase_control_step_counter = 0;
71 | phase_num_control_steps = next_phase->control_steps;
72 | transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase-> control_steps);
73 | // Dave G: divide by control_steps rather than audio_steps to call at Control Rate instead!
74 | current_phase = next_phase;
75 | }
76 |
77 |
78 |
79 | inline
80 | void checkForAndSetNextPhase(phase * next_phase) {
81 | if (++phase_control_step_counter >= phase_num_control_steps){
82 | setPhase(next_phase);
83 | }
84 | }
85 |
86 |
87 | inline
88 | void checkForAndSetIdle() {
89 | if (++phase_control_step_counter >= phase_num_control_steps){
90 | transition.set(0,0,1);
91 | current_phase = &idle;
92 | }
93 | }
94 |
95 |
96 |
97 | inline
98 | void setTime(phase * p, unsigned int msec)
99 | {
100 | p->control_steps=convertMsecToControlSteps(msec);
101 | p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
102 | }
103 |
104 |
105 | public:
106 |
107 | /** Constructor.
108 | */
109 | ADSR():AUDIO_TICKS_PER_CONTROL(AUDIO_RATE/CONTROL_UPDATE_RATE)
110 | {
111 | attack.phase_type = ATTACK;
112 | decay.phase_type = DECAY;
113 | sustain.phase_type = SUSTAIN;
114 | release.phase_type = RELEASE;
115 | idle.phase_type = IDLE;
116 | release.level = 0;
117 | }
118 |
119 |
120 | /** Updates the internal controls of the ADSR.
121 | Call this in updateControl().
122 | */
123 | void update(){ // control rate
124 |
125 | switch(current_phase->phase_type) {
126 |
127 | case ATTACK:
128 | checkForAndSetNextPhase(&decay);
129 | break;
130 |
131 | case DECAY:
132 | checkForAndSetNextPhase(&sustain);
133 | break;
134 |
135 | case SUSTAIN:
136 | checkForAndSetNextPhase(&release);
137 | break;
138 |
139 | case RELEASE:
140 | checkForAndSetIdle();
141 | break;
142 |
143 | }
144 | }
145 |
146 | /** Advances one audio step along the ADSR and returns the level.
147 | Call this in updateAudio().
148 | @return the next value, as an unsigned int.
149 | */
150 | inline
151 | unsigned int next()
152 | {
153 | return Q16n16_to_Q16n0(transition.next());
154 | }
155 |
156 |
157 |
158 | /** Start the attack phase of the ADSR. THis will restart the ADSR no matter what phase it is up to.
159 | */
160 | inline
161 | void noteOn(){
162 | setPhase(&attack);
163 | }
164 |
165 |
166 |
167 | /** Start the release phase of the ADSR.
168 | @todo fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
169 | */
170 | inline
171 | void noteOff(){
172 | setPhase(&release);
173 | }
174 |
175 |
176 |
177 |
178 |
179 | /** Set the attack level of the ADSR.
180 | @param value the attack level.
181 | */
182 | inline
183 | void setAttackLevel(byte value)
184 | {
185 | attack.level=value;
186 | }
187 |
188 |
189 |
190 | /** Set the decay level of the ADSR.
191 | @param value the decay level.
192 | */
193 | inline
194 | void setDecayLevel(byte value)
195 | {
196 | decay.level=value;
197 | }
198 |
199 |
200 | /** Set the sustain level of the ADSR.
201 | @param value the sustain level. Usually the same as the decay level,
202 | for a steady sustained note.
203 | */
204 | inline
205 | void setSustainLevel(byte value)
206 | {
207 | sustain.level=value;
208 | }
209 |
210 | /** Set the release level of the ADSR. Normally you'd make this 0,
211 | but you have the option of some other value.
212 | @param value the release level (normally 0).
213 | */
214 | inline
215 | void setReleaseLevel(byte value)
216 | {
217 | release.level=value;
218 | }
219 |
220 |
221 |
222 | /** Set the attack and decay levels of the ADSR. This assumes a conventional
223 | ADSR where the sustain continues at the same level as the decay, till the release ramps to 0.
224 | @param attack the new attack level.
225 | @param value the new sustain level.
226 | */
227 | inline
228 | void setADLevels(byte attack, byte decay)
229 | {
230 | setAttackLevel(attack);
231 | setDecayLevel(decay);
232 | setSustainLevel(decay);
233 | setReleaseLevel(0);
234 | }
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 | /** Set the attack time of the ADSR in milliseconds.
243 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
244 | @param value the unsigned int attack time in milliseconds.
245 | */
246 | inline
247 | void setAttackTime(unsigned int msec)
248 | {
249 | setTime(&attack, msec);
250 | }
251 |
252 |
253 | /** Set the decay time of the ADSR in milliseconds.
254 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
255 | @param value the unsigned int decay time in milliseconds.
256 | */
257 | inline
258 | void setDecayTime(unsigned int msec)
259 | {
260 | setTime(&decay, msec);
261 | }
262 |
263 |
264 | /** Set the sustain time of the ADSR in milliseconds.
265 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
266 | The sustain phase will finish if the ADSR recieves a noteOff().
267 | @param value the unsigned int sustain time in milliseconds.
268 | */
269 | inline
270 | void setSustainTime(unsigned int msec)
271 | {
272 | setTime(&sustain, msec);
273 | }
274 |
275 |
276 |
277 | /** Set the release time of the ADSR in milliseconds.
278 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
279 | @param value the unsigned int release time in milliseconds.
280 | */
281 | inline
282 | void setReleaseTime(unsigned int msec)
283 | {
284 | setTime(&release, msec);
285 | }
286 |
287 |
288 |
289 | /** Set the attack, decay and release times of the ADSR in milliseconds.
290 | The actual times will be resolved within the resolution of CONTROL_RATE.
291 | @param attack_ms the new attack time in milliseconds.
292 | @param decay_ms the new decay time in milliseconds.
293 | @param decay_ms the new sustain time in milliseconds.
294 | @param release_ms the new release time in milliseconds.
295 | */
296 | inline
297 | void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
298 | {
299 | setAttackTime(attack_ms);
300 | setDecayTime(decay_ms);
301 | setSustainTime(sustain_ms);
302 | setReleaseTime(release_ms);
303 | }
304 |
305 |
306 | };
307 |
308 | #endif /* ADSR_H_ */
309 |
310 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_5_DelayNoLPF/hihatc909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihatc909_H_
2 | #define hihatc909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihatc909_NUM_CELLS 1024
8 | #define hihatc909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihatc909_DATA [] = {1, -2, 1, -2, 2, 0, -4,
11 | 13, -18, 2, 3, 3, -1, 4, -9, 7, -5, -2, 4, -22, 23, -7, -8, -2, 7, -5, -8, 12,
12 | -4, 7, 7, -21, 12, -3, -18, 8, 1, 4, -20, 4, -5, -4, -2, 0, -2, -7, 3, -3, -3,
13 | -4, 3, -9, 12, -5, 20, 2, -25, 19, 0, 8, -12, -6, 4, 0, 15, -7, 8, 19, -9, -6,
14 | 0, -1, 0, -3, 12, -12, 7, 9, -18, 2, 4, 1, -7, -4, 7, 2, -3, 0, -3, 1, -2, -4,
15 | -4, -11, 7, -8, -2, 11, 2, 8, -1, 4, -3, -1, -2, -9, -6, -3, 3, -9, -9, 4, 1,
16 | -5, 1, 5, 0, 2, 2, -3, 9, 6, -7, 3, 5, 0, -2, 0, 7, -3, -2, -2, -3, 4, -2, 2,
17 | -3, 2, 0, -14, 4, 3, -4, 0, -5, 3, -2, -9, 3, 0, -1, -1, -5, -1, 5, -4, -6, 7,
18 | 1, -2, 2, 0, 4, -1, -7, 1, 3, 3, -1, -1, 6, 1, -2, 0, 3, -5, -9, 1, -1, -2, 0,
19 | -2, -1, 2, -1, -7, -2, -1, 1, -1, -4, 7, -5, -4, 5, 1, 1, 1, -2, 3, 2, -4, 0, 1,
20 | 3, -3, 1, -2, 0, 2, -1, 2, -2, -2, 0, -4, -3, 3, -3, 0, -1, -3, 2, -3, -6, 6,
21 | -2, 0, 1, 2, 0, -2, 2, 1, 1, -5, 1, -3, -2, -4, 3, -2, -2, 0, -2, 2, -4, 1, 4,
22 | -4, -1, 1, -1, -1, -2, 2, 1, 1, -4, 5, -4, 0, 1, -4, 3, -2, -1, 3, 0, -3, 0, -1,
23 | -1, -1, 0, -4, 3, -1, -3, 2, -1, -1, 0, 0, 1, 1, -1, 1, -2, -1, -1, -4, -1, 4,
24 | -1, -2, 1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, -3, 0, -1, -3, 2, -2, 1, 0, -2, -3,
25 | 1, -1, -3, 1, -1, -2, 1, 1, -2, -1, 0, 0, -2, 0, -1, -2, 2, -1, 0, -2, 1, -2, 0,
26 | 0, -4, 1, -1, -2, 1, 0, -2, 0, -2, 3, 0, -2, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0,
27 | 0, 0, -2, -1, 0, -1, 0, 0, -2, 0, 0, -2, -2, 0, -1, -1, 1, 0, -2, 0, 1, -1, 1,
28 | -1, 0, -1, 0, -1, -1, -1, -2, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, -1, -1, -1, 0, -1,
29 | 1, -1, -1, -1, -1, 1, -3, 0, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -2, 0, 0, 0,
30 | -2, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -2, 0, -2, -1, 0, 0, -1, 0, 0, -2, 0, -1,
31 | -1, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, -2, 0, -1, -1, 0, -1, -1, 0, -1,
32 | -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1,
33 | 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
34 | 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
35 | -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
36 | -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0,
37 | -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, -1, 0,
38 | -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0,
39 | -1, 0, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0,
40 | -1, -1, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0,
41 | -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1,
42 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1,
43 | -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, 0, -1,
44 | -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, 0,
45 | -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
46 | 0, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
47 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0,
48 | -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0,
49 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1,
50 | 0, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1,
51 | 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0,
52 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
53 | -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
54 | 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1,
55 | 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, };
56 |
57 | #endif /* hihatc909_H_ */
58 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_5_DelayNoLPF/hihato909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihato_H_
2 | #define hihato_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihato_NUM_CELLS 2048
8 | #define hihato_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihato_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -2, 4, -4, -1, 3, 1, -8, 7, -2, -9, 3, -1,
12 | 1, -3, 0, -2, 4, -3, -4, -1, -3, 3, -2, -5, -1, 2, -1, -3, -1, 4, -2, 4, -3, -2,
13 | 4, -1, 6, 0, 8, -5, -5, 2, -2, 2, -2, -2, 7, -4, 6, -11, -6, 11, -6, 1, 4, 0,
14 | -14, 11, -6, -1, -2, -8, 5, -13, 1, 0, -8, 2, 7, 3, 1, -8, 5, 2, 2, -2, -8, 11,
15 | -1, 0, 2, -1, -3, 2, -3, -9, 2, -4, 6, -3, 1, 9, -7, -3, 2, -2, -2, -13, 2, 9,
16 | -3, 4, -3, 4, -6, 3, -1, -7, 13, -5, 3, 1, 1, -5, -13, 1, -2, 8, 0, 2, -4, 6,
17 | -1, 2, 3, -12, 4, -16, 0, -7, 2, 0, -3, 10, -6, 6, -3, -9, -2, 11, -7, -7, 11,
18 | 9, -3, 1, -1, -5, -6, -4, 2, -11, 8, 2, -4, 14, 0, -9, 7, -4, 6, -2, -10, -3, 1,
19 | 4, -12, 10, -1, 1, 0, 2, -3, 0, 5, 0, 5, -6, 0, -1, 0, -8, -3, -1, -1, 1, -3, 3,
20 | -3, 4, 8, -12, 0, -2, -7, 9, 2, 3, -6, -1, -4, 2, -7, -5, 12, -4, 7, 0, -2, 3,
21 | -1, -2, -3, 1, -3, -1, 2, -1, 2, -8, 1, 7, -8, -3, 1, 5, 4, -3, -3, 1, -3, -13,
22 | 2, 0, 1, 2, -13, 4, 4, 4, 0, 6, 2, -6, -9, -5, 12, -3, 1, -10, 10, -1, -7, 3,
23 | -2, 9, -18, 0, -5, 11, -4, 0, 6, -13, 3, -13, 14, 3, -5, 0, -3, 3, 1, -2, 1, 7,
24 | 5, -8, 6, 0, -8, 2, -3, 4, -6, 1, -14, 7, 8, -10, 7, -11, 10, -8, -13, 13, -3,
25 | 1, -2, 4, -4, -2, 0, 0, 8, -8, 2, 3, 5, -2, -1, -1, 4, 1, -13, 2, 2, -3, -5, 2,
26 | -1, 2, -2, 0, 0, 4, -6, -5, 6, -1, 2, -5, 1, 10, -8, -7, 8, -6, 6, 3, -15, 2, 0,
27 | -8, 6, 5, -4, 2, 0, -6, 5, -2, -4, 2, -3, -1, 5, -2, -2, 0, 1, 4, -8, 2, 4, 0,
28 | 0, -2, -1, -3, -1, -5, -3, 6, -18, 5, 10, -6, 10, -3, -4, 3, 1, -11, 4, -3, 5,
29 | -2, -7, 7, -5, 3, -4, 4, -3, 3, -3, -2, 6, -2, 4, -5, 5, -3, -9, -3, -4, 1, -2,
30 | 5, 2, -2, 7, -4, -5, 3, 0, 2, 2, -5, -2, 6, 5, -11, 3, -6, 2, 0, -3, 5, -4, 5,
31 | -6, 7, -11, 4, -3, -5, 1, -8, 4, -11, 17, 1, -3, -6, -2, 7, -2, -1, -5, 13, -5,
32 | -8, 1, 5, 3, -10, 5, -5, -4, 7, -7, 8, 5, 1, -2, -8, 7, -8, -2, 2, 1, 4, -5, -5,
33 | -2, 10, -10, -2, 1, -8, 0, -2, 5, 8, -4, -2, -4, 0, 4, -4, 1, -2, 5, 0, 8, -2,
34 | 1, -2, -4, 3, -6, 3, 0, -2, 2, 2, -5, -1, -7, -3, 1, 2, -6, 3, 0, -5, 6, -6, -1,
35 | 4, -2, -9, 4, 1, 3, 3, -2, 2, -1, -5, -2, 8, -1, -4, -6, 7, 2, 0, -3, 1, 2, -2,
36 | 1, -7, 5, -9, -2, 3, -4, 3, -1, -8, -3, 1, 0, -7, 5, 3, -3, -7, 2, 6, -2, 3, -7,
37 | 8, -7, 2, 1, 3, 7, -6, -1, -1, -2, -3, 5, -6, 3, 1, 0, -2, -1, -6, -5, 1, 3, 2,
38 | -4, 2, -2, -1, 0, -1, -3, -2, -5, -3, 3, 4, -1, 8, 0, -2, 0, -5, 1, 2, -3, -2,
39 | 8, -4, 0, -5, -2, -1, -3, 0, 5, 3, -8, 0, 0, 7, -7, -2, -1, -3, -3, -1, 1, 7, 5,
40 | -7, 1, 1, 4, -4, -3, 2, 5, -2, -6, 1, 1, -3, -7, -1, 3, -8, 3, -1, 2, 6, -11, 4,
41 | 1, -2, 0, -2, -3, 6, 6, -6, -1, 1, 2, 1, -1, -2, -1, -1, -5, 3, 0, -1, -1, -7,
42 | 0, -5, -1, 4, 0, 6, 0, -3, 1, 6, -5, 0, -3, -7, 6, -2, -2, 1, 5, -4, 4, -7, -4,
43 | 6, -3, 1, 0, -1, -4, -5, 2, -2, -5, 3, 1, 4, -1, 0, 1, 4, -1, -5, -1, -6, 2, -4,
44 | -1, 2, -1, 1, -4, -2, 0, 1, 2, -1, 0, 2, -2, 0, 4, 0, -4, 1, -5, 1, -2, 1, 4, 0,
45 | 2, 1, -3, -9, 0, -1, 2, -6, -2, 4, 1, -1, -4, 1, -1, 0, -3, 1, 1, 1, 0, 0, 6,
46 | -1, -8, -2, 1, 0, -2, -2, 5, 1, -3, -2, 5, 0, -3, -5, -8, 2, 1, 1, 0, 2, 2, -4,
47 | -1, -2, 2, -5, 0, 6, -4, 5, 0, -4, 1, -4, -8, 6, -3, -4, 4, -3, 3, 0, -1, -2, 1,
48 | -2, -2, 1, -2, -1, 0, 3, 1, 2, -1, -2, 0, -5, -1, 0, 7, 2, -4, 0, -2, -1, -2,
49 | -1, 0, 1, -4, -3, 5, 2, -2, 2, -4, 2, -6, -6, 6, -1, 4, -2, 0, 1, -1, -1, -1, 2,
50 | -3, 2, -5, -1, 4, -2, -1, -2, 2, -4, -5, 1, 2, 3, -1, 4, 1, -3, -2, -2, -2, 0,
51 | 2, -5, -2, 2, -1, 4, -4, -5, 3, -7, 2, 3, -3, 1, 2, 1, 1, -2, -3, 2, -4, 1, 0,
52 | -1, 4, 1, -4, 2, -3, -3, 2, -7, 0, 4, -1, -2, 1, 1, -7, 4, -1, -1, -1, -6, 3, 4,
53 | 0, -1, 1, -4, 3, -5, -3, 4, -2, 1, 0, 0, 1, 0, -2, -2, -2, -3, -2, -1, 0, 3, -1,
54 | 0, 0, -1, -1, -4, 1, 1, 1, 2, -2, 2, 0, -2, 0, -3, -2, -2, 0, 2, 1, -1, 0, -1,
55 | -2, 0, -3, 1, 1, -2, -3, 1, 0, 0, 1, -1, 1, -4, -1, 1, 3, 0, -1, 0, -1, -1, -4,
56 | 1, -1, 1, -1, -1, 3, -3, 0, -1, 2, -3, -2, 1, -3, 2, 2, -2, 0, 1, -6, 1, -1, 0,
57 | 3, -2, 0, 2, -2, -4, 1, -2, -2, -2, 2, -2, 2, 0, 0, 3, -2, 1, -2, 0, -3, 0, 1,
58 | -1, 0, -1, 2, -4, -2, 1, -4, 2, 0, -2, 1, 3, -2, 0, -1, -2, -3, -2, 1, -1, 0, 1,
59 | 4, -2, 2, -2, -4, 1, -3, -2, 1, 0, -2, 0, 0, -1, 0, -2, -2, 1, 0, 1, 0, 2, 1,
60 | -4, -2, 0, 0, -4, 1, -2, 1, 1, -4, 5, -1, -1, -2, -3, -1, 0, -3, -1, 4, -2, 0,
61 | 1, -1, 0, -2, -1, 2, -2, 1, 2, -1, 2, -1, -2, -1, -2, -5, -1, 1, 0, 0, 1, -2, 0,
62 | -1, -2, -1, 1, 0, -4, 1, 0, 1, -1, 2, -2, -4, -1, -1, 4, 0, -2, 0, -1, 0, 0, -5,
63 | 1, 1, -3, 0, 0, -2, 3, -1, -2, 3, -5, 0, 2, 0, 0, -2, -2, 1, 2, -6, 0, 1, -1, 1,
64 | -3, -1, 3, -2, -3, 2, 0, -3, 0, -2, 2, 1, -4, 2, 1, -2, -2, 1, -1, 4, -4, -4, 2,
65 | 2, -1, -1, -1, -4, 2, -3, 2, 2, -2, 0, -1, 0, 2, -3, -2, 2, 0, -4, -1, 1, -2, 2,
66 | -2, -1, 0, -2, -1, 1, -1, -1, 3, 0, -1, -1, 0, -1, -2, 1, -1, 1, -1, 2, 1, -1,
67 | -2, -1, 0, -5, 1, 0, -1, 2, 0, -2, -3, -1, 1, -2, -1, 1, 0, 1, 1, -2, 2, 0, -3,
68 | -1, 0, -2, -1, 2, -1, -1, 2, -3, -1, 2, -3, -2, -1, -1, -1, 1, -2, 1, 1, -1, 0,
69 | -2, 0, -2, 1, -1, 1, 1, 0, 0, -2, 0, -2, -1, -4, 0, 1, 0, 1, -1, 0, -1, -4, -2,
70 | -1, -1, -1, 0, 1, 2, -1, -3, 1, 0, 0, -1, -1, 0, 1, -3, 0, 2, 0, -2, -4, -1, 1,
71 | -1, -2, 2, 2, -1, -1, 0, -2, 1, -3, -3, 2, 0, -1, -1, 2, 1, -1, -2, -1, 0, -1,
72 | -2, 0, 1, -1, -2, 0, 2, -3, -1, 0, -2, 1, -1, 0, 3, -1, 0, -1, 0, -1, -1, -2,
73 | -1, 1, -1, 1, -3, -1, -1, -1, -1, -1, -1, -3, 2, -2, -1, 1, -1, 1, -2, -2, 1, 1,
74 | 0, -1, 1, -1, 0, -2, 1, 2, -3, 0, 0, -1, 0, -1, -2, 1, 0, -4, -1, 1, 0, 2, -3,
75 | -1, 1, -1, -2, 1, -1, 2, -1, -2, 1, -2, 0, -2, 0, 1, -2, -1, 0, 2, 0, -2, -1, 0,
76 | -1, -2, -1, 1, 3, -3, -2, 0, 0, -1, 0, 0, -1, -1, -3, -1, 1, 0, -2, 0, -1, 0,
77 | -2, 0, 0, 1, -1, 0, 1, -1, 3, -2, 0, 0, -3, 0, 2, -2, -1, 2, -1, -1, -1, -2, 0,
78 | -2, -2, 0, -1, -3, 0, 0, 0, 0, -3, 0, -1, 0, 0, 0, 1, 1, -1, -3, 0, 0, 0, -1,
79 | -3, 0, 1, -2, -1, 2, -2, -1, 0, -4, 1, 0, -2, 1, -1, 1, -1, 0, 0, 0, -1, -1, 0,
80 | -1, 1, -1, -1, 1, -1, -1, -2, -1, -1, -2, 0, 1, 0, -1, 1, -1, 0, 1, -1, -2, 1,
81 | 0, -2, 3, 0, 0, 0, -2, 0, -1, -1, -1, 0, -1, -1, -2, -1, 0, -2, -1, 0, -1, 0, 0,
82 | 0, 1, -1, 0, 0, -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, 0, -2, -1, 0, -1, -2, -1,
83 | 2, -1, -1, -1, -1, 1, -2, 1, -1, 0, 1, 0, -2, 0, 0, -3, 2, -2, -1, 0, -1, 0, 1,
84 | 1, -3, 1, -1, -2, 1, -3, 0, 1, -1, 0, 0, -2, 1, 0, -2, 0, -1, -1, 0, -2, -1, -1,
85 | -1, 0, -1, -1, 0, 0, -2, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -3, 1, -1, 0,
86 | -1, 0, 0, 0, 0, -2, -1, -1, 1, -3, -1, 2, -1, 0, -1, 0, 0, -2, -1, 1, -1, 0, -1,
87 | -2, 1, -1, -2, 0, 0, -1, -2, -2, 1, 1, -1, -2, 1, 0, -2, 0, 0, 0, 0, -2, 0, 1,
88 | -1, 0, -1, 0, -2, -1, -1, 1, 0, -1, 0, -1, 0, -1, -2, 1, -1, -2, 1, 0, 1, 0, -1,
89 | 0, 0, -2, -1, 1, -1, 0, -1, 0, 0, -1, -1, -1, 1, -3, -1, 0, 0, 0, -1, 1, 1, 0,
90 | -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -3, -2, 0, 0, 0, -1, 0, 1, -2, -2, -1,
91 | 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -2, 1, -2, 0, 1, -1, 1, -1, 0, -1, 0,
92 | -1, 0, 0, -1, 1, -1, 1, 0, -1, -2, 0, 0, -3, 0, -1, 1, -1, -2, 0, -1, 0, -1, -1,
93 | 0, -1, 0, 0, 1, -1, 1, -1, -2, 1, -2, 0, 0, -1, 0, 0, -1, -1, 1, -2, -2, 0, -1,
94 | 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, -1,
95 | 0, -1, 0, 0, -1, -2, 0, -1, -1, 0, -1, 1, 0, -1, 0, -1, -2, 0, 0, -1, 0, -1, -1,
96 | 0, -1, -1, -2, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, -1, -1, -1,
97 | -1, 0, 1, -1, -2, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0,
98 | -2, 0, -1, 0, 1, -2, -1, -1, 0, 0, -3, 1, 0, -1, 0, 0, 0, -2, 0, -2, 1, -1, -2,
99 | 1, 0, 0, -2, 0, 1, -2, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0,
100 | 1, -1, 0, 0, -1, 0, -2, 0, -1, 0, -1, 1, 0, -2, -2, 0, 0, -3, -1, 0, -1, 0, 0,
101 | -1, 0, };
102 |
103 | #endif /* hihato_H_ */
104 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_5_DelayNoLPF/kick909.h:
--------------------------------------------------------------------------------
1 | #ifndef kick909_H_
2 | #define kick909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define kick909_NUM_CELLS 2048
8 | #define kick909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) kick909_DATA [] = {-1, 0, -1, 0, -1, 0, 0,
11 | 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1,
12 | 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1,
13 | -1, -1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 8, 9, 9, 10, 14, 17,
14 | 20, 24, 29, 50, 57, 49, 53, 54, 53, 53, 54, 53, 53, 53, 52, 51, 50, 48, 46, 45,
15 | 44, 42, 40, 38, 35, 33, 30, 26, 23, 19, 15, 12, 8, 5, 1, -2, -6, -9, -11, -13,
16 | -16, -17, -18, -20, -22, -23, -24, -24, -25, -26, -27, -27, -27, -27, -28, -28,
17 | -28, -28, -27, -27, -27, -26, -25, -24, -24, -23, -21, -20, -19, -17, -15, -13,
18 | -12, -10, -8, -5, -3, -1, 1, 3, 6, 8, 10, 12, 14, 17, 19, 21, 24, 25, 28, 30,
19 | 32, 33, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41,
20 | 40, 40, 39, 38, 38, 37, 37, 36, 36, 35, 34, 33, 32, 32, 30, 29, 28, 26, 24, 22,
21 | 20, 18, 17, 15, 13, 11, 9, 8, 6, 5, 3, 1, -1, -2, -4, -5, -7, -8, -9, -11, -13,
22 | -14, -16, -17, -18, -19, -20, -21, -22, -24, -25, -25, -26, -27, -27, -28, -29,
23 | -29, -30, -30, -30, -30, -31, -31, -31, -31, -31, -32, -31, -32, -32, -32, -32,
24 | -32, -32, -32, -32, -32, -32, -32, -32, -31, -31, -31, -30, -30, -30, -29, -28,
25 | -28, -27, -27, -26, -26, -25, -25, -24, -23, -22, -21, -20, -20, -19, -18, -17,
26 | -16, -15, -14, -13, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0, 1, 2, 3, 4, 6,
27 | 6, 8, 9, 10, 11, 12, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 27,
28 | 28, 29, 30, 30, 31, 32, 33, 33, 34, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36,
29 | 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36,
30 | 36, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28,
31 | 28, 27, 27, 26, 25, 25, 24, 23, 23, 21, 21, 20, 19, 18, 17, 16, 15, 14, 12, 11,
32 | 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9,
33 | -10, -11, -12, -12, -13, -14, -15, -16, -16, -17, -18, -19, -20, -20, -21, -22,
34 | -23, -23, -24, -25, -25, -26, -26, -27, -27, -28, -29, -29, -29, -30, -30, -31,
35 | -31, -32, -32, -32, -32, -33, -33, -33, -33, -33, -33, -34, -34, -34, -34, -34,
36 | -34, -34, -34, -34, -34, -34, -34, -34, -35, -35, -35, -35, -35, -35, -35, -35,
37 | -35, -35, -35, -35, -34, -34, -34, -34, -33, -33, -33, -33, -33, -32, -32, -32,
38 | -32, -31, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27,
39 | -27, -26, -26, -25, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18,
40 | -17, -17, -16, -15, -14, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -5,
41 | -5, -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13,
42 | 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28,
43 | 29, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 32, 33, 33, 34, 34, 34, 34,
44 | 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
45 | 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32,
46 | 32, 31, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25,
47 | 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 13, 12, 11, 11,
48 | 10, 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, 0, -1, -1, -2, -3, -4, -5, -5, -6, -7, -8, -9,
49 | -9, -10, -11, -12, -12, -13, -14, -14, -15, -16, -17, -17, -18, -19, -19, -20,
50 | -21, -21, -22, -23, -23, -24, -24, -25, -26, -26, -27, -27, -28, -28, -29, -30,
51 | -30, -30, -31, -31, -32, -32, -32, -33, -33, -33, -34, -34, -34, -34, -34, -35,
52 | -35, -35, -35, -35, -35, -35, -35, -36, -36, -36, -36, -36, -36, -36, -36, -36,
53 | -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
54 | -35, -35, -35, -35, -35, -34, -34, -34, -34, -34, -33, -33, -33, -33, -32, -32,
55 | -32, -32, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -27, -27,
56 | -26, -26, -26, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17,
57 | -17, -16, -15, -15, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -6, -5,
58 | -4, -3, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13,
59 | 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28,
60 | 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 32,
61 | 33, 33, 34, 33, 33, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32, 32, 32, 31,
63 | 31, 31, 31, 30, 30, 30, 29, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25, 25,
64 | 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 15, 14, 13, 12, 12, 11,
65 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0, -1, -2, -3, -3, -4, -5, -6, -7, -7, -8, -9,
66 | -10, -10, -11, -12, -12, -13, -14, -14, -15, -15, -16, -17, -17, -18, -18, -19,
67 | -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -25, -26, -26,
68 | -27, -27, -27, -27, -28, -28, -28, -28, -29, -29, -29, -29, -29, -29, -29, -29,
69 | -29, -29, -29, -30, -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, -29, -29,
70 | -29, -29, -29, -29, -29, -29, -29, -29, -29, -28, -28, -28, -28, -28, -28, -28,
71 | -28, -27, -27, -27, -27, -27, -26, -26, -26, -26, -26, -25, -25, -25, -25, -25,
72 | -24, -24, -24, -24, -23, -23, -23, -23, -23, -22, -22, -22, -21, -21, -21, -21,
73 | -20, -20, -20, -19, -19, -19, -18, -18, -18, -17, -17, -17, -16, -16, -15, -15,
74 | -15, -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -10, -10, -10, -9, -9,
75 | -8, -8, -8, -7, -7, -7, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -1,
76 | -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6,
77 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
79 | 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
80 | 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -3,
81 | -4, -4, -4, -4, -4, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7,
82 | -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10,
83 | -10, -10, -10, -10, -10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
84 | -11, -11, -11, -11, -11, -11, -11, -11, -12, -11, -11, -11, -11, -11, -11, -11,
85 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
86 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -10, -10,
87 | -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -9,
88 | -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8,
89 | -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6,
90 | -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4,
91 | -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
92 | -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
93 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
94 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
95 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
96 | -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
97 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4,
98 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
99 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
100 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
101 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
102 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
103 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
104 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
105 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
107 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
108 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2,
109 | -3, -2, -3, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
110 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
115 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
116 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
117 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, };
118 |
119 | #endif /* kick909_H_ */
120 |
--------------------------------------------------------------------------------
/PolyDrums_v0_1_5_DelayNoLPF/snare909.h:
--------------------------------------------------------------------------------
1 | #ifndef snare909_H_
2 | #define snare909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define snare909_NUM_CELLS 2048
8 | #define snare909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) snare909_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
12 | -1, 0, 0, -2, -2, 0, -2, -1, -3, -2, 4, -3, -7, -2, 1, -7, 6, -3, -2, -6, -8, 8,
13 | -6, 0, -3, -1, -7, 0, -4, -11, -2, 3, -7, -9, 19, -1, 33, 43, 22, 60, 57, 49,
14 | 58, 55, 68, 65, 62, 60, 60, 69, 64, 61, 57, 58, 43, 50, 39, 37, 27, 17, 21, 15,
15 | 11, -2, -6, -12, -6, -23, -7, -22, -30, -22, -25, -27, -26, -31, -31, -21, -18,
16 | -8, -18, -4, 3, 1, 8, 12, 12, 19, 14, 42, 28, 21, 43, 45, 49, 46, 46, 43, 55,
17 | 44, 47, 44, 30, 46, 34, 38, 42, 24, 34, 27, 45, 23, 28, 38, 35, 36, 23, 30, 28,
18 | 40, 23, 32, 35, 29, 31, 31, 30, 28, 30, 30, 12, 13, 18, 8, 7, -2, 5, 6, -1, -7,
19 | -5, -9, -10, -11, -13, -17, -22, -25, -24, -24, -33, -28, -24, -30, -20, -28,
20 | -41, -28, -29, -26, -27, -37, -26, -29, -32, -20, -31, -26, -15, -20, -9, -14,
21 | -15, -12, -6, -7, -3, 8, 6, 15, 16, 12, 21, 30, 25, 35, 35, 29, 46, 44, 38, 49,
22 | 34, 48, 44, 44, 55, 38, 50, 41, 52, 43, 43, 53, 44, 56, 46, 39, 41, 44, 42, 42,
23 | 44, 41, 43, 35, 38, 39, 26, 30, 36, 31, 27, 26, 21, 20, 15, 9, 8, -2, 0, 10,
24 | -10, -13, -3, -17, -14, -14, -18, -7, -30, -24, -32, -26, -28, -37, -23, -35,
25 | -25, -40, -31, -34, -46, -30, -42, -38, -26, -37, -33, -32, -27, -32, -23, -23,
26 | -20, -13, -11, -10, -18, 0, -13, -3, -8, 3, -6, 4, 19, -1, 12, 14, 19, 10, 13,
27 | 9, 20, 19, 21, 23, 21, 34, 21, 24, 34, 20, 31, 28, 31, 36, 24, 33, 23, 31, 27,
28 | 30, 35, 37, 26, 17, 21, 19, 27, 21, 24, 17, 23, 19, 24, 19, 4, 23, 7, 15, 17,
29 | 14, 24, 8, 15, 10, 5, 6, 11, 12, -5, 9, 9, 10, 9, 1, 5, 0, -2, -2, 1, 1, -7, 0,
30 | 3, -2, -2, -8, -8, -19, -4, -18, -6, -4, -11, -5, -15, -1, -28, -12, -19, -10,
31 | -15, -23, -19, -23, -9, -25, -22, -21, -22, -18, -23, -18, -16, -31, -28, -23,
32 | -20, -27, -15, -26, -23, -22, -23, -16, -22, -29, -20, -11, -29, -12, -17, -14,
33 | -15, -12, -16, -22, -21, -8, -11, -16, -8, -13, -12, -8, -15, -14, -9, -14, -2,
34 | -13, 3, -9, -12, 9, 3, 0, 7, -3, 0, 9, 2, 9, 7, 5, 4, 18, 12, 3, 14, 17, 16, 19,
35 | 14, 6, 21, 24, 23, 18, 24, 18, 11, 25, 25, 20, 24, 22, 5, 27, 20, 13, 25, 28,
36 | 17, 19, 11, 14, 24, 10, 23, 10, 23, 19, 16, 9, 14, 9, 14, 17, 6, 13, 8, 11, -1,
37 | 17, 9, 0, 6, 4, -1, 3, -12, -10, -4, -12, -9, -14, -5, -24, -11, -14, -21, -16,
38 | -13, -18, -30, -17, -29, -25, -21, -21, -29, -30, -15, -34, -30, -21, -29, -25,
39 | -26, -28, -36, -27, -30, -28, -25, -21, -11, -31, -18, -21, -12, -12, -12, -13,
40 | -17, -15, -17, 0, -21, -9, 3, -3, -1, -7, 2, -3, 3, 3, -9, 13, 8, 5, -3, 9, 13,
41 | 3, 18, 6, 13, 13, 15, 12, 7, 10, 14, 12, 11, 3, 12, 15, 17, 6, 7, 26, -1, 16,
42 | 19, 8, 16, 12, 15, 1, 10, 20, 7, 7, 8, 17, 1, 3, 12, 8, 7, 10, 9, -4, 1, -3, 5,
43 | 1, 0, 1, 4, 3, -6, 1, -2, -2, -10, -7, -1, -3, -4, -19, 0, -10, -13, -4, -15,
44 | -8, -4, -13, -24, -10, -8, -13, -10, -11, -24, -14, -18, -6, -9, -24, -20, -10,
45 | -12, -18, -11, -14, -13, -18, -17, -28, -8, -27, -20, -14, -15, -11, -18, -9,
46 | -16, -15, -17, -16, -6, -13, -17, 3, -25, -1, -11, -4, -6, -8, -5, -14, 0, -11,
47 | 5, -3, 0, 0, -1, -12, 0, -2, -5, 6, 5, 4, 4, -11, 2, 3, -4, 12, 1, 5, -2, 3, -3,
48 | 0, 2, 6, 7, -7, 2, 1, 6, 5, -2, 0, 2, 1, 9, 1, 9, -5, -6, 7, -2, 5, -3, 16, -1,
49 | 1, 2, 4, 10, -3, 17, -2, 6, 7, 2, 9, -2, 1, -6, 10, -5, -1, 3, -8, 11, -6, 7,
50 | -1, -7, 2, -3, -6, 1, -3, -11, -3, -3, -7, -12, -4, -7, -10, -9, -18, -6, -11,
51 | -20, -3, -12, -6, -10, -24, -9, -16, -18, -9, -18, -20, -11, -9, -15, -24, -10,
52 | -20, -27, -13, -14, -13, -19, -18, -23, -21, -17, -14, -22, -15, -21, -19, -14,
53 | -19, -11, -15, -15, -17, -17, -18, -12, -12, -12, -8, -10, -17, -9, -14, -3, -5,
54 | -10, -9, -10, -8, -10, 7, -5, -3, 0, -2, 3, -3, 6, -6, -7, -1, 3, 5, 1, 4, -12,
55 | 8, 5, -1, 11, 6, -4, 3, 6, -1, 10, 1, 7, 2, 7, 6, -6, 2, 3, 3, 1, 6, 0, -3, 5,
56 | 5, 7, 1, -3, -2, -2, 6, 2, -3, 0, 3, 4, -4, 2, -5, -1, -2, -4, 0, -8, -8, -5, 2,
57 | -9, -6, -1, -2, -9, -6, -12, 1, -10, -14, -9, -13, -10, -10, -9, -10, -7, -17,
58 | -3, -13, -7, -12, -15, -16, -10, -9, -16, -7, -11, -11, -13, -14, -9, -11, -16,
59 | -17, -12, -10, -16, -10, -11, -14, -4, -14, -17, -7, -12, -6, -16, -2, -7, -9,
60 | -10, -9, -5, -18, 1, -8, 0, 1, -9, -16, -4, -3, -6, 4, -9, -2, -10, 0, 1, -10,
61 | 3, -1, -3, -2, -4, 0, 3, -3, 0, -1, 0, 2, -4, 2, -3, -8, 0, -5, 5, -7, -4, 3,
62 | -9, 6, -10, 5, 1, -4, 2, -8, 2, -6, 2, -1, 2, -2, -6, 1, -6, -5, -3, 7, -8, -5,
63 | 2, -7, -1, -8, 3, 0, 0, 1, -6, -3, -5, -3, -3, -9, -6, 1, -7, -5, -3, -3, -6,
64 | -11, -5, -1, -8, -15, -1, -8, -8, 0, -13, -9, 0, -14, -10, -9, -9, -11, -3, -11,
65 | -14, -7, -5, -4, -12, -18, -16, -2, -19, -7, -13, -5, -12, -10, -6, -23, -4,
66 | -10, -11, -8, -10, -14, -12, -5, -14, -13, -3, -8, -16, -10, -8, -15, -6, -13,
67 | -10, -11, -8, -6, -12, -9, -8, -10, -10, -8, -4, -13, -5, -6, -11, 2, -14, -2,
68 | -6, -7, -1, -11, 1, -4, -9, 3, -3, 2, -8, -1, -2, -7, -1, 0, 4, -3, 3, -7, 2,
69 | -3, -1, 1, -3, -2, -1, 7, -4, 1, -2, -2, -4, -3, 8, -9, 1, -1, -3, 4, -6, 3, 3,
70 | 0, -1, -5, -7, -2, 1, -4, 3, 0, -9, 0, -4, 4, -5, -4, 1, -3, -4, -5, -3, -7, -8,
71 | -7, 2, -9, -8, -2, -7, -3, -10, -6, -4, -12, -6, -10, -7, -10, -10, -5, -11, -3,
72 | -7, -13, -10, -8, -6, -15, -7, -7, -11, -9, -11, -8, -10, -11, -8, -6, -12, -8,
73 | -10, -8, -6, -10, -7, -8, -7, -8, -11, -3, -4, -5, -6, -12, -8, -6, -6, -3, -6,
74 | -6, -6, -2, 1, -12, -5, -4, -6, -1, -1, -7, -5, -4, -3, 1, -6, 2, -6, 0, -5, -9,
75 | 4, -7, -2, 2, -3, 1, -3, -4, -4, -1, -2, -4, 3, -5, -2, -3, -4, -1, -4, 1, -1,
76 | -10, 1, 0, -9, 2, -3, -6, -2, 6, -5, -6, -2, -3, -3, -4, -4, -6, -1, -5, -6, -1,
77 | -2, -9, -1, -2, -5, -3, 0, -5, -7, -5, -8, -1, -7, -6, -4, -2, -6, -7, -7, -8,
78 | -5, 0, -4, -12, -4, -10, -3, -4, -11, -3, -6, -6, -6, -9, -7, -9, -7, -5, -7,
79 | -2, -10, -10, -3, -10, -5, -7, -10, -6, -12, -6, -9, -4, -7, -8, -5, -12, -6,
80 | -5, -4, -9, -4, -7, -5, -5, -8, -7, -7, -9, -7, -5, -11, -3, -6, -3, -5, -8, -4,
81 | -3, -6, -8, -6, -5, -4, -5, -6, -2, -6, -6, -2, -5, -3, -4, -5, -7, -3, -2, -2,
82 | -2, -9, 1, -3, -8, 0, -3, 0, -5, -3, -2, -1, 0, -3, -3, -4, 1, -2, -8, 3, -1,
83 | -5, 1, 0, -3, -4, -4, -1, 0, -3, 2, -6, -1, -3, -6, 2, -4, -3, -3, -1, -1, -5,
84 | -3, 0, 0, -6, -1, -4, -5, -3, 0, -1, -4, -8, -4, 0, -9, 0, -4, -5, -4, -1, -5,
85 | -6, -4, -6, -3, -6, -6, -9, -4, -4, -7, -4, -3, -10, -6, -6, -5, -5, -8, -5, -9,
86 | -5, -6, -5, -6, -9, -8, -4, -5, -10, -3, -7, -6, -6, -4, -6, -9, -4, -6, -2, -7,
87 | -2, -3, -7, -4, -7, -3, -5, -3, -4, -7, -4, -3, -3, -2, -1, -5, -4, -3, -4, -3,
88 | -3, -2, -3, -1, -3, -7, 0, -3, 2, -1, -5, -3, -1, -3, -5, 1, -8, 2, -5, 0, -1,
89 | -6, -1, -2, 2, -5, -1, -1, -2, -2, -1, -6, 0, -5, -2, 0, -5, -2, -4, 1, -5, -4,
90 | -2, 0, -5, -3, 0, -5, -1, -2, -3, -3, -4, -2, -3, -3, -5, -4, -2, -6, -3, -6,
91 | -4, -3, -6, -3, -2, -5, -5, -5, -4, -5, -3, -3, -8, -2, -6, -3, -4, -9, -1, -8,
92 | -4, -4, -7, -2, -6, -3, -5, -4, -3, -5, -3, -8, -4, -8, -5, -3, -8, -1, -7, -2,
93 | -4, -6, -5, -3, -4, -3, -4, -4, -1, -5, -2, -5, -2, -3, -4, -3, -5, -2, -4, -1,
94 | -4, -4, -1, -3, -1, -4, -4, -3, -2, -3, -1, -3, -5, -2, -1, -3, -2, 0, -4, -2,
95 | -3, -4, -2, -3, -2, -2, -1, -3, -4, -2, -3, -2, -3, 0, -5, -2, -1, -3, -1, -2,
96 | -1, -5, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -4, -2, -1, -3, -2, -2, -2, -2,
97 | -1, -4, -4, -1, -3, -2, -1, -6, -1, -4, -4, -2, -5, -1, -4, -1, -4, -4, -2, -3,
98 | -4, -2, -4, -4, -3, -4, -1, -5, -5, -3, -3, -4, -4, -5, -3, -3, -6, -4, -4, -3,
99 | -4, -4, -3, -4, -3, -5, -5, -4, -6, -2, -6, -3, -4, -4, -3, -5, -2, -5, -5, -3,
100 | -3, -4, -4, -4, -2, -3, -4, -4, -4, -2, -3, -3, -3, -3, -3, -2, -2, -4, -1, -2,
101 | -3, -1, -3, -1, -2, -3, -3, -1, -4, -3, -1, -2, -2, -1, -2, -2, -2, -3, -1, -2,
102 | -1, -1, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -2, -1, -2, -2, -1, -2,
103 | -2, -2, -1, -2, -2, -1, -2, -2, -1, -2, -2, -2, -2, -1, -2, -3, -2, -2, -2, -2,
104 | -2, -2, -2, -2, -3, -3, -2, -2, -3, -2, -3, -3, -3, -3, -2, -3, -2, -3, -3, -3,
105 | -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -2, -2, -2, -2, -2, -3, -2, -2, -3,
107 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
108 | -1, -2, -2, -2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -1, -2, -2, -2, -2, -1, -2,
109 | -2, -2, -2, -1, -1, -2, -1, -2, -1, -2, -2, -1, -1, -1, -2, -1, -2, -1, -2, -1,
110 | -1, -2, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, };
115 |
116 | #endif /* snare909_H_ */
117 |
--------------------------------------------------------------------------------
/PolyDrums_v0_2_0_DelayDuty/hihatc909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihatc909_H_
2 | #define hihatc909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihatc909_NUM_CELLS 1024
8 | #define hihatc909_SAMPLERATE 16384
9 |
10 | const int8_t __attribute__((progmem)) hihatc909_DATA [] = {1, -2, 1, -2, 2, 0, -4,
11 | 13, -18, 2, 3, 3, -1, 4, -9, 7, -5, -2, 4, -22, 23, -7, -8, -2, 7, -5, -8, 12,
12 | -4, 7, 7, -21, 12, -3, -18, 8, 1, 4, -20, 4, -5, -4, -2, 0, -2, -7, 3, -3, -3,
13 | -4, 3, -9, 12, -5, 20, 2, -25, 19, 0, 8, -12, -6, 4, 0, 15, -7, 8, 19, -9, -6,
14 | 0, -1, 0, -3, 12, -12, 7, 9, -18, 2, 4, 1, -7, -4, 7, 2, -3, 0, -3, 1, -2, -4,
15 | -4, -11, 7, -8, -2, 11, 2, 8, -1, 4, -3, -1, -2, -9, -6, -3, 3, -9, -9, 4, 1,
16 | -5, 1, 5, 0, 2, 2, -3, 9, 6, -7, 3, 5, 0, -2, 0, 7, -3, -2, -2, -3, 4, -2, 2,
17 | -3, 2, 0, -14, 4, 3, -4, 0, -5, 3, -2, -9, 3, 0, -1, -1, -5, -1, 5, -4, -6, 7,
18 | 1, -2, 2, 0, 4, -1, -7, 1, 3, 3, -1, -1, 6, 1, -2, 0, 3, -5, -9, 1, -1, -2, 0,
19 | -2, -1, 2, -1, -7, -2, -1, 1, -1, -4, 7, -5, -4, 5, 1, 1, 1, -2, 3, 2, -4, 0, 1,
20 | 3, -3, 1, -2, 0, 2, -1, 2, -2, -2, 0, -4, -3, 3, -3, 0, -1, -3, 2, -3, -6, 6,
21 | -2, 0, 1, 2, 0, -2, 2, 1, 1, -5, 1, -3, -2, -4, 3, -2, -2, 0, -2, 2, -4, 1, 4,
22 | -4, -1, 1, -1, -1, -2, 2, 1, 1, -4, 5, -4, 0, 1, -4, 3, -2, -1, 3, 0, -3, 0, -1,
23 | -1, -1, 0, -4, 3, -1, -3, 2, -1, -1, 0, 0, 1, 1, -1, 1, -2, -1, -1, -4, -1, 4,
24 | -1, -2, 1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, -3, 0, -1, -3, 2, -2, 1, 0, -2, -3,
25 | 1, -1, -3, 1, -1, -2, 1, 1, -2, -1, 0, 0, -2, 0, -1, -2, 2, -1, 0, -2, 1, -2, 0,
26 | 0, -4, 1, -1, -2, 1, 0, -2, 0, -2, 3, 0, -2, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0,
27 | 0, 0, -2, -1, 0, -1, 0, 0, -2, 0, 0, -2, -2, 0, -1, -1, 1, 0, -2, 0, 1, -1, 1,
28 | -1, 0, -1, 0, -1, -1, -1, -2, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, -1, -1, -1, 0, -1,
29 | 1, -1, -1, -1, -1, 1, -3, 0, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -2, 0, 0, 0,
30 | -2, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -2, 0, -2, -1, 0, 0, -1, 0, 0, -2, 0, -1,
31 | -1, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, -2, 0, -1, -1, 0, -1, -1, 0, -1,
32 | -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1,
33 | 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
34 | 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
35 | -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
36 | -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0,
37 | -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, -1, 0,
38 | -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0,
39 | -1, 0, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0,
40 | -1, -1, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0,
41 | -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1,
42 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1,
43 | -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, 0, -1,
44 | -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, 0,
45 | -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
46 | 0, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
47 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0,
48 | -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0,
49 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1,
50 | 0, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1,
51 | 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0,
52 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
53 | -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
54 | 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1,
55 | 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, };
56 |
57 | #endif /* hihatc909_H_ */
58 |
--------------------------------------------------------------------------------
/PolyDrums_v0_2_0_DelayDuty/hihato909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihato_H_
2 | #define hihato_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihato_NUM_CELLS 2048
8 | #define hihato_SAMPLERATE 16384
9 |
10 | const int8_t __attribute__((progmem)) hihato_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -2, 4, -4, -1, 3, 1, -8, 7, -2, -9, 3, -1,
12 | 1, -3, 0, -2, 4, -3, -4, -1, -3, 3, -2, -5, -1, 2, -1, -3, -1, 4, -2, 4, -3, -2,
13 | 4, -1, 6, 0, 8, -5, -5, 2, -2, 2, -2, -2, 7, -4, 6, -11, -6, 11, -6, 1, 4, 0,
14 | -14, 11, -6, -1, -2, -8, 5, -13, 1, 0, -8, 2, 7, 3, 1, -8, 5, 2, 2, -2, -8, 11,
15 | -1, 0, 2, -1, -3, 2, -3, -9, 2, -4, 6, -3, 1, 9, -7, -3, 2, -2, -2, -13, 2, 9,
16 | -3, 4, -3, 4, -6, 3, -1, -7, 13, -5, 3, 1, 1, -5, -13, 1, -2, 8, 0, 2, -4, 6,
17 | -1, 2, 3, -12, 4, -16, 0, -7, 2, 0, -3, 10, -6, 6, -3, -9, -2, 11, -7, -7, 11,
18 | 9, -3, 1, -1, -5, -6, -4, 2, -11, 8, 2, -4, 14, 0, -9, 7, -4, 6, -2, -10, -3, 1,
19 | 4, -12, 10, -1, 1, 0, 2, -3, 0, 5, 0, 5, -6, 0, -1, 0, -8, -3, -1, -1, 1, -3, 3,
20 | -3, 4, 8, -12, 0, -2, -7, 9, 2, 3, -6, -1, -4, 2, -7, -5, 12, -4, 7, 0, -2, 3,
21 | -1, -2, -3, 1, -3, -1, 2, -1, 2, -8, 1, 7, -8, -3, 1, 5, 4, -3, -3, 1, -3, -13,
22 | 2, 0, 1, 2, -13, 4, 4, 4, 0, 6, 2, -6, -9, -5, 12, -3, 1, -10, 10, -1, -7, 3,
23 | -2, 9, -18, 0, -5, 11, -4, 0, 6, -13, 3, -13, 14, 3, -5, 0, -3, 3, 1, -2, 1, 7,
24 | 5, -8, 6, 0, -8, 2, -3, 4, -6, 1, -14, 7, 8, -10, 7, -11, 10, -8, -13, 13, -3,
25 | 1, -2, 4, -4, -2, 0, 0, 8, -8, 2, 3, 5, -2, -1, -1, 4, 1, -13, 2, 2, -3, -5, 2,
26 | -1, 2, -2, 0, 0, 4, -6, -5, 6, -1, 2, -5, 1, 10, -8, -7, 8, -6, 6, 3, -15, 2, 0,
27 | -8, 6, 5, -4, 2, 0, -6, 5, -2, -4, 2, -3, -1, 5, -2, -2, 0, 1, 4, -8, 2, 4, 0,
28 | 0, -2, -1, -3, -1, -5, -3, 6, -18, 5, 10, -6, 10, -3, -4, 3, 1, -11, 4, -3, 5,
29 | -2, -7, 7, -5, 3, -4, 4, -3, 3, -3, -2, 6, -2, 4, -5, 5, -3, -9, -3, -4, 1, -2,
30 | 5, 2, -2, 7, -4, -5, 3, 0, 2, 2, -5, -2, 6, 5, -11, 3, -6, 2, 0, -3, 5, -4, 5,
31 | -6, 7, -11, 4, -3, -5, 1, -8, 4, -11, 17, 1, -3, -6, -2, 7, -2, -1, -5, 13, -5,
32 | -8, 1, 5, 3, -10, 5, -5, -4, 7, -7, 8, 5, 1, -2, -8, 7, -8, -2, 2, 1, 4, -5, -5,
33 | -2, 10, -10, -2, 1, -8, 0, -2, 5, 8, -4, -2, -4, 0, 4, -4, 1, -2, 5, 0, 8, -2,
34 | 1, -2, -4, 3, -6, 3, 0, -2, 2, 2, -5, -1, -7, -3, 1, 2, -6, 3, 0, -5, 6, -6, -1,
35 | 4, -2, -9, 4, 1, 3, 3, -2, 2, -1, -5, -2, 8, -1, -4, -6, 7, 2, 0, -3, 1, 2, -2,
36 | 1, -7, 5, -9, -2, 3, -4, 3, -1, -8, -3, 1, 0, -7, 5, 3, -3, -7, 2, 6, -2, 3, -7,
37 | 8, -7, 2, 1, 3, 7, -6, -1, -1, -2, -3, 5, -6, 3, 1, 0, -2, -1, -6, -5, 1, 3, 2,
38 | -4, 2, -2, -1, 0, -1, -3, -2, -5, -3, 3, 4, -1, 8, 0, -2, 0, -5, 1, 2, -3, -2,
39 | 8, -4, 0, -5, -2, -1, -3, 0, 5, 3, -8, 0, 0, 7, -7, -2, -1, -3, -3, -1, 1, 7, 5,
40 | -7, 1, 1, 4, -4, -3, 2, 5, -2, -6, 1, 1, -3, -7, -1, 3, -8, 3, -1, 2, 6, -11, 4,
41 | 1, -2, 0, -2, -3, 6, 6, -6, -1, 1, 2, 1, -1, -2, -1, -1, -5, 3, 0, -1, -1, -7,
42 | 0, -5, -1, 4, 0, 6, 0, -3, 1, 6, -5, 0, -3, -7, 6, -2, -2, 1, 5, -4, 4, -7, -4,
43 | 6, -3, 1, 0, -1, -4, -5, 2, -2, -5, 3, 1, 4, -1, 0, 1, 4, -1, -5, -1, -6, 2, -4,
44 | -1, 2, -1, 1, -4, -2, 0, 1, 2, -1, 0, 2, -2, 0, 4, 0, -4, 1, -5, 1, -2, 1, 4, 0,
45 | 2, 1, -3, -9, 0, -1, 2, -6, -2, 4, 1, -1, -4, 1, -1, 0, -3, 1, 1, 1, 0, 0, 6,
46 | -1, -8, -2, 1, 0, -2, -2, 5, 1, -3, -2, 5, 0, -3, -5, -8, 2, 1, 1, 0, 2, 2, -4,
47 | -1, -2, 2, -5, 0, 6, -4, 5, 0, -4, 1, -4, -8, 6, -3, -4, 4, -3, 3, 0, -1, -2, 1,
48 | -2, -2, 1, -2, -1, 0, 3, 1, 2, -1, -2, 0, -5, -1, 0, 7, 2, -4, 0, -2, -1, -2,
49 | -1, 0, 1, -4, -3, 5, 2, -2, 2, -4, 2, -6, -6, 6, -1, 4, -2, 0, 1, -1, -1, -1, 2,
50 | -3, 2, -5, -1, 4, -2, -1, -2, 2, -4, -5, 1, 2, 3, -1, 4, 1, -3, -2, -2, -2, 0,
51 | 2, -5, -2, 2, -1, 4, -4, -5, 3, -7, 2, 3, -3, 1, 2, 1, 1, -2, -3, 2, -4, 1, 0,
52 | -1, 4, 1, -4, 2, -3, -3, 2, -7, 0, 4, -1, -2, 1, 1, -7, 4, -1, -1, -1, -6, 3, 4,
53 | 0, -1, 1, -4, 3, -5, -3, 4, -2, 1, 0, 0, 1, 0, -2, -2, -2, -3, -2, -1, 0, 3, -1,
54 | 0, 0, -1, -1, -4, 1, 1, 1, 2, -2, 2, 0, -2, 0, -3, -2, -2, 0, 2, 1, -1, 0, -1,
55 | -2, 0, -3, 1, 1, -2, -3, 1, 0, 0, 1, -1, 1, -4, -1, 1, 3, 0, -1, 0, -1, -1, -4,
56 | 1, -1, 1, -1, -1, 3, -3, 0, -1, 2, -3, -2, 1, -3, 2, 2, -2, 0, 1, -6, 1, -1, 0,
57 | 3, -2, 0, 2, -2, -4, 1, -2, -2, -2, 2, -2, 2, 0, 0, 3, -2, 1, -2, 0, -3, 0, 1,
58 | -1, 0, -1, 2, -4, -2, 1, -4, 2, 0, -2, 1, 3, -2, 0, -1, -2, -3, -2, 1, -1, 0, 1,
59 | 4, -2, 2, -2, -4, 1, -3, -2, 1, 0, -2, 0, 0, -1, 0, -2, -2, 1, 0, 1, 0, 2, 1,
60 | -4, -2, 0, 0, -4, 1, -2, 1, 1, -4, 5, -1, -1, -2, -3, -1, 0, -3, -1, 4, -2, 0,
61 | 1, -1, 0, -2, -1, 2, -2, 1, 2, -1, 2, -1, -2, -1, -2, -5, -1, 1, 0, 0, 1, -2, 0,
62 | -1, -2, -1, 1, 0, -4, 1, 0, 1, -1, 2, -2, -4, -1, -1, 4, 0, -2, 0, -1, 0, 0, -5,
63 | 1, 1, -3, 0, 0, -2, 3, -1, -2, 3, -5, 0, 2, 0, 0, -2, -2, 1, 2, -6, 0, 1, -1, 1,
64 | -3, -1, 3, -2, -3, 2, 0, -3, 0, -2, 2, 1, -4, 2, 1, -2, -2, 1, -1, 4, -4, -4, 2,
65 | 2, -1, -1, -1, -4, 2, -3, 2, 2, -2, 0, -1, 0, 2, -3, -2, 2, 0, -4, -1, 1, -2, 2,
66 | -2, -1, 0, -2, -1, 1, -1, -1, 3, 0, -1, -1, 0, -1, -2, 1, -1, 1, -1, 2, 1, -1,
67 | -2, -1, 0, -5, 1, 0, -1, 2, 0, -2, -3, -1, 1, -2, -1, 1, 0, 1, 1, -2, 2, 0, -3,
68 | -1, 0, -2, -1, 2, -1, -1, 2, -3, -1, 2, -3, -2, -1, -1, -1, 1, -2, 1, 1, -1, 0,
69 | -2, 0, -2, 1, -1, 1, 1, 0, 0, -2, 0, -2, -1, -4, 0, 1, 0, 1, -1, 0, -1, -4, -2,
70 | -1, -1, -1, 0, 1, 2, -1, -3, 1, 0, 0, -1, -1, 0, 1, -3, 0, 2, 0, -2, -4, -1, 1,
71 | -1, -2, 2, 2, -1, -1, 0, -2, 1, -3, -3, 2, 0, -1, -1, 2, 1, -1, -2, -1, 0, -1,
72 | -2, 0, 1, -1, -2, 0, 2, -3, -1, 0, -2, 1, -1, 0, 3, -1, 0, -1, 0, -1, -1, -2,
73 | -1, 1, -1, 1, -3, -1, -1, -1, -1, -1, -1, -3, 2, -2, -1, 1, -1, 1, -2, -2, 1, 1,
74 | 0, -1, 1, -1, 0, -2, 1, 2, -3, 0, 0, -1, 0, -1, -2, 1, 0, -4, -1, 1, 0, 2, -3,
75 | -1, 1, -1, -2, 1, -1, 2, -1, -2, 1, -2, 0, -2, 0, 1, -2, -1, 0, 2, 0, -2, -1, 0,
76 | -1, -2, -1, 1, 3, -3, -2, 0, 0, -1, 0, 0, -1, -1, -3, -1, 1, 0, -2, 0, -1, 0,
77 | -2, 0, 0, 1, -1, 0, 1, -1, 3, -2, 0, 0, -3, 0, 2, -2, -1, 2, -1, -1, -1, -2, 0,
78 | -2, -2, 0, -1, -3, 0, 0, 0, 0, -3, 0, -1, 0, 0, 0, 1, 1, -1, -3, 0, 0, 0, -1,
79 | -3, 0, 1, -2, -1, 2, -2, -1, 0, -4, 1, 0, -2, 1, -1, 1, -1, 0, 0, 0, -1, -1, 0,
80 | -1, 1, -1, -1, 1, -1, -1, -2, -1, -1, -2, 0, 1, 0, -1, 1, -1, 0, 1, -1, -2, 1,
81 | 0, -2, 3, 0, 0, 0, -2, 0, -1, -1, -1, 0, -1, -1, -2, -1, 0, -2, -1, 0, -1, 0, 0,
82 | 0, 1, -1, 0, 0, -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, 0, -2, -1, 0, -1, -2, -1,
83 | 2, -1, -1, -1, -1, 1, -2, 1, -1, 0, 1, 0, -2, 0, 0, -3, 2, -2, -1, 0, -1, 0, 1,
84 | 1, -3, 1, -1, -2, 1, -3, 0, 1, -1, 0, 0, -2, 1, 0, -2, 0, -1, -1, 0, -2, -1, -1,
85 | -1, 0, -1, -1, 0, 0, -2, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -3, 1, -1, 0,
86 | -1, 0, 0, 0, 0, -2, -1, -1, 1, -3, -1, 2, -1, 0, -1, 0, 0, -2, -1, 1, -1, 0, -1,
87 | -2, 1, -1, -2, 0, 0, -1, -2, -2, 1, 1, -1, -2, 1, 0, -2, 0, 0, 0, 0, -2, 0, 1,
88 | -1, 0, -1, 0, -2, -1, -1, 1, 0, -1, 0, -1, 0, -1, -2, 1, -1, -2, 1, 0, 1, 0, -1,
89 | 0, 0, -2, -1, 1, -1, 0, -1, 0, 0, -1, -1, -1, 1, -3, -1, 0, 0, 0, -1, 1, 1, 0,
90 | -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -3, -2, 0, 0, 0, -1, 0, 1, -2, -2, -1,
91 | 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -2, 1, -2, 0, 1, -1, 1, -1, 0, -1, 0,
92 | -1, 0, 0, -1, 1, -1, 1, 0, -1, -2, 0, 0, -3, 0, -1, 1, -1, -2, 0, -1, 0, -1, -1,
93 | 0, -1, 0, 0, 1, -1, 1, -1, -2, 1, -2, 0, 0, -1, 0, 0, -1, -1, 1, -2, -2, 0, -1,
94 | 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, -1,
95 | 0, -1, 0, 0, -1, -2, 0, -1, -1, 0, -1, 1, 0, -1, 0, -1, -2, 0, 0, -1, 0, -1, -1,
96 | 0, -1, -1, -2, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, -1, -1, -1,
97 | -1, 0, 1, -1, -2, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0,
98 | -2, 0, -1, 0, 1, -2, -1, -1, 0, 0, -3, 1, 0, -1, 0, 0, 0, -2, 0, -2, 1, -1, -2,
99 | 1, 0, 0, -2, 0, 1, -2, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0,
100 | 1, -1, 0, 0, -1, 0, -2, 0, -1, 0, -1, 1, 0, -2, -2, 0, 0, -3, -1, 0, -1, 0, 0,
101 | -1, 0, };
102 |
103 | #endif /* hihato_H_ */
104 |
--------------------------------------------------------------------------------
/PolyDrums_v0_2_0_DelayDuty/kick909.h:
--------------------------------------------------------------------------------
1 | #ifndef kick909_H_
2 | #define kick909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define kick909_NUM_CELLS 2048
8 | #define kick909_SAMPLERATE 16384
9 |
10 | const int8_t __attribute__((progmem)) kick909_DATA [] = {-1, 0, -1, 0, -1, 0, 0,
11 | 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1,
12 | 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1,
13 | -1, -1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 8, 9, 9, 10, 14, 17,
14 | 20, 24, 29, 50, 57, 49, 53, 54, 53, 53, 54, 53, 53, 53, 52, 51, 50, 48, 46, 45,
15 | 44, 42, 40, 38, 35, 33, 30, 26, 23, 19, 15, 12, 8, 5, 1, -2, -6, -9, -11, -13,
16 | -16, -17, -18, -20, -22, -23, -24, -24, -25, -26, -27, -27, -27, -27, -28, -28,
17 | -28, -28, -27, -27, -27, -26, -25, -24, -24, -23, -21, -20, -19, -17, -15, -13,
18 | -12, -10, -8, -5, -3, -1, 1, 3, 6, 8, 10, 12, 14, 17, 19, 21, 24, 25, 28, 30,
19 | 32, 33, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41,
20 | 40, 40, 39, 38, 38, 37, 37, 36, 36, 35, 34, 33, 32, 32, 30, 29, 28, 26, 24, 22,
21 | 20, 18, 17, 15, 13, 11, 9, 8, 6, 5, 3, 1, -1, -2, -4, -5, -7, -8, -9, -11, -13,
22 | -14, -16, -17, -18, -19, -20, -21, -22, -24, -25, -25, -26, -27, -27, -28, -29,
23 | -29, -30, -30, -30, -30, -31, -31, -31, -31, -31, -32, -31, -32, -32, -32, -32,
24 | -32, -32, -32, -32, -32, -32, -32, -32, -31, -31, -31, -30, -30, -30, -29, -28,
25 | -28, -27, -27, -26, -26, -25, -25, -24, -23, -22, -21, -20, -20, -19, -18, -17,
26 | -16, -15, -14, -13, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0, 1, 2, 3, 4, 6,
27 | 6, 8, 9, 10, 11, 12, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 27,
28 | 28, 29, 30, 30, 31, 32, 33, 33, 34, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36,
29 | 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36,
30 | 36, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28,
31 | 28, 27, 27, 26, 25, 25, 24, 23, 23, 21, 21, 20, 19, 18, 17, 16, 15, 14, 12, 11,
32 | 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9,
33 | -10, -11, -12, -12, -13, -14, -15, -16, -16, -17, -18, -19, -20, -20, -21, -22,
34 | -23, -23, -24, -25, -25, -26, -26, -27, -27, -28, -29, -29, -29, -30, -30, -31,
35 | -31, -32, -32, -32, -32, -33, -33, -33, -33, -33, -33, -34, -34, -34, -34, -34,
36 | -34, -34, -34, -34, -34, -34, -34, -34, -35, -35, -35, -35, -35, -35, -35, -35,
37 | -35, -35, -35, -35, -34, -34, -34, -34, -33, -33, -33, -33, -33, -32, -32, -32,
38 | -32, -31, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27,
39 | -27, -26, -26, -25, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18,
40 | -17, -17, -16, -15, -14, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -5,
41 | -5, -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13,
42 | 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28,
43 | 29, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 32, 33, 33, 34, 34, 34, 34,
44 | 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
45 | 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32,
46 | 32, 31, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25,
47 | 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 13, 12, 11, 11,
48 | 10, 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, 0, -1, -1, -2, -3, -4, -5, -5, -6, -7, -8, -9,
49 | -9, -10, -11, -12, -12, -13, -14, -14, -15, -16, -17, -17, -18, -19, -19, -20,
50 | -21, -21, -22, -23, -23, -24, -24, -25, -26, -26, -27, -27, -28, -28, -29, -30,
51 | -30, -30, -31, -31, -32, -32, -32, -33, -33, -33, -34, -34, -34, -34, -34, -35,
52 | -35, -35, -35, -35, -35, -35, -35, -36, -36, -36, -36, -36, -36, -36, -36, -36,
53 | -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
54 | -35, -35, -35, -35, -35, -34, -34, -34, -34, -34, -33, -33, -33, -33, -32, -32,
55 | -32, -32, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -27, -27,
56 | -26, -26, -26, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17,
57 | -17, -16, -15, -15, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -6, -5,
58 | -4, -3, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13,
59 | 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28,
60 | 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 32,
61 | 33, 33, 34, 33, 33, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32, 32, 32, 31,
63 | 31, 31, 31, 30, 30, 30, 29, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25, 25,
64 | 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 15, 14, 13, 12, 12, 11,
65 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0, -1, -2, -3, -3, -4, -5, -6, -7, -7, -8, -9,
66 | -10, -10, -11, -12, -12, -13, -14, -14, -15, -15, -16, -17, -17, -18, -18, -19,
67 | -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -25, -26, -26,
68 | -27, -27, -27, -27, -28, -28, -28, -28, -29, -29, -29, -29, -29, -29, -29, -29,
69 | -29, -29, -29, -30, -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, -29, -29,
70 | -29, -29, -29, -29, -29, -29, -29, -29, -29, -28, -28, -28, -28, -28, -28, -28,
71 | -28, -27, -27, -27, -27, -27, -26, -26, -26, -26, -26, -25, -25, -25, -25, -25,
72 | -24, -24, -24, -24, -23, -23, -23, -23, -23, -22, -22, -22, -21, -21, -21, -21,
73 | -20, -20, -20, -19, -19, -19, -18, -18, -18, -17, -17, -17, -16, -16, -15, -15,
74 | -15, -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -10, -10, -10, -9, -9,
75 | -8, -8, -8, -7, -7, -7, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -1,
76 | -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6,
77 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
79 | 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
80 | 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -3,
81 | -4, -4, -4, -4, -4, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7,
82 | -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10,
83 | -10, -10, -10, -10, -10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
84 | -11, -11, -11, -11, -11, -11, -11, -11, -12, -11, -11, -11, -11, -11, -11, -11,
85 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
86 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -10, -10,
87 | -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -9,
88 | -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8,
89 | -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6,
90 | -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4,
91 | -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
92 | -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
93 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
94 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
95 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
96 | -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
97 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4,
98 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
99 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
100 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
101 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
102 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
103 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
104 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
105 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
107 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
108 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2,
109 | -3, -2, -3, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
110 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
115 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
116 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
117 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, };
118 |
119 | #endif /* kick909_H_ */
120 |
--------------------------------------------------------------------------------
/PolyDrums_v0_2_0_DelayDuty/snare909.h:
--------------------------------------------------------------------------------
1 | #ifndef snare909_H_
2 | #define snare909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define snare909_NUM_CELLS 2048
8 | #define snare909_SAMPLERATE 16384
9 |
10 | const int8_t __attribute__((progmem)) snare909_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
12 | -1, 0, 0, -2, -2, 0, -2, -1, -3, -2, 4, -3, -7, -2, 1, -7, 6, -3, -2, -6, -8, 8,
13 | -6, 0, -3, -1, -7, 0, -4, -11, -2, 3, -7, -9, 19, -1, 33, 43, 22, 60, 57, 49,
14 | 58, 55, 68, 65, 62, 60, 60, 69, 64, 61, 57, 58, 43, 50, 39, 37, 27, 17, 21, 15,
15 | 11, -2, -6, -12, -6, -23, -7, -22, -30, -22, -25, -27, -26, -31, -31, -21, -18,
16 | -8, -18, -4, 3, 1, 8, 12, 12, 19, 14, 42, 28, 21, 43, 45, 49, 46, 46, 43, 55,
17 | 44, 47, 44, 30, 46, 34, 38, 42, 24, 34, 27, 45, 23, 28, 38, 35, 36, 23, 30, 28,
18 | 40, 23, 32, 35, 29, 31, 31, 30, 28, 30, 30, 12, 13, 18, 8, 7, -2, 5, 6, -1, -7,
19 | -5, -9, -10, -11, -13, -17, -22, -25, -24, -24, -33, -28, -24, -30, -20, -28,
20 | -41, -28, -29, -26, -27, -37, -26, -29, -32, -20, -31, -26, -15, -20, -9, -14,
21 | -15, -12, -6, -7, -3, 8, 6, 15, 16, 12, 21, 30, 25, 35, 35, 29, 46, 44, 38, 49,
22 | 34, 48, 44, 44, 55, 38, 50, 41, 52, 43, 43, 53, 44, 56, 46, 39, 41, 44, 42, 42,
23 | 44, 41, 43, 35, 38, 39, 26, 30, 36, 31, 27, 26, 21, 20, 15, 9, 8, -2, 0, 10,
24 | -10, -13, -3, -17, -14, -14, -18, -7, -30, -24, -32, -26, -28, -37, -23, -35,
25 | -25, -40, -31, -34, -46, -30, -42, -38, -26, -37, -33, -32, -27, -32, -23, -23,
26 | -20, -13, -11, -10, -18, 0, -13, -3, -8, 3, -6, 4, 19, -1, 12, 14, 19, 10, 13,
27 | 9, 20, 19, 21, 23, 21, 34, 21, 24, 34, 20, 31, 28, 31, 36, 24, 33, 23, 31, 27,
28 | 30, 35, 37, 26, 17, 21, 19, 27, 21, 24, 17, 23, 19, 24, 19, 4, 23, 7, 15, 17,
29 | 14, 24, 8, 15, 10, 5, 6, 11, 12, -5, 9, 9, 10, 9, 1, 5, 0, -2, -2, 1, 1, -7, 0,
30 | 3, -2, -2, -8, -8, -19, -4, -18, -6, -4, -11, -5, -15, -1, -28, -12, -19, -10,
31 | -15, -23, -19, -23, -9, -25, -22, -21, -22, -18, -23, -18, -16, -31, -28, -23,
32 | -20, -27, -15, -26, -23, -22, -23, -16, -22, -29, -20, -11, -29, -12, -17, -14,
33 | -15, -12, -16, -22, -21, -8, -11, -16, -8, -13, -12, -8, -15, -14, -9, -14, -2,
34 | -13, 3, -9, -12, 9, 3, 0, 7, -3, 0, 9, 2, 9, 7, 5, 4, 18, 12, 3, 14, 17, 16, 19,
35 | 14, 6, 21, 24, 23, 18, 24, 18, 11, 25, 25, 20, 24, 22, 5, 27, 20, 13, 25, 28,
36 | 17, 19, 11, 14, 24, 10, 23, 10, 23, 19, 16, 9, 14, 9, 14, 17, 6, 13, 8, 11, -1,
37 | 17, 9, 0, 6, 4, -1, 3, -12, -10, -4, -12, -9, -14, -5, -24, -11, -14, -21, -16,
38 | -13, -18, -30, -17, -29, -25, -21, -21, -29, -30, -15, -34, -30, -21, -29, -25,
39 | -26, -28, -36, -27, -30, -28, -25, -21, -11, -31, -18, -21, -12, -12, -12, -13,
40 | -17, -15, -17, 0, -21, -9, 3, -3, -1, -7, 2, -3, 3, 3, -9, 13, 8, 5, -3, 9, 13,
41 | 3, 18, 6, 13, 13, 15, 12, 7, 10, 14, 12, 11, 3, 12, 15, 17, 6, 7, 26, -1, 16,
42 | 19, 8, 16, 12, 15, 1, 10, 20, 7, 7, 8, 17, 1, 3, 12, 8, 7, 10, 9, -4, 1, -3, 5,
43 | 1, 0, 1, 4, 3, -6, 1, -2, -2, -10, -7, -1, -3, -4, -19, 0, -10, -13, -4, -15,
44 | -8, -4, -13, -24, -10, -8, -13, -10, -11, -24, -14, -18, -6, -9, -24, -20, -10,
45 | -12, -18, -11, -14, -13, -18, -17, -28, -8, -27, -20, -14, -15, -11, -18, -9,
46 | -16, -15, -17, -16, -6, -13, -17, 3, -25, -1, -11, -4, -6, -8, -5, -14, 0, -11,
47 | 5, -3, 0, 0, -1, -12, 0, -2, -5, 6, 5, 4, 4, -11, 2, 3, -4, 12, 1, 5, -2, 3, -3,
48 | 0, 2, 6, 7, -7, 2, 1, 6, 5, -2, 0, 2, 1, 9, 1, 9, -5, -6, 7, -2, 5, -3, 16, -1,
49 | 1, 2, 4, 10, -3, 17, -2, 6, 7, 2, 9, -2, 1, -6, 10, -5, -1, 3, -8, 11, -6, 7,
50 | -1, -7, 2, -3, -6, 1, -3, -11, -3, -3, -7, -12, -4, -7, -10, -9, -18, -6, -11,
51 | -20, -3, -12, -6, -10, -24, -9, -16, -18, -9, -18, -20, -11, -9, -15, -24, -10,
52 | -20, -27, -13, -14, -13, -19, -18, -23, -21, -17, -14, -22, -15, -21, -19, -14,
53 | -19, -11, -15, -15, -17, -17, -18, -12, -12, -12, -8, -10, -17, -9, -14, -3, -5,
54 | -10, -9, -10, -8, -10, 7, -5, -3, 0, -2, 3, -3, 6, -6, -7, -1, 3, 5, 1, 4, -12,
55 | 8, 5, -1, 11, 6, -4, 3, 6, -1, 10, 1, 7, 2, 7, 6, -6, 2, 3, 3, 1, 6, 0, -3, 5,
56 | 5, 7, 1, -3, -2, -2, 6, 2, -3, 0, 3, 4, -4, 2, -5, -1, -2, -4, 0, -8, -8, -5, 2,
57 | -9, -6, -1, -2, -9, -6, -12, 1, -10, -14, -9, -13, -10, -10, -9, -10, -7, -17,
58 | -3, -13, -7, -12, -15, -16, -10, -9, -16, -7, -11, -11, -13, -14, -9, -11, -16,
59 | -17, -12, -10, -16, -10, -11, -14, -4, -14, -17, -7, -12, -6, -16, -2, -7, -9,
60 | -10, -9, -5, -18, 1, -8, 0, 1, -9, -16, -4, -3, -6, 4, -9, -2, -10, 0, 1, -10,
61 | 3, -1, -3, -2, -4, 0, 3, -3, 0, -1, 0, 2, -4, 2, -3, -8, 0, -5, 5, -7, -4, 3,
62 | -9, 6, -10, 5, 1, -4, 2, -8, 2, -6, 2, -1, 2, -2, -6, 1, -6, -5, -3, 7, -8, -5,
63 | 2, -7, -1, -8, 3, 0, 0, 1, -6, -3, -5, -3, -3, -9, -6, 1, -7, -5, -3, -3, -6,
64 | -11, -5, -1, -8, -15, -1, -8, -8, 0, -13, -9, 0, -14, -10, -9, -9, -11, -3, -11,
65 | -14, -7, -5, -4, -12, -18, -16, -2, -19, -7, -13, -5, -12, -10, -6, -23, -4,
66 | -10, -11, -8, -10, -14, -12, -5, -14, -13, -3, -8, -16, -10, -8, -15, -6, -13,
67 | -10, -11, -8, -6, -12, -9, -8, -10, -10, -8, -4, -13, -5, -6, -11, 2, -14, -2,
68 | -6, -7, -1, -11, 1, -4, -9, 3, -3, 2, -8, -1, -2, -7, -1, 0, 4, -3, 3, -7, 2,
69 | -3, -1, 1, -3, -2, -1, 7, -4, 1, -2, -2, -4, -3, 8, -9, 1, -1, -3, 4, -6, 3, 3,
70 | 0, -1, -5, -7, -2, 1, -4, 3, 0, -9, 0, -4, 4, -5, -4, 1, -3, -4, -5, -3, -7, -8,
71 | -7, 2, -9, -8, -2, -7, -3, -10, -6, -4, -12, -6, -10, -7, -10, -10, -5, -11, -3,
72 | -7, -13, -10, -8, -6, -15, -7, -7, -11, -9, -11, -8, -10, -11, -8, -6, -12, -8,
73 | -10, -8, -6, -10, -7, -8, -7, -8, -11, -3, -4, -5, -6, -12, -8, -6, -6, -3, -6,
74 | -6, -6, -2, 1, -12, -5, -4, -6, -1, -1, -7, -5, -4, -3, 1, -6, 2, -6, 0, -5, -9,
75 | 4, -7, -2, 2, -3, 1, -3, -4, -4, -1, -2, -4, 3, -5, -2, -3, -4, -1, -4, 1, -1,
76 | -10, 1, 0, -9, 2, -3, -6, -2, 6, -5, -6, -2, -3, -3, -4, -4, -6, -1, -5, -6, -1,
77 | -2, -9, -1, -2, -5, -3, 0, -5, -7, -5, -8, -1, -7, -6, -4, -2, -6, -7, -7, -8,
78 | -5, 0, -4, -12, -4, -10, -3, -4, -11, -3, -6, -6, -6, -9, -7, -9, -7, -5, -7,
79 | -2, -10, -10, -3, -10, -5, -7, -10, -6, -12, -6, -9, -4, -7, -8, -5, -12, -6,
80 | -5, -4, -9, -4, -7, -5, -5, -8, -7, -7, -9, -7, -5, -11, -3, -6, -3, -5, -8, -4,
81 | -3, -6, -8, -6, -5, -4, -5, -6, -2, -6, -6, -2, -5, -3, -4, -5, -7, -3, -2, -2,
82 | -2, -9, 1, -3, -8, 0, -3, 0, -5, -3, -2, -1, 0, -3, -3, -4, 1, -2, -8, 3, -1,
83 | -5, 1, 0, -3, -4, -4, -1, 0, -3, 2, -6, -1, -3, -6, 2, -4, -3, -3, -1, -1, -5,
84 | -3, 0, 0, -6, -1, -4, -5, -3, 0, -1, -4, -8, -4, 0, -9, 0, -4, -5, -4, -1, -5,
85 | -6, -4, -6, -3, -6, -6, -9, -4, -4, -7, -4, -3, -10, -6, -6, -5, -5, -8, -5, -9,
86 | -5, -6, -5, -6, -9, -8, -4, -5, -10, -3, -7, -6, -6, -4, -6, -9, -4, -6, -2, -7,
87 | -2, -3, -7, -4, -7, -3, -5, -3, -4, -7, -4, -3, -3, -2, -1, -5, -4, -3, -4, -3,
88 | -3, -2, -3, -1, -3, -7, 0, -3, 2, -1, -5, -3, -1, -3, -5, 1, -8, 2, -5, 0, -1,
89 | -6, -1, -2, 2, -5, -1, -1, -2, -2, -1, -6, 0, -5, -2, 0, -5, -2, -4, 1, -5, -4,
90 | -2, 0, -5, -3, 0, -5, -1, -2, -3, -3, -4, -2, -3, -3, -5, -4, -2, -6, -3, -6,
91 | -4, -3, -6, -3, -2, -5, -5, -5, -4, -5, -3, -3, -8, -2, -6, -3, -4, -9, -1, -8,
92 | -4, -4, -7, -2, -6, -3, -5, -4, -3, -5, -3, -8, -4, -8, -5, -3, -8, -1, -7, -2,
93 | -4, -6, -5, -3, -4, -3, -4, -4, -1, -5, -2, -5, -2, -3, -4, -3, -5, -2, -4, -1,
94 | -4, -4, -1, -3, -1, -4, -4, -3, -2, -3, -1, -3, -5, -2, -1, -3, -2, 0, -4, -2,
95 | -3, -4, -2, -3, -2, -2, -1, -3, -4, -2, -3, -2, -3, 0, -5, -2, -1, -3, -1, -2,
96 | -1, -5, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -4, -2, -1, -3, -2, -2, -2, -2,
97 | -1, -4, -4, -1, -3, -2, -1, -6, -1, -4, -4, -2, -5, -1, -4, -1, -4, -4, -2, -3,
98 | -4, -2, -4, -4, -3, -4, -1, -5, -5, -3, -3, -4, -4, -5, -3, -3, -6, -4, -4, -3,
99 | -4, -4, -3, -4, -3, -5, -5, -4, -6, -2, -6, -3, -4, -4, -3, -5, -2, -5, -5, -3,
100 | -3, -4, -4, -4, -2, -3, -4, -4, -4, -2, -3, -3, -3, -3, -3, -2, -2, -4, -1, -2,
101 | -3, -1, -3, -1, -2, -3, -3, -1, -4, -3, -1, -2, -2, -1, -2, -2, -2, -3, -1, -2,
102 | -1, -1, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -2, -1, -2, -2, -1, -2,
103 | -2, -2, -1, -2, -2, -1, -2, -2, -1, -2, -2, -2, -2, -1, -2, -3, -2, -2, -2, -2,
104 | -2, -2, -2, -2, -3, -3, -2, -2, -3, -2, -3, -3, -3, -3, -2, -3, -2, -3, -3, -3,
105 | -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -2, -2, -2, -2, -2, -3, -2, -2, -3,
107 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
108 | -1, -2, -2, -2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -1, -2, -2, -2, -2, -1, -2,
109 | -2, -2, -2, -1, -1, -2, -1, -2, -1, -2, -2, -1, -1, -1, -2, -1, -2, -1, -2, -1,
110 | -1, -2, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, };
115 |
116 | #endif /* snare909_H_ */
117 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | cheapsynth
2 | ==========
3 |
4 | Patches and utilities for our Cheapsynth Arduino instrument
5 |
--------------------------------------------------------------------------------
/WaveClass3PolyPlusLPF_BETA/Wave.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Wave.h
3 | *
4 | * Simon Green 2013.
5 | *
6 | * Based on Mozzi "Oscil.h"
7 | */
8 |
9 | #ifndef WAVE_H_
10 | #define WAVE_H_
11 |
12 | #include "Arduino.h"
13 | #include "mozzi_fixmath.h"
14 | #include
15 |
16 | // fractional bits for oscillator index precision
17 | #define OSCIL_F_BITS 16
18 | #define OSCIL_F_BITS_AS_MULTIPLIER 65536
19 | #define NUM_TABLE_CELLS 256
20 | #define ADJUST_FOR_NUM_TABLE_CELLS 8
21 | #define UPDATE_RATE AUDIO_RATE
22 |
23 | /** Generate waveform
24 | */
25 |
26 | enum WaveType { WAVE_SAW=0, WAVE_TRI, WAVE_RECT, WAVE_NOISE };
27 |
28 | class Wave
29 | {
30 | public:
31 | /** Constructor. "Wave mywave;" makes a Wave oscillator
32 | */
33 | Wave () {
34 | phase_fractional = 0;
35 | phase_increment_fractional = 0;
36 | wavetype = WAVE_SAW;
37 | noise = 0xACE1;
38 | pulse_width = 128;
39 | }
40 |
41 | /** Increments one step along the phase.
42 | @return the next value.
43 | */
44 | inline
45 | char next()
46 | {
47 | incrementPhase();
48 |
49 | char w;
50 | //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
51 | {
52 | int n = (phase_fractional >> OSCIL_F_BITS) & (NUM_TABLE_CELLS-1);
53 | switch(wavetype) {
54 | case WAVE_SAW:
55 | w = n - 128;
56 | break;
57 | case WAVE_TRI:
58 | if (n & 0x80) // >= 128
59 | w = ((n^0xFF)<<1)-128;
60 | else
61 | w = (n<<1)-128;
62 | break;
63 | case WAVE_RECT:
64 | if (n > pulse_width)
65 | w = 127;
66 | else
67 | w = -127;
68 | break;
69 | case WAVE_NOISE:
70 | noise = (noise >> 1) ^ (-(noise & 1) & 0xB400u);
71 | w = noise>>8;
72 | break;
73 | }
74 | }
75 | return w;
76 | }
77 |
78 | /** Set the wave type
79 | */
80 | inline
81 | void setType(WaveType x)
82 | {
83 | wavetype = x;
84 | }
85 |
86 | WaveType getType() { return wavetype; }
87 |
88 | /** Set the pulse width for rectangle wave
89 | */
90 | inline
91 | void setPulseWidth(unsigned char x)
92 | {
93 | pulse_width = x;
94 | }
95 |
96 | /** Set the oscillator frequency with an unsigned int. This is faster than using a
97 | float, so it's useful when processor time is tight, but it can be tricky with
98 | low and high frequencies, depending on the size of the wavetable being used. If
99 | you're not getting the results you expect, try explicitly using a float, or try
100 | setFreq_Q24n8() or or setFreq_Q16n16().
101 | @param frequency to play the wave table.
102 | */
103 | inline
104 | void setFreq (unsigned int frequency) {
105 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
106 | {
107 | phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
140 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>3)*frequency)/(UPDATE_RATE>>6))
141 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
142 | }
143 | }
144 |
145 |
146 | /** Set the frequency using Q16n16 fixed-point number format. This is useful in
147 | combination with Q16n16_mtof(), a fast alternative to mtof(), using Q16n16
148 | fixed-point format instead of floats. Note: this should work OK with tables 2048 cells or smaller and
149 | frequencies up to 4096 Hz. Can't be used with UPDATE_RATE less than 64 Hz.
150 | @param frequency in Q16n16 fixed-point number format.
151 | */
152 | inline
153 | void setFreq_Q16n16(Q16n16 frequency)
154 | {
155 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
156 | {
157 | //phase_increment_fractional = ((frequency * (NUM_TABLE_CELLS>>7))/(UPDATE_RATE>>6)) << (F_BITS-16+1);
158 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>7)*frequency)/(UPDATE_RATE>>6))
159 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - 16 + 1);
160 |
161 | }
162 | }
163 |
164 | private:
165 | /** Increments the phase of the oscillator without returning a sample.
166 | */
167 | inline
168 | void incrementPhase()
169 | {
170 | //phase_fractional += (phase_increment_fractional | 1); // odd phase incr, attempt to reduce frequency spurs in output
171 | phase_fractional += phase_increment_fractional;
172 | }
173 |
174 | unsigned long phase_fractional;
175 | volatile unsigned long phase_increment_fractional;
176 |
177 | unsigned char pulse_width;
178 | uint16_t noise;
179 |
180 | WaveType wavetype;
181 | };
182 |
183 | #endif /* WAVE_H_ */
184 |
--------------------------------------------------------------------------------
/WaveClass3PolyPlusLPF_BETA/hihatc909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihatc909_H_
2 | #define hihatc909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihatc909_NUM_CELLS 1024
8 | #define hihatc909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihatc909_DATA [] = {1, -2, 1, -2, 2, 0, -4,
11 | 13, -18, 2, 3, 3, -1, 4, -9, 7, -5, -2, 4, -22, 23, -7, -8, -2, 7, -5, -8, 12,
12 | -4, 7, 7, -21, 12, -3, -18, 8, 1, 4, -20, 4, -5, -4, -2, 0, -2, -7, 3, -3, -3,
13 | -4, 3, -9, 12, -5, 20, 2, -25, 19, 0, 8, -12, -6, 4, 0, 15, -7, 8, 19, -9, -6,
14 | 0, -1, 0, -3, 12, -12, 7, 9, -18, 2, 4, 1, -7, -4, 7, 2, -3, 0, -3, 1, -2, -4,
15 | -4, -11, 7, -8, -2, 11, 2, 8, -1, 4, -3, -1, -2, -9, -6, -3, 3, -9, -9, 4, 1,
16 | -5, 1, 5, 0, 2, 2, -3, 9, 6, -7, 3, 5, 0, -2, 0, 7, -3, -2, -2, -3, 4, -2, 2,
17 | -3, 2, 0, -14, 4, 3, -4, 0, -5, 3, -2, -9, 3, 0, -1, -1, -5, -1, 5, -4, -6, 7,
18 | 1, -2, 2, 0, 4, -1, -7, 1, 3, 3, -1, -1, 6, 1, -2, 0, 3, -5, -9, 1, -1, -2, 0,
19 | -2, -1, 2, -1, -7, -2, -1, 1, -1, -4, 7, -5, -4, 5, 1, 1, 1, -2, 3, 2, -4, 0, 1,
20 | 3, -3, 1, -2, 0, 2, -1, 2, -2, -2, 0, -4, -3, 3, -3, 0, -1, -3, 2, -3, -6, 6,
21 | -2, 0, 1, 2, 0, -2, 2, 1, 1, -5, 1, -3, -2, -4, 3, -2, -2, 0, -2, 2, -4, 1, 4,
22 | -4, -1, 1, -1, -1, -2, 2, 1, 1, -4, 5, -4, 0, 1, -4, 3, -2, -1, 3, 0, -3, 0, -1,
23 | -1, -1, 0, -4, 3, -1, -3, 2, -1, -1, 0, 0, 1, 1, -1, 1, -2, -1, -1, -4, -1, 4,
24 | -1, -2, 1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, -3, 0, -1, -3, 2, -2, 1, 0, -2, -3,
25 | 1, -1, -3, 1, -1, -2, 1, 1, -2, -1, 0, 0, -2, 0, -1, -2, 2, -1, 0, -2, 1, -2, 0,
26 | 0, -4, 1, -1, -2, 1, 0, -2, 0, -2, 3, 0, -2, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0,
27 | 0, 0, -2, -1, 0, -1, 0, 0, -2, 0, 0, -2, -2, 0, -1, -1, 1, 0, -2, 0, 1, -1, 1,
28 | -1, 0, -1, 0, -1, -1, -1, -2, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, -1, -1, -1, 0, -1,
29 | 1, -1, -1, -1, -1, 1, -3, 0, -1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -2, 0, 0, 0,
30 | -2, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, -2, 0, -2, -1, 0, 0, -1, 0, 0, -2, 0, -1,
31 | -1, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, 0, -2, 0, -1, -1, 0, -1, -1, 0, -1,
32 | -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1,
33 | 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1,
34 | 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
35 | -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0,
36 | -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0,
37 | -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, -1, 0,
38 | -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0,
39 | -1, 0, -1, 0, 0, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 0,
40 | -1, -1, 0, 0, 0, -1, 0, -1, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0,
41 | -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1,
42 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1,
43 | -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, -1, -1, 0, -1,
44 | -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, 0, 0,
45 | -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
46 | 0, -1, 0, -1, -1, 0, -1, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0,
47 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0,
48 | -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, 0, -1, -1, 0,
49 | -1, 0, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 0, -1, -1, 0, -1, -1,
50 | 0, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 0, -1,
51 | 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0,
52 | 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
53 | -1, 0, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1,
54 | 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1,
55 | 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, };
56 |
57 | #endif /* hihatc909_H_ */
58 |
--------------------------------------------------------------------------------
/WaveClass3PolyPlusLPF_BETA/hihato909.h:
--------------------------------------------------------------------------------
1 | #ifndef hihato_H_
2 | #define hihato_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define hihato_NUM_CELLS 2048
8 | #define hihato_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) hihato_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -2, 4, -4, -1, 3, 1, -8, 7, -2, -9, 3, -1,
12 | 1, -3, 0, -2, 4, -3, -4, -1, -3, 3, -2, -5, -1, 2, -1, -3, -1, 4, -2, 4, -3, -2,
13 | 4, -1, 6, 0, 8, -5, -5, 2, -2, 2, -2, -2, 7, -4, 6, -11, -6, 11, -6, 1, 4, 0,
14 | -14, 11, -6, -1, -2, -8, 5, -13, 1, 0, -8, 2, 7, 3, 1, -8, 5, 2, 2, -2, -8, 11,
15 | -1, 0, 2, -1, -3, 2, -3, -9, 2, -4, 6, -3, 1, 9, -7, -3, 2, -2, -2, -13, 2, 9,
16 | -3, 4, -3, 4, -6, 3, -1, -7, 13, -5, 3, 1, 1, -5, -13, 1, -2, 8, 0, 2, -4, 6,
17 | -1, 2, 3, -12, 4, -16, 0, -7, 2, 0, -3, 10, -6, 6, -3, -9, -2, 11, -7, -7, 11,
18 | 9, -3, 1, -1, -5, -6, -4, 2, -11, 8, 2, -4, 14, 0, -9, 7, -4, 6, -2, -10, -3, 1,
19 | 4, -12, 10, -1, 1, 0, 2, -3, 0, 5, 0, 5, -6, 0, -1, 0, -8, -3, -1, -1, 1, -3, 3,
20 | -3, 4, 8, -12, 0, -2, -7, 9, 2, 3, -6, -1, -4, 2, -7, -5, 12, -4, 7, 0, -2, 3,
21 | -1, -2, -3, 1, -3, -1, 2, -1, 2, -8, 1, 7, -8, -3, 1, 5, 4, -3, -3, 1, -3, -13,
22 | 2, 0, 1, 2, -13, 4, 4, 4, 0, 6, 2, -6, -9, -5, 12, -3, 1, -10, 10, -1, -7, 3,
23 | -2, 9, -18, 0, -5, 11, -4, 0, 6, -13, 3, -13, 14, 3, -5, 0, -3, 3, 1, -2, 1, 7,
24 | 5, -8, 6, 0, -8, 2, -3, 4, -6, 1, -14, 7, 8, -10, 7, -11, 10, -8, -13, 13, -3,
25 | 1, -2, 4, -4, -2, 0, 0, 8, -8, 2, 3, 5, -2, -1, -1, 4, 1, -13, 2, 2, -3, -5, 2,
26 | -1, 2, -2, 0, 0, 4, -6, -5, 6, -1, 2, -5, 1, 10, -8, -7, 8, -6, 6, 3, -15, 2, 0,
27 | -8, 6, 5, -4, 2, 0, -6, 5, -2, -4, 2, -3, -1, 5, -2, -2, 0, 1, 4, -8, 2, 4, 0,
28 | 0, -2, -1, -3, -1, -5, -3, 6, -18, 5, 10, -6, 10, -3, -4, 3, 1, -11, 4, -3, 5,
29 | -2, -7, 7, -5, 3, -4, 4, -3, 3, -3, -2, 6, -2, 4, -5, 5, -3, -9, -3, -4, 1, -2,
30 | 5, 2, -2, 7, -4, -5, 3, 0, 2, 2, -5, -2, 6, 5, -11, 3, -6, 2, 0, -3, 5, -4, 5,
31 | -6, 7, -11, 4, -3, -5, 1, -8, 4, -11, 17, 1, -3, -6, -2, 7, -2, -1, -5, 13, -5,
32 | -8, 1, 5, 3, -10, 5, -5, -4, 7, -7, 8, 5, 1, -2, -8, 7, -8, -2, 2, 1, 4, -5, -5,
33 | -2, 10, -10, -2, 1, -8, 0, -2, 5, 8, -4, -2, -4, 0, 4, -4, 1, -2, 5, 0, 8, -2,
34 | 1, -2, -4, 3, -6, 3, 0, -2, 2, 2, -5, -1, -7, -3, 1, 2, -6, 3, 0, -5, 6, -6, -1,
35 | 4, -2, -9, 4, 1, 3, 3, -2, 2, -1, -5, -2, 8, -1, -4, -6, 7, 2, 0, -3, 1, 2, -2,
36 | 1, -7, 5, -9, -2, 3, -4, 3, -1, -8, -3, 1, 0, -7, 5, 3, -3, -7, 2, 6, -2, 3, -7,
37 | 8, -7, 2, 1, 3, 7, -6, -1, -1, -2, -3, 5, -6, 3, 1, 0, -2, -1, -6, -5, 1, 3, 2,
38 | -4, 2, -2, -1, 0, -1, -3, -2, -5, -3, 3, 4, -1, 8, 0, -2, 0, -5, 1, 2, -3, -2,
39 | 8, -4, 0, -5, -2, -1, -3, 0, 5, 3, -8, 0, 0, 7, -7, -2, -1, -3, -3, -1, 1, 7, 5,
40 | -7, 1, 1, 4, -4, -3, 2, 5, -2, -6, 1, 1, -3, -7, -1, 3, -8, 3, -1, 2, 6, -11, 4,
41 | 1, -2, 0, -2, -3, 6, 6, -6, -1, 1, 2, 1, -1, -2, -1, -1, -5, 3, 0, -1, -1, -7,
42 | 0, -5, -1, 4, 0, 6, 0, -3, 1, 6, -5, 0, -3, -7, 6, -2, -2, 1, 5, -4, 4, -7, -4,
43 | 6, -3, 1, 0, -1, -4, -5, 2, -2, -5, 3, 1, 4, -1, 0, 1, 4, -1, -5, -1, -6, 2, -4,
44 | -1, 2, -1, 1, -4, -2, 0, 1, 2, -1, 0, 2, -2, 0, 4, 0, -4, 1, -5, 1, -2, 1, 4, 0,
45 | 2, 1, -3, -9, 0, -1, 2, -6, -2, 4, 1, -1, -4, 1, -1, 0, -3, 1, 1, 1, 0, 0, 6,
46 | -1, -8, -2, 1, 0, -2, -2, 5, 1, -3, -2, 5, 0, -3, -5, -8, 2, 1, 1, 0, 2, 2, -4,
47 | -1, -2, 2, -5, 0, 6, -4, 5, 0, -4, 1, -4, -8, 6, -3, -4, 4, -3, 3, 0, -1, -2, 1,
48 | -2, -2, 1, -2, -1, 0, 3, 1, 2, -1, -2, 0, -5, -1, 0, 7, 2, -4, 0, -2, -1, -2,
49 | -1, 0, 1, -4, -3, 5, 2, -2, 2, -4, 2, -6, -6, 6, -1, 4, -2, 0, 1, -1, -1, -1, 2,
50 | -3, 2, -5, -1, 4, -2, -1, -2, 2, -4, -5, 1, 2, 3, -1, 4, 1, -3, -2, -2, -2, 0,
51 | 2, -5, -2, 2, -1, 4, -4, -5, 3, -7, 2, 3, -3, 1, 2, 1, 1, -2, -3, 2, -4, 1, 0,
52 | -1, 4, 1, -4, 2, -3, -3, 2, -7, 0, 4, -1, -2, 1, 1, -7, 4, -1, -1, -1, -6, 3, 4,
53 | 0, -1, 1, -4, 3, -5, -3, 4, -2, 1, 0, 0, 1, 0, -2, -2, -2, -3, -2, -1, 0, 3, -1,
54 | 0, 0, -1, -1, -4, 1, 1, 1, 2, -2, 2, 0, -2, 0, -3, -2, -2, 0, 2, 1, -1, 0, -1,
55 | -2, 0, -3, 1, 1, -2, -3, 1, 0, 0, 1, -1, 1, -4, -1, 1, 3, 0, -1, 0, -1, -1, -4,
56 | 1, -1, 1, -1, -1, 3, -3, 0, -1, 2, -3, -2, 1, -3, 2, 2, -2, 0, 1, -6, 1, -1, 0,
57 | 3, -2, 0, 2, -2, -4, 1, -2, -2, -2, 2, -2, 2, 0, 0, 3, -2, 1, -2, 0, -3, 0, 1,
58 | -1, 0, -1, 2, -4, -2, 1, -4, 2, 0, -2, 1, 3, -2, 0, -1, -2, -3, -2, 1, -1, 0, 1,
59 | 4, -2, 2, -2, -4, 1, -3, -2, 1, 0, -2, 0, 0, -1, 0, -2, -2, 1, 0, 1, 0, 2, 1,
60 | -4, -2, 0, 0, -4, 1, -2, 1, 1, -4, 5, -1, -1, -2, -3, -1, 0, -3, -1, 4, -2, 0,
61 | 1, -1, 0, -2, -1, 2, -2, 1, 2, -1, 2, -1, -2, -1, -2, -5, -1, 1, 0, 0, 1, -2, 0,
62 | -1, -2, -1, 1, 0, -4, 1, 0, 1, -1, 2, -2, -4, -1, -1, 4, 0, -2, 0, -1, 0, 0, -5,
63 | 1, 1, -3, 0, 0, -2, 3, -1, -2, 3, -5, 0, 2, 0, 0, -2, -2, 1, 2, -6, 0, 1, -1, 1,
64 | -3, -1, 3, -2, -3, 2, 0, -3, 0, -2, 2, 1, -4, 2, 1, -2, -2, 1, -1, 4, -4, -4, 2,
65 | 2, -1, -1, -1, -4, 2, -3, 2, 2, -2, 0, -1, 0, 2, -3, -2, 2, 0, -4, -1, 1, -2, 2,
66 | -2, -1, 0, -2, -1, 1, -1, -1, 3, 0, -1, -1, 0, -1, -2, 1, -1, 1, -1, 2, 1, -1,
67 | -2, -1, 0, -5, 1, 0, -1, 2, 0, -2, -3, -1, 1, -2, -1, 1, 0, 1, 1, -2, 2, 0, -3,
68 | -1, 0, -2, -1, 2, -1, -1, 2, -3, -1, 2, -3, -2, -1, -1, -1, 1, -2, 1, 1, -1, 0,
69 | -2, 0, -2, 1, -1, 1, 1, 0, 0, -2, 0, -2, -1, -4, 0, 1, 0, 1, -1, 0, -1, -4, -2,
70 | -1, -1, -1, 0, 1, 2, -1, -3, 1, 0, 0, -1, -1, 0, 1, -3, 0, 2, 0, -2, -4, -1, 1,
71 | -1, -2, 2, 2, -1, -1, 0, -2, 1, -3, -3, 2, 0, -1, -1, 2, 1, -1, -2, -1, 0, -1,
72 | -2, 0, 1, -1, -2, 0, 2, -3, -1, 0, -2, 1, -1, 0, 3, -1, 0, -1, 0, -1, -1, -2,
73 | -1, 1, -1, 1, -3, -1, -1, -1, -1, -1, -1, -3, 2, -2, -1, 1, -1, 1, -2, -2, 1, 1,
74 | 0, -1, 1, -1, 0, -2, 1, 2, -3, 0, 0, -1, 0, -1, -2, 1, 0, -4, -1, 1, 0, 2, -3,
75 | -1, 1, -1, -2, 1, -1, 2, -1, -2, 1, -2, 0, -2, 0, 1, -2, -1, 0, 2, 0, -2, -1, 0,
76 | -1, -2, -1, 1, 3, -3, -2, 0, 0, -1, 0, 0, -1, -1, -3, -1, 1, 0, -2, 0, -1, 0,
77 | -2, 0, 0, 1, -1, 0, 1, -1, 3, -2, 0, 0, -3, 0, 2, -2, -1, 2, -1, -1, -1, -2, 0,
78 | -2, -2, 0, -1, -3, 0, 0, 0, 0, -3, 0, -1, 0, 0, 0, 1, 1, -1, -3, 0, 0, 0, -1,
79 | -3, 0, 1, -2, -1, 2, -2, -1, 0, -4, 1, 0, -2, 1, -1, 1, -1, 0, 0, 0, -1, -1, 0,
80 | -1, 1, -1, -1, 1, -1, -1, -2, -1, -1, -2, 0, 1, 0, -1, 1, -1, 0, 1, -1, -2, 1,
81 | 0, -2, 3, 0, 0, 0, -2, 0, -1, -1, -1, 0, -1, -1, -2, -1, 0, -2, -1, 0, -1, 0, 0,
82 | 0, 1, -1, 0, 0, -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, -1, 0, -2, -1, 0, -1, -2, -1,
83 | 2, -1, -1, -1, -1, 1, -2, 1, -1, 0, 1, 0, -2, 0, 0, -3, 2, -2, -1, 0, -1, 0, 1,
84 | 1, -3, 1, -1, -2, 1, -3, 0, 1, -1, 0, 0, -2, 1, 0, -2, 0, -1, -1, 0, -2, -1, -1,
85 | -1, 0, -1, -1, 0, 0, -2, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -3, 1, -1, 0,
86 | -1, 0, 0, 0, 0, -2, -1, -1, 1, -3, -1, 2, -1, 0, -1, 0, 0, -2, -1, 1, -1, 0, -1,
87 | -2, 1, -1, -2, 0, 0, -1, -2, -2, 1, 1, -1, -2, 1, 0, -2, 0, 0, 0, 0, -2, 0, 1,
88 | -1, 0, -1, 0, -2, -1, -1, 1, 0, -1, 0, -1, 0, -1, -2, 1, -1, -2, 1, 0, 1, 0, -1,
89 | 0, 0, -2, -1, 1, -1, 0, -1, 0, 0, -1, -1, -1, 1, -3, -1, 0, 0, 0, -1, 1, 1, 0,
90 | -3, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -3, -2, 0, 0, 0, -1, 0, 1, -2, -2, -1,
91 | 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -2, 1, -2, 0, 1, -1, 1, -1, 0, -1, 0,
92 | -1, 0, 0, -1, 1, -1, 1, 0, -1, -2, 0, 0, -3, 0, -1, 1, -1, -2, 0, -1, 0, -1, -1,
93 | 0, -1, 0, 0, 1, -1, 1, -1, -2, 1, -2, 0, 0, -1, 0, 0, -1, -1, 1, -2, -2, 0, -1,
94 | 0, -1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0, 1, -1, 0, 0, -1,
95 | 0, -1, 0, 0, -1, -2, 0, -1, -1, 0, -1, 1, 0, -1, 0, -1, -2, 0, 0, -1, 0, -1, -1,
96 | 0, -1, -1, -2, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, 0, -1, -1, -1,
97 | -1, 0, 1, -1, -2, 1, -1, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 0,
98 | -2, 0, -1, 0, 1, -2, -1, -1, 0, 0, -3, 1, 0, -1, 0, 0, 0, -2, 0, -2, 1, -1, -2,
99 | 1, 0, 0, -2, 0, 1, -2, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 0,
100 | 1, -1, 0, 0, -1, 0, -2, 0, -1, 0, -1, 1, 0, -2, -2, 0, 0, -3, -1, 0, -1, 0, 0,
101 | -1, 0, };
102 |
103 | #endif /* hihato_H_ */
104 |
--------------------------------------------------------------------------------
/WaveClass3PolyPlusLPF_BETA/kick909.h:
--------------------------------------------------------------------------------
1 | #ifndef kick909_H_
2 | #define kick909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define kick909_NUM_CELLS 2048
8 | #define kick909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) kick909_DATA [] = {-1, 0, -1, 0, -1, 0, 0,
11 | 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1,
12 | 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, -1, -2, -2, -3, -3, -2, -2, -2, -1, -1,
13 | -1, -1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 8, 9, 9, 10, 14, 17,
14 | 20, 24, 29, 50, 57, 49, 53, 54, 53, 53, 54, 53, 53, 53, 52, 51, 50, 48, 46, 45,
15 | 44, 42, 40, 38, 35, 33, 30, 26, 23, 19, 15, 12, 8, 5, 1, -2, -6, -9, -11, -13,
16 | -16, -17, -18, -20, -22, -23, -24, -24, -25, -26, -27, -27, -27, -27, -28, -28,
17 | -28, -28, -27, -27, -27, -26, -25, -24, -24, -23, -21, -20, -19, -17, -15, -13,
18 | -12, -10, -8, -5, -3, -1, 1, 3, 6, 8, 10, 12, 14, 17, 19, 21, 24, 25, 28, 30,
19 | 32, 33, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41,
20 | 40, 40, 39, 38, 38, 37, 37, 36, 36, 35, 34, 33, 32, 32, 30, 29, 28, 26, 24, 22,
21 | 20, 18, 17, 15, 13, 11, 9, 8, 6, 5, 3, 1, -1, -2, -4, -5, -7, -8, -9, -11, -13,
22 | -14, -16, -17, -18, -19, -20, -21, -22, -24, -25, -25, -26, -27, -27, -28, -29,
23 | -29, -30, -30, -30, -30, -31, -31, -31, -31, -31, -32, -31, -32, -32, -32, -32,
24 | -32, -32, -32, -32, -32, -32, -32, -32, -31, -31, -31, -30, -30, -30, -29, -28,
25 | -28, -27, -27, -26, -26, -25, -25, -24, -23, -22, -21, -20, -20, -19, -18, -17,
26 | -16, -15, -14, -13, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, 0, 1, 2, 3, 4, 6,
27 | 6, 8, 9, 10, 11, 12, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 27,
28 | 28, 29, 30, 30, 31, 32, 33, 33, 34, 34, 34, 34, 35, 35, 35, 36, 36, 36, 36, 36,
29 | 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36,
30 | 36, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28,
31 | 28, 27, 27, 26, 25, 25, 24, 23, 23, 21, 21, 20, 19, 18, 17, 16, 15, 14, 12, 11,
32 | 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0, -2, -3, -4, -4, -5, -6, -7, -8, -8, -9,
33 | -10, -11, -12, -12, -13, -14, -15, -16, -16, -17, -18, -19, -20, -20, -21, -22,
34 | -23, -23, -24, -25, -25, -26, -26, -27, -27, -28, -29, -29, -29, -30, -30, -31,
35 | -31, -32, -32, -32, -32, -33, -33, -33, -33, -33, -33, -34, -34, -34, -34, -34,
36 | -34, -34, -34, -34, -34, -34, -34, -34, -35, -35, -35, -35, -35, -35, -35, -35,
37 | -35, -35, -35, -35, -34, -34, -34, -34, -33, -33, -33, -33, -33, -32, -32, -32,
38 | -32, -31, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27,
39 | -27, -26, -26, -25, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18,
40 | -17, -17, -16, -15, -14, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -5,
41 | -5, -4, -3, -2, -1, -1, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 12, 13,
42 | 14, 15, 16, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28,
43 | 29, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 33, 33, 32, 33, 33, 34, 34, 34, 34,
44 | 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
45 | 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32,
46 | 32, 31, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25,
47 | 25, 24, 24, 23, 22, 22, 21, 20, 20, 19, 18, 17, 17, 16, 15, 14, 13, 12, 11, 11,
48 | 10, 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, 0, -1, -1, -2, -3, -4, -5, -5, -6, -7, -8, -9,
49 | -9, -10, -11, -12, -12, -13, -14, -14, -15, -16, -17, -17, -18, -19, -19, -20,
50 | -21, -21, -22, -23, -23, -24, -24, -25, -26, -26, -27, -27, -28, -28, -29, -30,
51 | -30, -30, -31, -31, -32, -32, -32, -33, -33, -33, -34, -34, -34, -34, -34, -35,
52 | -35, -35, -35, -35, -35, -35, -35, -36, -36, -36, -36, -36, -36, -36, -36, -36,
53 | -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
54 | -35, -35, -35, -35, -35, -34, -34, -34, -34, -34, -33, -33, -33, -33, -32, -32,
55 | -32, -32, -31, -31, -31, -31, -30, -30, -30, -29, -29, -29, -28, -28, -27, -27,
56 | -26, -26, -26, -25, -24, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17,
57 | -17, -16, -15, -15, -14, -13, -12, -12, -11, -10, -9, -9, -8, -7, -6, -6, -5,
58 | -4, -3, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13,
59 | 14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28,
60 | 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 32,
61 | 33, 33, 34, 33, 33, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 32, 33, 33, 32, 32, 32, 32, 31,
63 | 31, 31, 31, 30, 30, 30, 29, 29, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 25, 25,
64 | 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 18, 18, 17, 16, 15, 14, 13, 12, 12, 11,
65 | 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0, -1, -2, -3, -3, -4, -5, -6, -7, -7, -8, -9,
66 | -10, -10, -11, -12, -12, -13, -14, -14, -15, -15, -16, -17, -17, -18, -18, -19,
67 | -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -25, -26, -26,
68 | -27, -27, -27, -27, -28, -28, -28, -28, -29, -29, -29, -29, -29, -29, -29, -29,
69 | -29, -29, -29, -30, -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, -29, -29,
70 | -29, -29, -29, -29, -29, -29, -29, -29, -29, -28, -28, -28, -28, -28, -28, -28,
71 | -28, -27, -27, -27, -27, -27, -26, -26, -26, -26, -26, -25, -25, -25, -25, -25,
72 | -24, -24, -24, -24, -23, -23, -23, -23, -23, -22, -22, -22, -21, -21, -21, -21,
73 | -20, -20, -20, -19, -19, -19, -18, -18, -18, -17, -17, -17, -16, -16, -15, -15,
74 | -15, -14, -14, -13, -13, -13, -12, -12, -12, -11, -11, -10, -10, -10, -9, -9,
75 | -8, -8, -8, -7, -7, -7, -6, -6, -5, -5, -5, -4, -4, -4, -3, -3, -3, -2, -2, -1,
76 | -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6,
77 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6,
79 | 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
80 | 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -3, -3,
81 | -4, -4, -4, -4, -4, -5, -5, -5, -5, -6, -6, -6, -6, -6, -6, -7, -7, -7, -7, -7,
82 | -8, -8, -8, -8, -8, -8, -8, -9, -9, -9, -9, -9, -9, -9, -9, -10, -10, -10, -10,
83 | -10, -10, -10, -10, -10, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
84 | -11, -11, -11, -11, -11, -11, -11, -11, -12, -11, -11, -11, -11, -11, -11, -11,
85 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
86 | -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -10, -10,
87 | -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -9, -9,
88 | -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, -8,
89 | -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -6, -6, -6, -6, -6, -6,
90 | -6, -6, -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, -4, -4,
91 | -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
92 | -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
93 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
94 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
95 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
96 | -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
97 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4,
98 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
99 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
100 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
101 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
102 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
103 | -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
104 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
105 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
107 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3,
108 | -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2,
109 | -3, -2, -3, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
110 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
115 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
116 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
117 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, };
118 |
119 | #endif /* kick909_H_ */
120 |
--------------------------------------------------------------------------------
/WaveClass3PolyPlusLPF_BETA/snare909.h:
--------------------------------------------------------------------------------
1 | #ifndef snare909_H_
2 | #define snare909_H_
3 |
4 | #include "Arduino.h"
5 | #include
6 |
7 | #define snare909_NUM_CELLS 2048
8 | #define snare909_SAMPLERATE 16384
9 |
10 | const char __attribute__((progmem)) snare909_DATA [] = {0, -1, 0, -1, 0, -1, 0,
11 | -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0,
12 | -1, 0, 0, -2, -2, 0, -2, -1, -3, -2, 4, -3, -7, -2, 1, -7, 6, -3, -2, -6, -8, 8,
13 | -6, 0, -3, -1, -7, 0, -4, -11, -2, 3, -7, -9, 19, -1, 33, 43, 22, 60, 57, 49,
14 | 58, 55, 68, 65, 62, 60, 60, 69, 64, 61, 57, 58, 43, 50, 39, 37, 27, 17, 21, 15,
15 | 11, -2, -6, -12, -6, -23, -7, -22, -30, -22, -25, -27, -26, -31, -31, -21, -18,
16 | -8, -18, -4, 3, 1, 8, 12, 12, 19, 14, 42, 28, 21, 43, 45, 49, 46, 46, 43, 55,
17 | 44, 47, 44, 30, 46, 34, 38, 42, 24, 34, 27, 45, 23, 28, 38, 35, 36, 23, 30, 28,
18 | 40, 23, 32, 35, 29, 31, 31, 30, 28, 30, 30, 12, 13, 18, 8, 7, -2, 5, 6, -1, -7,
19 | -5, -9, -10, -11, -13, -17, -22, -25, -24, -24, -33, -28, -24, -30, -20, -28,
20 | -41, -28, -29, -26, -27, -37, -26, -29, -32, -20, -31, -26, -15, -20, -9, -14,
21 | -15, -12, -6, -7, -3, 8, 6, 15, 16, 12, 21, 30, 25, 35, 35, 29, 46, 44, 38, 49,
22 | 34, 48, 44, 44, 55, 38, 50, 41, 52, 43, 43, 53, 44, 56, 46, 39, 41, 44, 42, 42,
23 | 44, 41, 43, 35, 38, 39, 26, 30, 36, 31, 27, 26, 21, 20, 15, 9, 8, -2, 0, 10,
24 | -10, -13, -3, -17, -14, -14, -18, -7, -30, -24, -32, -26, -28, -37, -23, -35,
25 | -25, -40, -31, -34, -46, -30, -42, -38, -26, -37, -33, -32, -27, -32, -23, -23,
26 | -20, -13, -11, -10, -18, 0, -13, -3, -8, 3, -6, 4, 19, -1, 12, 14, 19, 10, 13,
27 | 9, 20, 19, 21, 23, 21, 34, 21, 24, 34, 20, 31, 28, 31, 36, 24, 33, 23, 31, 27,
28 | 30, 35, 37, 26, 17, 21, 19, 27, 21, 24, 17, 23, 19, 24, 19, 4, 23, 7, 15, 17,
29 | 14, 24, 8, 15, 10, 5, 6, 11, 12, -5, 9, 9, 10, 9, 1, 5, 0, -2, -2, 1, 1, -7, 0,
30 | 3, -2, -2, -8, -8, -19, -4, -18, -6, -4, -11, -5, -15, -1, -28, -12, -19, -10,
31 | -15, -23, -19, -23, -9, -25, -22, -21, -22, -18, -23, -18, -16, -31, -28, -23,
32 | -20, -27, -15, -26, -23, -22, -23, -16, -22, -29, -20, -11, -29, -12, -17, -14,
33 | -15, -12, -16, -22, -21, -8, -11, -16, -8, -13, -12, -8, -15, -14, -9, -14, -2,
34 | -13, 3, -9, -12, 9, 3, 0, 7, -3, 0, 9, 2, 9, 7, 5, 4, 18, 12, 3, 14, 17, 16, 19,
35 | 14, 6, 21, 24, 23, 18, 24, 18, 11, 25, 25, 20, 24, 22, 5, 27, 20, 13, 25, 28,
36 | 17, 19, 11, 14, 24, 10, 23, 10, 23, 19, 16, 9, 14, 9, 14, 17, 6, 13, 8, 11, -1,
37 | 17, 9, 0, 6, 4, -1, 3, -12, -10, -4, -12, -9, -14, -5, -24, -11, -14, -21, -16,
38 | -13, -18, -30, -17, -29, -25, -21, -21, -29, -30, -15, -34, -30, -21, -29, -25,
39 | -26, -28, -36, -27, -30, -28, -25, -21, -11, -31, -18, -21, -12, -12, -12, -13,
40 | -17, -15, -17, 0, -21, -9, 3, -3, -1, -7, 2, -3, 3, 3, -9, 13, 8, 5, -3, 9, 13,
41 | 3, 18, 6, 13, 13, 15, 12, 7, 10, 14, 12, 11, 3, 12, 15, 17, 6, 7, 26, -1, 16,
42 | 19, 8, 16, 12, 15, 1, 10, 20, 7, 7, 8, 17, 1, 3, 12, 8, 7, 10, 9, -4, 1, -3, 5,
43 | 1, 0, 1, 4, 3, -6, 1, -2, -2, -10, -7, -1, -3, -4, -19, 0, -10, -13, -4, -15,
44 | -8, -4, -13, -24, -10, -8, -13, -10, -11, -24, -14, -18, -6, -9, -24, -20, -10,
45 | -12, -18, -11, -14, -13, -18, -17, -28, -8, -27, -20, -14, -15, -11, -18, -9,
46 | -16, -15, -17, -16, -6, -13, -17, 3, -25, -1, -11, -4, -6, -8, -5, -14, 0, -11,
47 | 5, -3, 0, 0, -1, -12, 0, -2, -5, 6, 5, 4, 4, -11, 2, 3, -4, 12, 1, 5, -2, 3, -3,
48 | 0, 2, 6, 7, -7, 2, 1, 6, 5, -2, 0, 2, 1, 9, 1, 9, -5, -6, 7, -2, 5, -3, 16, -1,
49 | 1, 2, 4, 10, -3, 17, -2, 6, 7, 2, 9, -2, 1, -6, 10, -5, -1, 3, -8, 11, -6, 7,
50 | -1, -7, 2, -3, -6, 1, -3, -11, -3, -3, -7, -12, -4, -7, -10, -9, -18, -6, -11,
51 | -20, -3, -12, -6, -10, -24, -9, -16, -18, -9, -18, -20, -11, -9, -15, -24, -10,
52 | -20, -27, -13, -14, -13, -19, -18, -23, -21, -17, -14, -22, -15, -21, -19, -14,
53 | -19, -11, -15, -15, -17, -17, -18, -12, -12, -12, -8, -10, -17, -9, -14, -3, -5,
54 | -10, -9, -10, -8, -10, 7, -5, -3, 0, -2, 3, -3, 6, -6, -7, -1, 3, 5, 1, 4, -12,
55 | 8, 5, -1, 11, 6, -4, 3, 6, -1, 10, 1, 7, 2, 7, 6, -6, 2, 3, 3, 1, 6, 0, -3, 5,
56 | 5, 7, 1, -3, -2, -2, 6, 2, -3, 0, 3, 4, -4, 2, -5, -1, -2, -4, 0, -8, -8, -5, 2,
57 | -9, -6, -1, -2, -9, -6, -12, 1, -10, -14, -9, -13, -10, -10, -9, -10, -7, -17,
58 | -3, -13, -7, -12, -15, -16, -10, -9, -16, -7, -11, -11, -13, -14, -9, -11, -16,
59 | -17, -12, -10, -16, -10, -11, -14, -4, -14, -17, -7, -12, -6, -16, -2, -7, -9,
60 | -10, -9, -5, -18, 1, -8, 0, 1, -9, -16, -4, -3, -6, 4, -9, -2, -10, 0, 1, -10,
61 | 3, -1, -3, -2, -4, 0, 3, -3, 0, -1, 0, 2, -4, 2, -3, -8, 0, -5, 5, -7, -4, 3,
62 | -9, 6, -10, 5, 1, -4, 2, -8, 2, -6, 2, -1, 2, -2, -6, 1, -6, -5, -3, 7, -8, -5,
63 | 2, -7, -1, -8, 3, 0, 0, 1, -6, -3, -5, -3, -3, -9, -6, 1, -7, -5, -3, -3, -6,
64 | -11, -5, -1, -8, -15, -1, -8, -8, 0, -13, -9, 0, -14, -10, -9, -9, -11, -3, -11,
65 | -14, -7, -5, -4, -12, -18, -16, -2, -19, -7, -13, -5, -12, -10, -6, -23, -4,
66 | -10, -11, -8, -10, -14, -12, -5, -14, -13, -3, -8, -16, -10, -8, -15, -6, -13,
67 | -10, -11, -8, -6, -12, -9, -8, -10, -10, -8, -4, -13, -5, -6, -11, 2, -14, -2,
68 | -6, -7, -1, -11, 1, -4, -9, 3, -3, 2, -8, -1, -2, -7, -1, 0, 4, -3, 3, -7, 2,
69 | -3, -1, 1, -3, -2, -1, 7, -4, 1, -2, -2, -4, -3, 8, -9, 1, -1, -3, 4, -6, 3, 3,
70 | 0, -1, -5, -7, -2, 1, -4, 3, 0, -9, 0, -4, 4, -5, -4, 1, -3, -4, -5, -3, -7, -8,
71 | -7, 2, -9, -8, -2, -7, -3, -10, -6, -4, -12, -6, -10, -7, -10, -10, -5, -11, -3,
72 | -7, -13, -10, -8, -6, -15, -7, -7, -11, -9, -11, -8, -10, -11, -8, -6, -12, -8,
73 | -10, -8, -6, -10, -7, -8, -7, -8, -11, -3, -4, -5, -6, -12, -8, -6, -6, -3, -6,
74 | -6, -6, -2, 1, -12, -5, -4, -6, -1, -1, -7, -5, -4, -3, 1, -6, 2, -6, 0, -5, -9,
75 | 4, -7, -2, 2, -3, 1, -3, -4, -4, -1, -2, -4, 3, -5, -2, -3, -4, -1, -4, 1, -1,
76 | -10, 1, 0, -9, 2, -3, -6, -2, 6, -5, -6, -2, -3, -3, -4, -4, -6, -1, -5, -6, -1,
77 | -2, -9, -1, -2, -5, -3, 0, -5, -7, -5, -8, -1, -7, -6, -4, -2, -6, -7, -7, -8,
78 | -5, 0, -4, -12, -4, -10, -3, -4, -11, -3, -6, -6, -6, -9, -7, -9, -7, -5, -7,
79 | -2, -10, -10, -3, -10, -5, -7, -10, -6, -12, -6, -9, -4, -7, -8, -5, -12, -6,
80 | -5, -4, -9, -4, -7, -5, -5, -8, -7, -7, -9, -7, -5, -11, -3, -6, -3, -5, -8, -4,
81 | -3, -6, -8, -6, -5, -4, -5, -6, -2, -6, -6, -2, -5, -3, -4, -5, -7, -3, -2, -2,
82 | -2, -9, 1, -3, -8, 0, -3, 0, -5, -3, -2, -1, 0, -3, -3, -4, 1, -2, -8, 3, -1,
83 | -5, 1, 0, -3, -4, -4, -1, 0, -3, 2, -6, -1, -3, -6, 2, -4, -3, -3, -1, -1, -5,
84 | -3, 0, 0, -6, -1, -4, -5, -3, 0, -1, -4, -8, -4, 0, -9, 0, -4, -5, -4, -1, -5,
85 | -6, -4, -6, -3, -6, -6, -9, -4, -4, -7, -4, -3, -10, -6, -6, -5, -5, -8, -5, -9,
86 | -5, -6, -5, -6, -9, -8, -4, -5, -10, -3, -7, -6, -6, -4, -6, -9, -4, -6, -2, -7,
87 | -2, -3, -7, -4, -7, -3, -5, -3, -4, -7, -4, -3, -3, -2, -1, -5, -4, -3, -4, -3,
88 | -3, -2, -3, -1, -3, -7, 0, -3, 2, -1, -5, -3, -1, -3, -5, 1, -8, 2, -5, 0, -1,
89 | -6, -1, -2, 2, -5, -1, -1, -2, -2, -1, -6, 0, -5, -2, 0, -5, -2, -4, 1, -5, -4,
90 | -2, 0, -5, -3, 0, -5, -1, -2, -3, -3, -4, -2, -3, -3, -5, -4, -2, -6, -3, -6,
91 | -4, -3, -6, -3, -2, -5, -5, -5, -4, -5, -3, -3, -8, -2, -6, -3, -4, -9, -1, -8,
92 | -4, -4, -7, -2, -6, -3, -5, -4, -3, -5, -3, -8, -4, -8, -5, -3, -8, -1, -7, -2,
93 | -4, -6, -5, -3, -4, -3, -4, -4, -1, -5, -2, -5, -2, -3, -4, -3, -5, -2, -4, -1,
94 | -4, -4, -1, -3, -1, -4, -4, -3, -2, -3, -1, -3, -5, -2, -1, -3, -2, 0, -4, -2,
95 | -3, -4, -2, -3, -2, -2, -1, -3, -4, -2, -3, -2, -3, 0, -5, -2, -1, -3, -1, -2,
96 | -1, -5, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -4, -2, -1, -3, -2, -2, -2, -2,
97 | -1, -4, -4, -1, -3, -2, -1, -6, -1, -4, -4, -2, -5, -1, -4, -1, -4, -4, -2, -3,
98 | -4, -2, -4, -4, -3, -4, -1, -5, -5, -3, -3, -4, -4, -5, -3, -3, -6, -4, -4, -3,
99 | -4, -4, -3, -4, -3, -5, -5, -4, -6, -2, -6, -3, -4, -4, -3, -5, -2, -5, -5, -3,
100 | -3, -4, -4, -4, -2, -3, -4, -4, -4, -2, -3, -3, -3, -3, -3, -2, -2, -4, -1, -2,
101 | -3, -1, -3, -1, -2, -3, -3, -1, -4, -3, -1, -2, -2, -1, -2, -2, -2, -3, -1, -2,
102 | -1, -1, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -2, -1, -2, -2, -1, -2,
103 | -2, -2, -1, -2, -2, -1, -2, -2, -1, -2, -2, -2, -2, -1, -2, -3, -2, -2, -2, -2,
104 | -2, -2, -2, -2, -3, -3, -2, -2, -3, -2, -3, -3, -3, -3, -2, -3, -2, -3, -3, -3,
105 | -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3,
106 | -3, -3, -3, -3, -3, -3, -2, -3, -3, -2, -3, -2, -2, -2, -2, -2, -3, -2, -2, -3,
107 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
108 | -1, -2, -2, -2, -2, -1, -2, -1, -1, -2, -2, -1, -2, -1, -2, -2, -2, -2, -1, -2,
109 | -2, -2, -2, -1, -1, -2, -1, -2, -1, -2, -2, -1, -1, -1, -2, -1, -2, -1, -2, -1,
110 | -1, -2, -1, -1, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
111 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
112 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
113 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
114 | -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, };
115 |
116 | #endif /* snare909_H_ */
117 |
--------------------------------------------------------------------------------
/WaveClass4PolyPlusLPF_BETA/ADSRslow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ADSR.h
3 | *
4 | * Copyright 2012 Tim Barrass.
5 | *
6 | * This file is part of Mozzi.
7 | *
8 | * Mozzi is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * Mozzi is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with Mozzi. If not, see .
20 | *
21 | */
22 |
23 | #ifndef ADSR_H_
24 | #define ADSR_H_
25 |
26 | #include "Arduino.h"
27 | //#include
28 | #include "Line.h"
29 | #include "mozzi_fixmath.h"
30 |
31 | /** A simple ADSR envelope generator.
32 | @todo Test whether using the template parameter makes any difference to speed,
33 | and rationalise which units which do and don't need them.
34 | Template objects are messy when you try to use pointers to them,
35 | you have to include the whole template shebang in the pointer handling.
36 | */
37 | template
38 | class ADSR
39 | {
40 | private:
41 |
42 | const unsigned int AUDIO_TICKS_PER_CONTROL;
43 |
44 | unsigned int phase_control_step_counter;
45 | unsigned int phase_num_control_steps;
46 |
47 | enum {ATTACK,DECAY,SUSTAIN,RELEASE,IDLE};
48 |
49 |
50 | struct phase{
51 | byte phase_type;
52 | unsigned int control_steps;
53 | unsigned long audio_steps;
54 | Q8n0 level;
55 | }attack,decay,sustain,release,idle;
56 |
57 | phase * current_phase;
58 |
59 | // Linear audio rate transitions for envelope
60 | Line transition;
61 |
62 | inline
63 | unsigned int convertMsecToControlSteps(unsigned int msec){
64 | return (uint) (((ulong)msec*CONTROL_UPDATE_RATE)>>10); // approximate /1000 with shift
65 | }
66 |
67 | inline
68 | void setPhase(phase * next_phase) {
69 | phase_control_step_counter = 0;
70 | phase_num_control_steps = next_phase->control_steps;
71 | transition.set(Q8n0_to_Q16n16(next_phase->level),next_phase-> control_steps);
72 | current_phase = next_phase;
73 | }
74 |
75 |
76 |
77 | inline
78 | void checkForAndSetNextPhase(phase * next_phase) {
79 | if (++phase_control_step_counter >= phase_num_control_steps){
80 | setPhase(next_phase);
81 | }
82 | }
83 |
84 |
85 | inline
86 | void checkForAndSetIdle() {
87 | if (++phase_control_step_counter >= phase_num_control_steps){
88 | transition.set(0,0,1);
89 | current_phase = &idle;
90 | }
91 | }
92 |
93 |
94 |
95 | inline
96 | void setTime(phase * p, unsigned int msec)
97 | {
98 | p->control_steps=convertMsecToControlSteps(msec);
99 | p->audio_steps = (ulong) p->control_steps * AUDIO_TICKS_PER_CONTROL;
100 | }
101 |
102 |
103 | public:
104 |
105 | /** Constructor.
106 | */
107 | ADSR():AUDIO_TICKS_PER_CONTROL(AUDIO_RATE/CONTROL_UPDATE_RATE)
108 | {
109 | attack.phase_type = ATTACK;
110 | decay.phase_type = DECAY;
111 | sustain.phase_type = SUSTAIN;
112 | release.phase_type = RELEASE;
113 | idle.phase_type = IDLE;
114 | release.level = 0;
115 | }
116 |
117 |
118 | /** Updates the internal controls of the ADSR.
119 | Call this in updateControl().
120 | */
121 | void update(){ // control rate
122 |
123 | switch(current_phase->phase_type) {
124 |
125 | case ATTACK:
126 | checkForAndSetNextPhase(&decay);
127 | break;
128 |
129 | case DECAY:
130 | checkForAndSetNextPhase(&sustain);
131 | break;
132 |
133 | case SUSTAIN:
134 | checkForAndSetNextPhase(&release);
135 | break;
136 |
137 | case RELEASE:
138 | checkForAndSetIdle();
139 | break;
140 |
141 | }
142 | }
143 |
144 | /** Advances one audio step along the ADSR and returns the level.
145 | Call this in updateAudio().
146 | @return the next value, as an unsigned int.
147 | */
148 | inline
149 | unsigned int next()
150 | {
151 | return Q16n16_to_Q16n0(transition.next());
152 | }
153 |
154 |
155 |
156 | /** Start the attack phase of the ADSR. THis will restart the ADSR no matter what phase it is up to.
157 | */
158 | inline
159 | void noteOn(){
160 | setPhase(&attack);
161 | }
162 |
163 |
164 |
165 | /** Start the release phase of the ADSR.
166 | @todo fix release for rate rather than steps (time), so it releases at the same rate whatever the current level.
167 | */
168 | inline
169 | void noteOff(){
170 | setPhase(&release);
171 | }
172 |
173 |
174 |
175 |
176 |
177 | /** Set the attack level of the ADSR.
178 | @param value the attack level.
179 | */
180 | inline
181 | void setAttackLevel(byte value)
182 | {
183 | attack.level=value;
184 | }
185 |
186 |
187 |
188 | /** Set the decay level of the ADSR.
189 | @param value the decay level.
190 | */
191 | inline
192 | void setDecayLevel(byte value)
193 | {
194 | decay.level=value;
195 | }
196 |
197 |
198 | /** Set the sustain level of the ADSR.
199 | @param value the sustain level. Usually the same as the decay level,
200 | for a steady sustained note.
201 | */
202 | inline
203 | void setSustainLevel(byte value)
204 | {
205 | sustain.level=value;
206 | }
207 |
208 | /** Set the release level of the ADSR. Normally you'd make this 0,
209 | but you have the option of some other value.
210 | @param value the release level (normally 0).
211 | */
212 | inline
213 | void setReleaseLevel(byte value)
214 | {
215 | release.level=value;
216 | }
217 |
218 |
219 |
220 | /** Set the attack and decay levels of the ADSR. This assumes a conventional
221 | ADSR where the sustain continues at the same level as the decay, till the release ramps to 0.
222 | @param attack the new attack level.
223 | @param value the new sustain level.
224 | */
225 | inline
226 | void setADLevels(byte attack, byte decay)
227 | {
228 | setAttackLevel(attack);
229 | setDecayLevel(decay);
230 | setSustainLevel(decay);
231 | setReleaseLevel(0);
232 | }
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | /** Set the attack time of the ADSR in milliseconds.
241 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
242 | @param value the unsigned int attack time in milliseconds.
243 | */
244 | inline
245 | void setAttackTime(unsigned int msec)
246 | {
247 | setTime(&attack, msec);
248 | }
249 |
250 |
251 | /** Set the decay time of the ADSR in milliseconds.
252 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
253 | @param value the unsigned int decay time in milliseconds.
254 | */
255 | inline
256 | void setDecayTime(unsigned int msec)
257 | {
258 | setTime(&decay, msec);
259 | }
260 |
261 |
262 | /** Set the sustain time of the ADSR in milliseconds.
263 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
264 | The sustain phase will finish if the ADSR recieves a noteOff().
265 | @param value the unsigned int sustain time in milliseconds.
266 | */
267 | inline
268 | void setSustainTime(unsigned int msec)
269 | {
270 | setTime(&sustain, msec);
271 | }
272 |
273 |
274 |
275 | /** Set the release time of the ADSR in milliseconds.
276 | The actual time taken will be resolved within the resolution of CONTROL_RATE.
277 | @param value the unsigned int release time in milliseconds.
278 | */
279 | inline
280 | void setReleaseTime(unsigned int msec)
281 | {
282 | setTime(&release, msec);
283 | }
284 |
285 |
286 |
287 | /** Set the attack, decay and release times of the ADSR in milliseconds.
288 | The actual times will be resolved within the resolution of CONTROL_RATE.
289 | @param attack_ms the new attack time in milliseconds.
290 | @param decay_ms the new decay time in milliseconds.
291 | @param decay_ms the new sustain time in milliseconds.
292 | @param release_ms the new release time in milliseconds.
293 | */
294 | inline
295 | void setTimes(unsigned int attack_ms, unsigned int decay_ms, unsigned int sustain_ms, unsigned int release_ms)
296 | {
297 | setAttackTime(attack_ms);
298 | setDecayTime(decay_ms);
299 | setSustainTime(sustain_ms);
300 | setReleaseTime(release_ms);
301 | }
302 |
303 |
304 | };
305 |
306 | #endif /* ADSR_H_ */
307 |
308 |
--------------------------------------------------------------------------------
/WaveClass4PolyPlusLPF_BETA/Wave.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Wave.h
3 | *
4 | * Simon Green 2013.
5 | *
6 | * Based on Mozzi "Oscil.h"
7 | */
8 |
9 | #ifndef WAVE_H_
10 | #define WAVE_H_
11 |
12 | #include "Arduino.h"
13 | #include "mozzi_fixmath.h"
14 | #include
15 |
16 | // fractional bits for oscillator index precision
17 | #define OSCIL_F_BITS 16
18 | #define OSCIL_F_BITS_AS_MULTIPLIER 65536
19 | #define NUM_TABLE_CELLS 256
20 | #define ADJUST_FOR_NUM_TABLE_CELLS 8
21 | #define UPDATE_RATE AUDIO_RATE
22 |
23 | /** Generate waveform
24 | */
25 |
26 | enum WaveType { WAVE_SAW=0, WAVE_TRI, WAVE_RECT, WAVE_NOISE };
27 |
28 | class Wave
29 | {
30 | public:
31 | /** Constructor. "Wave mywave;" makes a Wave oscillator
32 | */
33 | Wave () {
34 | phase_fractional = 0;
35 | phase_increment_fractional = 0;
36 | wavetype = WAVE_SAW;
37 | noise = 0xACE1;
38 | pulse_width = 128;
39 | }
40 |
41 | /** Increments one step along the phase.
42 | @return the next value.
43 | */
44 | inline
45 | char next()
46 | {
47 | incrementPhase();
48 |
49 | char w;
50 | //ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
51 | {
52 | int n = (phase_fractional >> OSCIL_F_BITS) & (NUM_TABLE_CELLS-1);
53 | switch(wavetype) {
54 | case WAVE_SAW:
55 | w = n - 128;
56 | break;
57 | case WAVE_TRI:
58 | if (n & 0x80) // >= 128
59 | w = ((n^0xFF)<<1)-128;
60 | else
61 | w = (n<<1)-128;
62 | break;
63 | case WAVE_RECT:
64 | if (n > pulse_width)
65 | w = 127;
66 | else
67 | w = -127;
68 | break;
69 | case WAVE_NOISE:
70 | noise = (noise >> 1) ^ (-(noise & 1) & 0xB400u);
71 | w = noise>>8;
72 | break;
73 | }
74 | }
75 | return w;
76 | }
77 |
78 | /** Set the wave type
79 | */
80 | inline
81 | void setType(WaveType x)
82 | {
83 | wavetype = x;
84 | }
85 |
86 | WaveType getType() { return wavetype; }
87 |
88 | /** Set the pulse width for rectangle wave
89 | */
90 | inline
91 | void setPulseWidth(unsigned char x)
92 | {
93 | pulse_width = x;
94 | }
95 |
96 | /** Set the oscillator frequency with an unsigned int. This is faster than using a
97 | float, so it's useful when processor time is tight, but it can be tricky with
98 | low and high frequencies, depending on the size of the wavetable being used. If
99 | you're not getting the results you expect, try explicitly using a float, or try
100 | setFreq_Q24n8() or or setFreq_Q16n16().
101 | @param frequency to play the wave table.
102 | */
103 | inline
104 | void setFreq (unsigned int frequency) {
105 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
106 | {
107 | phase_increment_fractional = ((((unsigned long)NUM_TABLE_CELLS<>3)/(UPDATE_RATE>>6)) << (F_BITS-(8-3+6));
140 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>3)*frequency)/(UPDATE_RATE>>6))
141 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - (8-3+6));
142 | }
143 | }
144 |
145 |
146 | /** Set the frequency using Q16n16 fixed-point number format. This is useful in
147 | combination with Q16n16_mtof(), a fast alternative to mtof(), using Q16n16
148 | fixed-point format instead of floats. Note: this should work OK with tables 2048 cells or smaller and
149 | frequencies up to 4096 Hz. Can't be used with UPDATE_RATE less than 64 Hz.
150 | @param frequency in Q16n16 fixed-point number format.
151 | */
152 | inline
153 | void setFreq_Q16n16(Q16n16 frequency)
154 | {
155 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
156 | {
157 | //phase_increment_fractional = ((frequency * (NUM_TABLE_CELLS>>7))/(UPDATE_RATE>>6)) << (F_BITS-16+1);
158 | phase_increment_fractional = (((((unsigned long)NUM_TABLE_CELLS<>7)*frequency)/(UPDATE_RATE>>6))
159 | << (OSCIL_F_BITS - ADJUST_FOR_NUM_TABLE_CELLS - 16 + 1);
160 |
161 | }
162 | }
163 |
164 | private:
165 | /** Increments the phase of the oscillator without returning a sample.
166 | */
167 | inline
168 | void incrementPhase()
169 | {
170 | //phase_fractional += (phase_increment_fractional | 1); // odd phase incr, attempt to reduce frequency spurs in output
171 | phase_fractional += phase_increment_fractional;
172 | }
173 |
174 | unsigned long phase_fractional;
175 | volatile unsigned long phase_increment_fractional;
176 |
177 | unsigned char pulse_width;
178 | uint16_t noise;
179 |
180 | WaveType wavetype;
181 | };
182 |
183 | #endif /* WAVE_H_ */
184 |
--------------------------------------------------------------------------------
/fm_v1_ino/fm_v1_ino.ino:
--------------------------------------------------------------------------------
1 | /* Example of a sound being triggered by MIDI input.
2 | *
3 | * Demonstrates playing notes with Mozzi in response to MIDI input,
4 | * using the standard Arduino MIDI library:
5 | * http://playground.arduino.cc/Main/MIDILibrary
6 | *
7 | * Mozzi help/discussion/announcements:
8 | * https://groups.google.com/forum/#!forum/mozzi-users
9 | *
10 | * Tim Barrass 2013.
11 | * This example code is in the public domain.
12 | *
13 | * sgreen - modified to use standard Arduino midi library, added saw wave, lowpass filter
14 | * Audio output from pin 9 (pwm)
15 | * Midi plug pin 2 (centre) to Arduino gnd, pin 5 to RX (0)
16 | * http://www.philrees.co.uk/midiplug.htm
17 | *
18 | * dgreen - nutty portamento added!
19 | */
20 |
21 | #include
22 | #include
23 | #include // oscillator template
24 | #include // for envelope
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include // table for Oscils to play
30 | #include // table for Oscils to play
31 |
32 | // use #define for CONTROL_RATE, not a constant
33 | #define CONTROL_RATE 256 // powers of 2 please
34 |
35 | // Mozzi example uses COS waves for carrier and modulator
36 | // Shit gets brutal very fast if you use a saw/square carrier
37 | // Shit gets subtly more brutal if you use smaller wavetables (fewer samples per cycle)
38 | Oscil oscCarrier(SQUARE_ANALOGUE2048_DATA);
39 | Oscil oscModulator(COS2048_DATA);
40 | Oscil oscLFO(COS2048_DATA);
41 |
42 | // envelope generator
43 | ADSR envelope;
44 | Portamento aPortamento;
45 |
46 | #define LED 13 // to see if MIDI is being recieved
47 |
48 | unsigned long vibrato = 0;
49 | float carrierFreq = 10.f;
50 | float modFreq = 10.f;
51 | float modDepth = 0;
52 | float amplitude = 0.f;
53 | float modOffset = 1;
54 | byte lastnote = 0;
55 | int portSpeed = 100;
56 |
57 | float modOffsets[] = {
58 | 4, 3.5, 3, 2.5,
59 | 2, 1.5, 1, 0.6666667,
60 | 0.5, 0.4, 0.3333333, 0.2857,
61 | 0.25, 0, 0, 0,
62 | 0, 0, 0
63 | }; // freq ratios corresponding to DP's preferred intervals of 7, 12, 7, 19, 24, 0, 12, -12, etc
64 |
65 | void setup()
66 | {
67 | pinMode(LED, OUTPUT);
68 |
69 | MIDI.begin(MIDI_CHANNEL_OMNI);
70 | MIDI.setHandleNoteOn(HandleNoteOn);
71 | MIDI.setHandleNoteOff(HandleNoteOff);
72 | MIDI.setHandleControlChange(HandleControlChange);
73 | MIDI.setHandlePitchBend(HandlePitchBend);
74 | MIDI.setHandleProgramChange(HandleProgramChange);
75 | MIDI.setHandleContinue(HandleContinue);
76 |
77 | envelope.setADLevels(255, 174);
78 | envelope.setTimes(10, 50, 20000, 10); // 20000 is so the note will sustain 20 seconds unless a noteOff comes
79 | aPortamento.setTime(50u);
80 | oscLFO.setFreq(10); // default frequency
81 |
82 | startMozzi(CONTROL_RATE);
83 | }
84 |
85 |
86 | void HandleProgramChange (byte channel, byte number)
87 | {
88 | // Use MIDI Program Change to select an interval between carrier and modulator oscillator
89 | modOffset = modOffsets[number % 15];
90 | }
91 |
92 | void HandleNoteOn(byte channel, byte note, byte velocity)
93 | {
94 | aPortamento.start((byte)(((int) note) - 5));
95 |
96 | lastnote = note;
97 | envelope.noteOn();
98 |
99 | digitalWrite(LED, HIGH);
100 | }
101 |
102 | void HandleContinue ()
103 | {
104 | portSpeed += 100;
105 |
106 | if (portSpeed > 500)
107 | {
108 | portSpeed = 0;
109 | }
110 |
111 | aPortamento.setTime(portSpeed);
112 | }
113 |
114 | void HandleNoteOff(byte channel, byte note, byte velocity)
115 | {
116 | if (note == lastnote)
117 | {
118 | envelope.noteOff();
119 | digitalWrite(LED, LOW);
120 | }
121 | }
122 |
123 | void HandlePitchBend (byte channel, int bend)
124 | {
125 | float shifted = float ((bend + 8500) / 2048.f) + 0.1f;
126 | oscLFO.setFreq(shifted);
127 | }
128 |
129 | void HandleControlChange (byte channel, byte number, byte value)
130 | {
131 | if(number == 1)
132 | {
133 | float divided = float(value / 46.f);
134 | modDepth = (divided * divided);
135 | if (modDepth > 5)
136 | {
137 | modDepth = 5;
138 | }
139 | if (modDepth < 0.2)
140 | {
141 | modDepth = 0;
142 | }
143 | }
144 | }
145 |
146 | void updateControl()
147 | {
148 | MIDI.read();
149 | envelope.update();
150 | carrierFreq = Q16n16_to_float (aPortamento.next()); //NB presumably returns frequency as Q16n16
151 | modFreq = carrierFreq * modOffset;
152 | oscCarrier.setFreq(carrierFreq);
153 | oscModulator.setFreq(modFreq);
154 | }
155 |
156 | int updateAudio()
157 | {
158 | vibrato = (unsigned long) (oscLFO.next() * oscModulator.next()) >> 7;
159 | vibrato *= (unsigned long) (carrierFreq * modDepth) >> 3;
160 | return (int) ((oscCarrier.phMod(vibrato)) * (envelope.next())) >> 7;
161 | }
162 |
163 | void loop()
164 | {
165 | audioHook();
166 | }
167 |
168 |
--------------------------------------------------------------------------------