hi,
what is the best option to output a variable waveform for an lfo (i.e. square with pwm, sine, triangle) via an analog out (pwm), the frequency would be given by a tap-tempo.
on arduino i used to setup a timer and an interrupt to generate waveforms at exact frequencies, setting up a counter (sawtooth wave ) and taking a lookup-table approach. but i am not sure how i would go about it on the teensy 4.
the desired frequency range will be from 0.1hz to about 20-30hz. since i will also output a clock signal that is sent via a digital pin to other synths, the lfo will need to reset its phase to zero after some cycles in order to stay in sync with the tap-tempo (since frequency will never be exactly right, and hence there will be some drift)
what is the best option to output a variable waveform for an lfo (i.e. square with pwm, sine, triangle) via an analog out (pwm), the frequency would be given by a tap-tempo.
on arduino i used to setup a timer and an interrupt to generate waveforms at exact frequencies, setting up a counter (sawtooth wave ) and taking a lookup-table approach. but i am not sure how i would go about it on the teensy 4.
the desired frequency range will be from 0.1hz to about 20-30hz. since i will also output a clock signal that is sent via a digital pin to other synths, the lfo will need to reset its phase to zero after some cycles in order to stay in sync with the tap-tempo (since frequency will never be exactly right, and hence there will be some drift)