You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling AudioSynthWaveform::begin() sets phase_offset to zero, but it doesn't clear the phase_accumulator field, so the wave doesn't actually start from zero.
Similarly for phase(), although in that case, maybe you just want to shift the phase of the running waveform a bit, instead of restarting from the beginning? If so, maybe the documentation should be clarified.
I found this when playing two sawtooth waves that are slightly detuned; the note starts at a different place each time. (Sometimes that's what you want, but not always.)
The text was updated successfully, but these errors were encountered:
I also came across this problem some time ago. Since I also have the requirement to set the phase to a certain value during runtime, I came up with another solution.
If begin() cleared the phase accumulator, you could call phase() immediately after to set the phase. That seems a bit obscure though, compared to phase() actually setting the phase.
Advancing the phase a bit would be more clearly written as something like: wave.phase(getPhase() + delta);
Calling AudioSynthWaveform::begin() sets phase_offset to zero, but it doesn't clear the phase_accumulator field, so the wave doesn't actually start from zero.
Similarly for phase(), although in that case, maybe you just want to shift the phase of the running waveform a bit, instead of restarting from the beginning? If so, maybe the documentation should be clarified.
I found this when playing two sawtooth waves that are slightly detuned; the note starts at a different place each time. (Sometimes that's what you want, but not always.)
The text was updated successfully, but these errors were encountered: