I have for a while searched the forums for ways to bandlimit arbitrary waveforms. As far as I know has this not been done yet in the teensy realm.
I am currently investigating the possibility to adaptively filter/bandlimit the arbitrary wave (arbData in AudioSynthWaveform class) using a IIR Chebychev filter. Depending on the frequency played, adapt the filter cutoff and therefore effectively bandlimiting the generated wave. I see the possibility to generate the bandlimited wave on call to the frequency() function or continuously in update().
Doing filtering for each Waveform object implies a larger overhead. Should therefore consider creating a new audio object for this purpose. Thought about using a windowed sinc-function, but realized IIR filters is better suited for the much lower execution time and being easier adaptable to different cutoff frequencies. The chebychev coefficients are relatively easy to calculate (example: https://www.analog.com/media/en/technical-documentation/dsp-book/dsp_book_Ch20.pdf). May also consider a lookup table containing coefficients for specific cutoff frequencies at an interval.
I am by no means really qualified to talk about this. I have taken some courses related to DSP but with no practical experience and only recently began exploring the Audio library.
Does anyone have any thoughts about this?
I am currently investigating the possibility to adaptively filter/bandlimit the arbitrary wave (arbData in AudioSynthWaveform class) using a IIR Chebychev filter. Depending on the frequency played, adapt the filter cutoff and therefore effectively bandlimiting the generated wave. I see the possibility to generate the bandlimited wave on call to the frequency() function or continuously in update().
Doing filtering for each Waveform object implies a larger overhead. Should therefore consider creating a new audio object for this purpose. Thought about using a windowed sinc-function, but realized IIR filters is better suited for the much lower execution time and being easier adaptable to different cutoff frequencies. The chebychev coefficients are relatively easy to calculate (example: https://www.analog.com/media/en/technical-documentation/dsp-book/dsp_book_Ch20.pdf). May also consider a lookup table containing coefficients for specific cutoff frequencies at an interval.
I am by no means really qualified to talk about this. I have taken some courses related to DSP but with no practical experience and only recently began exploring the Audio library.
Does anyone have any thoughts about this?