|
|
@ -33,8 +33,7 @@ |
|
|
|
// 140219 - correct storage class (not static)
|
|
|
|
// 140219 - correct storage class (not static)
|
|
|
|
// 190527 - added modulation input handling (Aug 2019 by Holger Wirtz)
|
|
|
|
// 190527 - added modulation input handling (Aug 2019 by Holger Wirtz)
|
|
|
|
|
|
|
|
|
|
|
|
class AudioEffectModulatedDelay : |
|
|
|
class AudioEffectModulatedDelay : public AudioStream |
|
|
|
public AudioStream |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
AudioEffectModulatedDelay(void): |
|
|
|
AudioEffectModulatedDelay(void): |
|
|
@ -42,10 +41,10 @@ class AudioEffectModulatedDelay : |
|
|
|
{ } |
|
|
|
{ } |
|
|
|
|
|
|
|
|
|
|
|
boolean begin(short *delayline, uint16_t delay_length); |
|
|
|
boolean begin(short *delayline, uint16_t delay_length); |
|
|
|
virtual void update(void); |
|
|
|
void update(void); |
|
|
|
virtual uint16_t get_delay_length(void); |
|
|
|
uint16_t get_delay_length(void); |
|
|
|
virtual void set_bypass(bool b); |
|
|
|
void set_bypass(bool b); |
|
|
|
virtual bool get_bypass(void); |
|
|
|
bool get_bypass(void); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
audio_block_t *inputQueueArray[2]; |
|
|
|
audio_block_t *inputQueueArray[2]; |
|
|
@ -54,11 +53,10 @@ class AudioEffectModulatedDelay : |
|
|
|
uint16_t _delay_length; // calculated number of samples of the delay
|
|
|
|
uint16_t _delay_length; // calculated number of samples of the delay
|
|
|
|
int16_t cb_mod_index; // current read pointer with modulation for the circular buffer
|
|
|
|
int16_t cb_mod_index; // current read pointer with modulation for the circular buffer
|
|
|
|
uint16_t _delay_offset; |
|
|
|
uint16_t _delay_offset; |
|
|
|
bool bypass; |
|
|
|
bool bypass = false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class AudioEffectModulatedDelayStereo : |
|
|
|
class AudioEffectModulatedDelayStereo : public AudioStream |
|
|
|
public AudioStream |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
AudioEffectModulatedDelayStereo(void): |
|
|
|
AudioEffectModulatedDelayStereo(void): |
|
|
@ -66,12 +64,12 @@ class AudioEffectModulatedDelayStereo : |
|
|
|
{ } |
|
|
|
{ } |
|
|
|
|
|
|
|
|
|
|
|
boolean begin(short *delayline_l, short *delayline_r, uint16_t delay_length); |
|
|
|
boolean begin(short *delayline_l, short *delayline_r, uint16_t delay_length); |
|
|
|
virtual void update(void); |
|
|
|
void update(void); |
|
|
|
virtual uint16_t get_delay_length(void); |
|
|
|
uint16_t get_delay_length(void); |
|
|
|
virtual void set_stereo(bool s); |
|
|
|
void set_stereo(bool s); |
|
|
|
virtual bool get_stereo(void); |
|
|
|
bool get_stereo(void); |
|
|
|
virtual void set_bypass(bool b); |
|
|
|
void set_bypass(bool b); |
|
|
|
virtual bool get_bypass(void); |
|
|
|
bool get_bypass(void); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
audio_block_t *inputQueueArray[3]; |
|
|
|
audio_block_t *inputQueueArray[3]; |
|
|
@ -80,7 +78,7 @@ class AudioEffectModulatedDelayStereo : |
|
|
|
uint16_t _delay_length; // calculated number of samples of the delay
|
|
|
|
uint16_t _delay_length; // calculated number of samples of the delay
|
|
|
|
int16_t cb_mod_index[2]; // current read pointer with modulation for the circular buffer
|
|
|
|
int16_t cb_mod_index[2]; // current read pointer with modulation for the circular buffer
|
|
|
|
uint16_t _delay_offset; |
|
|
|
uint16_t _delay_offset; |
|
|
|
bool stereo; |
|
|
|
bool stereo = true; |
|
|
|
bool bypass; |
|
|
|
bool bypass = false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|