Max for Live: A Quest for a Non-Quantized Pitch Shifter?

kirkpearson's icon

Hello all!

I'm currently working on a Max for Live patch that manipulates the pitches of samples in Ableton through accelerometer data. The only problem is all of Ableton's pitch-shift effects are quantized to a chromatic scale. HOWEVER, if you play around with the envelope automations, you can make a sample "gliss" upwards without changing tempo. This suggests there has to be *some feature* hidden somewhere in Ableton that could potentially be manipulated by Max. Would anyone know what that is, and how I could build a plugin that could change that on the fly?

Thanks so much!
KP

Evan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Sure is, it's a little hard to find though. You can do this using the Sampler device (there may be other ways to do it with other devices, but you mentioned samples, so we're using Sampler)
Turn the pitch envelope on, and set it to +12 steps (or whatever range you want) then set the initial, peak, attack and decay values to 0.
Then you can adjust the pitch envelope sustain parameter via the API. You can go from -1.0 to 1.0 and get all manner of in between pitches.

Ignore the get name, I was just using that to probe around.
If you're sound has a release, you'll also want to tie the Pitch Envelopes 'End' parameter to the same control, so you won't get slides back to 0 on release (unless you want those)

kirkpearson's icon

Thanks so much! This still seems to change the playback speed of the sample though. Is there a way to ensure we're only manipulating pitch?

Evan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Yeah that's totally different. If you want real time pitch shifting (i.e. processing incoming audio) you'll have to think of something else. What Pitch shifting effects are you referring to in your initial post?
If you're just manipulating samples, you can use the coarse and fine adjustment like so:

But I'd have to know more about the specific pitch shifting method you want to employ.

kirkpearson's icon

Ah. It's literally just to use Ableton's really slick algorithm for manipulating pitch without changing tempo. We're looking to make the patch generative (as in, not apply an effect to the audio through doing granular synthesis in MSP, which doesn't sound that good). We have found it possible to make Ableton change pitch and not tempo through toying around with the envelope, but have no way of automating that.

LSka's icon

Evan's patch is pointing you in the right direction.
Just use the "set pitch_coarse" and "set pitch_fine" messages into [live.object] and you're good to go.

Max Patch
Copy patch and select New From Clipboard in Max.

Evan's icon

Haha, so my patch is pointing in the right direction so much that you post an exact replica? :)
@kirkpearson the patch I posted above does exactly what you are asking. allows you to manipulate the pitch of a sample using Live's algorithms.
Although you may want to figure out another way to assign this to clips, as this solution will only apply to the selected clip.

LSka's icon
Max Patch
Copy patch and select New From Clipboard in Max.

@Evan sorry, I pasted the wrong patch! (anyway, repetita juvant.. ;) )
This is the one I wanted to post. It does the same as yours, the only difference is that I'm using the "BrowseTracksClipsAudio" Snippet to select the clip.

kirkpearson's icon

@Evan and @LSKA Aaa! Thank you both so much! A really, really dopey question here, but where can I get the signal cables in your patches to route from the plugin~ and plugout~ MSP objects?

Evan's icon

Hm? I'm not really sure what you mean. You don't NEED any signals going in and out of this device as it's not processing audio in any way.

kirkpearson's icon

@Evan Sorry, I don't really understand. I've opened the patch as a Max Audio Effect on an audio track in Ableton. As far as I know, the patch will have to send an audio out signal for Ableton to do anything. Is there another way to process the audio?

Sorry about all this-- I'm totally new to the Ableton interface.

Evan's icon

Oh, I see where the confusion is (i think).
If you open the default Max Audio Effect, and paste the patch inside, it will just work. Audio will come into the patch and then head straight out via the plugin~ and plugout~ objects, unaffected. The patch is designed to manipulate Live itself, and it doesn't process any audio. You're simply telling Live how to process audio by changing the pitch of a sample. You could just as easily paste the code into a MIDI effect, and it would do the same thing.

Hope this clears it up.