Restarting (the phase of) an oscillator

The oscillators AudioSynthWaveform and AudioSynthWaveformModulated in the Teensy Audio library currently lack to ability to restart oscillators (setting the phase_accumulator to 0). This feature is important for multi-oscillator synthesizers.

There has been some discussion about this in this forum, for example:

There also also been a pull request:
But unfortunately the code in this pull request does not work.

I created a new pull request with an improved (and working) version:

Further suggestions are welcome.
 
I just gave your restart function and try and it seems to be perfect. It's exactly what I've been wanting. I was planning to do this myself, but you saved me the work. :) I will continue testing to make sure it doesn't have any quirks, but it's looking good so far. Thanks for this. I hope in gets accepted into the master.

Kevin
 
Back
Top