phjanderson
Member
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.
There has been some discussion about this in this forum, for example:
There also also been a pull request:
Add member restart() to AudioSynthWaveform by ErikDorstel · Pull Request #275 · PaulStoffregen/Audio
The phase(angle) method sets the phase relative to the current angle. A LFO application need to set the phase to an absolute angle. The new method restart() sets the phase_accumulator to zero. The ...
github.com
I created a new pull request with an improved (and working) version:
added method for restarting the phase accumulator by phjanderson · Pull Request #475 · PaulStoffregen/Audio
Added a method restart() to AudioSynthWaveform and AudioSynthWaveformModulated to reset the phase_accumulator to 0. This allows the phase of multiple oscillators in a synthesizer to be synchronized...
github.com
Further suggestions are welcome.