
Go to the source code of this file.
Data Structures | |
| class | ThreadSafeSynth |
| class | FunctionKey |
Macros | |
| #define | KEYBOARD 1 |
| #define | NUM_KEYS 11 |
| #define | NUM_NOISY_VOICES 4 |
| #define | NUM_SIMPLE_VOICES 14 |
| #define | NUM_SQUARE_VOICES 8 |
Functions | |
| void | timer_interrupt (void) |
| uint8_t | read_key (uint32_t id) |
| void | setup () |
| void | loop (void) |
Variables | |
| Key * | keyboard [NUM_KEYS] |
| ThreadSafeSynth | s |
| ThreadSafeSynth | s2 |
| ThreadSafeSynth | s3 |
| ISynth * | synth_ary [3] |
| int8_t | pitches [] = { 0, 2, 4, 5, 7, 9, 11, 12 } |
| uint32_t | tune [] |
| uint32_t | start_time |
| uint32_t | tune_pointer |
| #define KEYBOARD 1 |
Definition at line 7 of file teensy.ino.
| #define NUM_KEYS 11 |
Definition at line 8 of file teensy.ino.
| #define NUM_NOISY_VOICES 4 |
Referenced by setup().
| #define NUM_SIMPLE_VOICES 14 |
Referenced by setup().
| #define NUM_SQUARE_VOICES 8 |
Referenced by setup().
| void loop | ( | void | ) |
Arduino loop function
Definition at line 164 of file teensy.ino.

| uint8_t read_key | ( | uint32_t | id | ) |
Keyboard scanning passes thru this function because all Teensy-specific code lives in this file. If you're thinking about touch-sensitive keys or other exotica, this is the place for that. Also, if keys are assigned special functions, that should be handled here.
Definition at line 91 of file teensy.ino.
| void setup | ( | ) |
Note that there are different numbers of voices assigned for the different types of voice. The more complicated a voice is, the less polyphony is possible. There are two ways to address this.
Definition at line 106 of file teensy.ino.

| void timer_interrupt | ( | void | ) |
The timer interrupt takes audio samples from the queue and feeds them to the 12-bit DAC. If there is a queue underrun, it turns on the LED briefly but visibly.
Definition at line 68 of file teensy.ino.
Referenced by setup().


| Key * keyboard |
Definition at line 9 of file teensy.ino.
| int8_t pitches[] = { 0, 2, 4, 5, 7, 9, 11, 12 } |
Definition at line 58 of file teensy.ino.
Referenced by setup().
Definition at line 55 of file teensy.ino.
Referenced by FunctionKey::keydown(), ADSR::setS(), setup(), and use_synth_array().
Definition at line 55 of file teensy.ino.
Referenced by FunctionKey::keydown(), and setup().
Definition at line 55 of file teensy.ino.
Referenced by FunctionKey::keydown(), and setup().
| uint32_t start_time |
Definition at line 60 of file teensy.ino.
| ISynth* synth_ary[3] |
Definition at line 56 of file teensy.ino.
| uint32_t tune_pointer |
Definition at line 61 of file teensy.ino.
Referenced by setup().
1.8.6