Synth with single voice has pops when switching notes

I’m working on a plugin synthesizer that should only have one voice (bass), but I am running into issues when the voice gets stolen. Is there a good approach for handling this legato type behavior or is it case specific? Does anyone have a process that works well for this?

Usually this happens because the change of envelope state in the new note is too abrupt (for example, old note state was 100, new one was 0, or vice versa), and the solution is to apply a degree of smoothing/damping to the transfer from one envelope state to the other … as you flesh out your synth, you’re going to want to have some code for this transfer state anyway, for example to deal with Portamento or some other such thing (more sophisticated EG?) …

That makes a lot more sense now. Is there a reference implementation I can refer to? Or a general outline I should follow for this kind of smoothing/damping?

Thanks for the quick reply.

I would not use single voice, since there is no chance for an overlap, which the user would expect, also from a physical standpoint.
How about collecting the currently played notes and whenever you receive a noteOn, send a noteOff to all other notes, so they will naturally decay.

That’s another route I had been considering. I’ll try this today hopefully and report results.

Thanks!

Its a big topic for sure and tricky to have a non-clicking single voice synth, but it can be done.

One thing you can try is to look at how the Minimoog works and why you are getting clicks.

The minimoog won’t reset the volume envelope to zero on a new note, instead if the voice is already playing and you press a new note, the envelope starts climbing from what ever its existing value was. This avoids the click that you would get if you reset the envelope back to zero. Also if you play new notes in quick succession, the envelope will keep climbing which is a key sound of the minimoog, especailly in the context of the filter envelope.

A second thing you want to do is to avoid resetting the phase of the oscillators when you play new notes, unless the voice ( or the ADSR ) is already at zero. If you must reset the phase, a quick trick is to look at a note off, and then wait for the oscillator’s waveform to pass through zero before resetting the ADSR and changing the pitch of the oscillator to the new note. Depending on the waveform this can introduce a small latency, which will be the length of time between the oscillators current value and when it crosses zero again.

Another trick is to maintain a short crossfade buffer from the synths output…when you play a new note you take the last say 64 samples from the output and crossfade it against the new notes first 64 samples. You can also weight the crossfade so that you don’t fade in the new samples, you just fade out the old ones. Just remember to report the latency to the DAW so you don’t have weird phase issues. This is similar to what @Daniel suggests, just that you are faking an extra voice via the crossfade buffer.

Finally, another trick is to emulate the Moog Subsequent Duo Mode…you have one voice, but two oscillator and you can crossfade between them. Again, same as maintaining a crossfade buffer in some ways which might be easier to implement.

I hope this helps!

The right approach here depends on whether the attack of the note is important. If yes, you’ll want to retrigger the envelope and crossfade between two oscillators / voices. If no, then don’t retrigger the envelope and don’t reset the phase of the oscillator, only change the pitch.

Velocity also plays a role, if you’re using it to calculate the amplitude of the note. If the new note has a different velocity than the current note, then there will still be a discontinuity in the sound even if you don’t reset the phase or the envelope, and you still need to crossfade.

2 Likes

For context, the synthesizer is built around sub bass/808 type sounds. So attack is important, but overlapping notes should pitch bend.

1 Like

Don’t want to give too many secrets away as we develop SubLab :rofl:

It is tricky for sure, we’ve spent literally months working on creating click free oscillators in a mono synth context. The 808/sub-bass situation adds another layer as you have relatively slow cycling waveforms and not so many harmonics to mask clicks that you would otherwise not hear if you have say higher frequency saw waves.

Tried my hand at implementing a few of these solutions, but I think I may be in a little over my head. Any good open source references I could look at?

The Monique Monosynth might have some clues?