How do I implement a pitch glide?

Jun 5, 2013 at 11:12pm

How do I implement a pitch glide?

Okay, I generally like to put some thought and practice into my problems before I some here to ask about them, but I’m totally clueless. What I want to do is make a monophonic synth that glides from one note to the next if a note-on is sent before a note-off. Portamento glide, I think, is what it’s called. I’m watching a tutorial about it on YouTube, but it makes no sense to me. Could someone explain? I understand the problem of the MIDI language not being able to send messages at the same time, so I see why he’s delaying things. I just feel like there’s a lot of gibberish here that’s really not needed, such as using so many [t] objects and sending a bunch of lists.

It just seems like there should be an easier way to do this.

#251822
Jun 5, 2013 at 11:54pm

I’d use ddg.mono with legatomode set to legato.

I’m not sure all of the other things that he’s trying to do with his patch, (he may be preventing reattack on notes with the same pitch or something like that?) but this should do what you’re asking.

<code>

– Pasted Max Patch, click to expand. –

</code>

#251825
Jun 6, 2013 at 1:02am

Thanks! This works!

#251829
Jun 6, 2013 at 6:23am

gerenal strategy is to do the conversion to frequency on the signal, layer using [line~] before [mtof~]
this means that in case of a poly patcher the mtof~ should be inside.

#251862
Jun 6, 2013 at 6:42am

^ Good point.

Here’s one more question; I want to use this sort of thing in an additive synth using [oscbank~]. The problem is that the outlet of [mtof~] is, obviously, a signal and not a number, so I can’t use it with the [vexpr] object to multiply the frequency – or anything before the frequency, because of the [line~] object – by a vector. I’ve tried using [snapshot~] to change it back to a number, but I just end up with a downsampled sound that’s really rather obnoxious.

Also, how can I keep the note from retriggering the [adsr~] object when a new note-on comes before a note-off? I feel like this is a lot easier than I’m letting on, but I haven’t slept all night, so my brain isn’t functioning well.

Thank you guys so much for your help and patience! If high school math was taught in Max/MSP objects, I might’ve taken 4 years of it instead of 3.

EDIT: Never mind the [adsr~] question. All I had to do was open the Help file and I found it.

#251863
Jun 6, 2013 at 8:26am

depending on the frequencies you want to reach you might be able to do the multiplications required for oscbank~ on the linear layer, for example + 12 instead of *~ 2.

but of course, if signal is not rerquired anyway, my statement above regarding mtof~ was unneccesary. but .. i would recommend you to build a more general portamento patch, which will also work with sound generators which take signals for the frequency. ;)

#251876
Jun 6, 2013 at 8:33am

Thanks much!

#251877
Jun 6, 2013 at 9:30am

If you’re using oscbank~, you can do it via a “striped” system. Load the coefficients into a buffer~ via peek~, then use count~ 0 16 and poke~ to read them out and multiply by your fundamental.

How many oscillators are you using? If it’s not an obscene number, you could just wrap each on inside a poly~. Like this:

<code>

– Pasted Max Patch, click to expand. –

</code>

Or you could use matrix~:

<code>

– Pasted Max Patch, click to expand. –

</code>

#251883

You must be logged in to reply to this topic.