30 Serial.println(
"Tests done");
58 int8_t
pitches[] = { 0, 2, 4, 5, 7, 9, 11, 12 };
59 extern uint32_t
tune[];
70 static uint8_t led_time;
79 digitalWrite(LED_BUILTIN, HIGH);
81 digitalWrite(LED_BUILTIN, LOW);
93 return (digitalReadFast(
id) == LOW);
118 #define NUM_NOISY_VOICES 4
119 #define NUM_SIMPLE_VOICES 14
120 #define NUM_SQUARE_VOICES 8
133 analogWriteResolution(12);
134 Timer1.initialize((
int) (1000000 *
DT));
136 pinMode(0, INPUT_PULLUP);
137 pinMode(1, INPUT_PULLUP);
138 pinMode(2, INPUT_PULLUP);
139 pinMode(3, INPUT_PULLUP);
140 pinMode(4, INPUT_PULLUP);
141 pinMode(5, INPUT_PULLUP);
142 pinMode(6, INPUT_PULLUP);
143 pinMode(7, INPUT_PULLUP);
144 pinMode(8, INPUT_PULLUP);
145 pinMode(9, INPUT_PULLUP);
146 pinMode(10, INPUT_PULLUP);
147 pinMode(LED_BUILTIN, OUTPUT);
149 for (i = 0; i <
NUM_KEYS - 3; i++) {
150 keyboard[i] =
new Key();
157 keyboard[i]->
pitch = 0;
168 keyboard[i]->check();
170 uint32_t msecs = (micros() -
start_time) / 1000;
175 for (i = 0; i < 64; i++)
#define NUM_SIMPLE_VOICES
void use_synth_array(ISynth **s, uint8_t _num_synths)
uint8_t read_key(uint32_t id)
uint8_t play_tune(uint32_t *tune, uint32_t msecs)
virtual void compute_sample(void)=0
void use_synth(uint8_t i)
#define NUM_SQUARE_VOICES
Synthesizer modules and supporting functions.
void timer_interrupt(void)