Slides (portamento)

Hello everyone,

I want to implement a slide function into my synth (like portamento) and I was wondering how. My idea would be to safe the frequency of the last midi note pressed and make it slide to the new one, and also saving the current slide frequency so in case it slides slowly it doesn’t glitch when a new one is pressed (not for chords, since my synth can only register one voice at a time)
I already tried it, but the result wasn’t really satisfying

Any idea how to do that better? I’m kinda clueless atm

The first thing is, if you move on from one note to the next, the information that’s missing for your algorithm is, how fast you want to allow to move to the new frequency. Allowing everything will make your frequency jump, vs. having a too slow time set, you might already have pressed the next note. You will have to experiment around with that, but it is possible, that you don’t find a satisfying value.

The other possibility is to listen to the pitch value, that way the player can steer the portamento manually. It is an option in your case, since you mention, that your synth is monophonic.

The third option is, to have a look into MPE, which is a new standard to allow glides per note by assigning a MIDI channel to each new note. This way you have the pitch wheel available for each note. A controller that is made for that specification is the ROLI Seaboard.

Thanks for that question.

I don’t think there’s a straightforward way to do that with one voice. You’re better off initializing multiple voices and overriding the Synthesizer class to handle monophonic voice switching.

You would need to use the first voice to instantiate a note and then a random free voice to play the slide.

What do you mean when you say it wasn’t really satisfying?