AudioSynthWaveformModulated Phase.

Phm78

Member
Hi,
When using an AudioSynthWaveformModulated in WAVEFORM_ARBITRARY mode, is it possible to know the phase of the oscillator or at least to know when it finishes or starts a playback cycle of the table.
Thank you for your help.
 
The phase accumulator is private and not available in the interface for that class I'm afraid. You don't get to see each sample anyway, only once per block can you look at the state - perhaps you are trying to do something that's not really compatible with the Audio library model?

Is this an xyproblem? Why are you wanting to do this?
 
Thank you for your reply.
Actually, when reading an int16_t with the oscillator, I was looking for a way to switch tables synchronously to avoid clicks. I solved this problem by developing a new oscillator that uses two tables and switches when the phase equals 0.
 
Is beginning of the table guaranteed to have value of zero? Cosine for example doesn't. In such cases crossfading over single buffer length might be better.
 
Back
Top