|
|
@ -9,19 +9,21 @@ class AudioTimer : public AudioStream |
|
|
|
{ |
|
|
|
{ |
|
|
|
tick = 0; |
|
|
|
tick = 0; |
|
|
|
bpm = 60; |
|
|
|
bpm = 60; |
|
|
|
sequencer_step_function = NULL; |
|
|
|
steps = 4; |
|
|
|
|
|
|
|
step_function = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
virtual uint32_t get_tick(void); |
|
|
|
virtual uint32_t get_tick(void); |
|
|
|
virtual void set_bpm(uint8_t b); |
|
|
|
virtual void set_bpm(uint8_t b); |
|
|
|
virtual void function(uint8_t steps, void(*func)()); |
|
|
|
virtual void function(uint8_t stepping, void(*func)()); |
|
|
|
virtual void update(void); |
|
|
|
virtual void update(void); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
audio_block_t *inputQueueArray[1]; |
|
|
|
audio_block_t *inputQueueArray[1]; |
|
|
|
uint8_t bpm; |
|
|
|
uint8_t bpm; |
|
|
|
uint16_t steps; |
|
|
|
uint8_t steps; |
|
|
|
void (*sequencer_step_function)(); |
|
|
|
uint16_t _steps; |
|
|
|
|
|
|
|
void (*step_function)(); |
|
|
|
volatile uint32_t tick; |
|
|
|
volatile uint32_t tick; |
|
|
|
const float beat = AUDIO_SAMPLE_RATE_EXACT / float(AUDIO_BLOCK_SAMPLES) / 60.0; |
|
|
|
const float beat = AUDIO_SAMPLE_RATE_EXACT / float(AUDIO_BLOCK_SAMPLES) / 60.0; |
|
|
|
}; |
|
|
|
}; |
|
|
|