fabuloso_mocoso
Member
Hi, so I'm working on a wavetable synth and the biggest issue I'm having is audible clicks when switching between waveforms. This is happening in the waveform example sketch with the included waveforms (most noticeable with the sine, triangle, and variable triangle i.e. the ones with less harmonics) as well as my arbitrary waveforms, which are all vaguely sineish.
I looked at this up close in my DAW and it appears the clicking is caused by the waveforms switching at any particular point in their phase. So at any point in the phase when it switches, if the first waveform is at a higher or lower value than the second it's creating that sound from the abrupt transition.
So my question is how can I get the waveform to wait till the phase is 360.0 (when the waveform values are ~0) to switch? Something like this:
Now obviously if I do this the void function won't return a Boolean and I'm not savvy enough to go about it another way, so does anyone have any ideas?
Thanks
I looked at this up close in my DAW and it appears the clicking is caused by the waveforms switching at any particular point in their phase. So at any point in the phase when it switches, if the first waveform is at a higher or lower value than the second it's creating that sound from the abrupt transition.
So my question is how can I get the waveform to wait till the phase is 360.0 (when the waveform values are ~0) to switch? Something like this:
Code:
if (button0.fallingEdge ())
count = count + 1;
if (count == 1)
if (waveform1.phase (360.0))
waveform1.arbitraryWaveform(wave1, 1000);
if (count == 2)
if (waveform1.phase (360.0))
waveform1.arbitraryWaveform(wave2, 1000);
//etc
Now obviously if I do this the void function won't return a Boolean and I'm not savvy enough to go about it another way, so does anyone have any ideas?
Thanks