Control MPE of each note independently from M4L

Dalmazzo's icon

I have some chords where I need to adjust each MPE pitch in some cents.
How can I access the info displayed in Ableton Live in the MPE tab? I haven't found anything to control that from M4L yet.

I've been following these examples https://cycling74.com/articles/what's-new-in-live-11-part-1
However, there is no information on each MIDI note controlling its own MPE.
Thanks for the help

Dalmazzo's icon

Any suggestion on this topic?

soundyi's icon

I guess you are looking for a way to modify the pitch related MPE data of your chord notes in a MIDI clip? Which means your MIDI clip contains already valid MPE data, recorded with a MPE controller e.g.?

As far as I understand the Live Object Model & API of the Clip object (https://docs.cycling74.com/max8/vignettes/live_object_model), there is no function to read other MPE related data than notes from the clip - which I would like to have as well.

And to be honest I don't understand why there is no API / function to access (read & write) the most interesting data of MPE in a clip - maybe I am missing something.

As MPE uses MIDI CC, but routes them on a per note basis to a different MIDI Channel, one could think about trying to read the envelope(s) of a MIDI clip - but I only see a way to delete one or all envelopes, but no way to read them.

So I guess the only thing we can read from a MIDI clip are the notes.

But you might be able to achieve your MPE pitch correction by means of the classic MIDI Effect transformation approach, using mpeparse & mpeformat.

Using Live's playback, all MPE Data of your MIDI Clip runs through your M4L MIDI Effect, which parses the MPE data, transforms the pitch data, and formats the transformed "MPE pitch curve" back into valid MPE format by means of mpeformat, which sends it into midiout.

To capture your MPE pitch correction you would have to route the MIDI output to another track and record it there.

Hope this helps.

Dalmazzo's icon

Hello,
Thanks for the replay.
I think I still don't understand the idea.
I'm trying this patch but it is not controlling the pitch independently.
Any suggestion?

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

soundyi's icon

For some reason I cannot open the patcher pitchBendMidi embedded into the poly~ object (from the patch you have shared) which should be the responsible for the pitch variation.

But at a first glance it looks like you should be using another approach - I guess using custom messages like target in your example will not work.

I think you should start off from an working example and tweak it to your needs - as you have already mentioned the Cycling 74 article https://cycling74.com/articles/what's-new-in-live-11-part-1, if you download the ZIP file you find a folder MPE Project which includes a Live Set and an example M4L device called MPE. I would suggest that you make a copy of this one and experiment with it.

There you see a patcher PolyPitchSlide embedded into a poly~ object. The patcher PolyPitchSlide will be instantiated (think of an individual copy like a synth voice - or a polyphonic patch) for each Note-On messages that is fed into its parent poly~ container by means of a MPE Event Message resulting from the mpeparse object.

Note-On & Note-Off messages inside the patcher PolyPitchSlide implement the voice handling (which is crucial), so that each instance (or polyphonic voice) is kept alive and reserved until the Note-Off message is received and released after that so that it can be reused for the next note.

If you scroll down to the bottom of the mpeparse documentation https://docs.cycling74.com/max8/refpages/mpeparse you can read about the intended usage of mpeparse & poly~ and that the polymidiin object is the max object inside the embedded patcher (PolyPitchSlide) that receives the MIDI messages for the particular instance.

In other words : you may not be able to use your own custom message like target to feed MIDI messages into your poly~ embedded patcher (pitchBendMidi) - you have to use an MPE Event Message to feed them into poly~ and use polymidiin inside your embedded patcher.

And be sure to activate the MPE flag of the M4L device, which you find as a checkbox in the inspector of the patcher and is called is_mpe.

Also it might be helpful if you could sketch what you want to achieve on a piece of paper and upload a photo from it or use a vector graphics software - something like a flow diagram ... decoding what you have in your creative mind from your sketch is not that easy ;-).

For Example : MIDI Clip -> your MPE M4L device that applies pitch bind of 40 cents on each note over a duration of a eighth note -> MPE Synthesizer.

Just a simple sketch and some annotations that makes your idea obvious.

___


Edit : browsing the docs I just saw that target is an attribute - so its no custom message of yours and now I can guess what you want to achieve with this.

But I still think it would be better to use a MPE event message - as in the working example of Cycling 74.

Dalmazzo's icon

Thanks for the response. I started to see the idea.
The most direct way to resolve the issue I'm trying to do is actually in the following steps:

I'm adding myself from M4L the notes of a Cmaj7 chord (right part of the patch).
Can the individual assignment of the pitch bend be adjusted for each note?

The point is that I don't need to modify a chord that already exists as a MIDI event in an Ableton Live clip. Actually, I need to create the chord with its particular tuning and adjust it individually for each note. This has to be possible, as Roli does it with the keyboard.
The patch I have is this one:

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

Dalmazzo's icon

The solution was as simple as this patch.

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