I'm thinking about getting an MPE-capable MIDI controller to use with the synth I made in Pure Data. I'd like to enhance my synth to support the MPE features. Has anyone worked with MIDI MPE in Pure Data? Any advice or suggestions?
-
MPE support in Pure Data?
-
@jamcultur I think you can have enough midi channels in Pd..... one for each note.
You could make a single note synth abstraction that receives a single midi channel [notein $1] and filters for all the Pd midi objects such as [ctrlin]
The first or second second argument of all the other midi objects sets the channel.... and the right outlet disappears... so e.g. [ctrlin 7 $1] or [bendin $1].
Then [clone] the synth abstraction for all the midi notes.
Unless the MPE midi format is completely different and unrecognised in Pd of course.
David. -
Thanks. That might be what I need, but I need to do some more research on MIDI MPE messages. I'd like to find a MIDI MPE sample file that I could download. I see that Max/MSP added some new objects for MPE, mpeconfig, mpeparse, mpeformat, polymidiin, and others. I'm going to look to see what they're doing.
-
@jamcultur said:
I'm thinking about getting an MPE-capable MIDI controller to use with the synth I made in Pure Data. I'd like to enhance my synth to support the MPE features. Has anyone worked with MIDI MPE in Pure Data? Any advice or suggestions?
Based on a couple of quick reads: "In normal MIDI, Channel-wide messages (such as Pitch Bend) are applied to all notes being played on a single MIDI Channel. In MPE, each note is assigned its own MIDI Channel so that those messages can be applied to each note individually" (https://www.midi.org/midi-articles/midi-polyphonic-expression-mpe) and "MPE repurposes MIDI channels as notes instead of instruments. This means you can only have a single instrument on each port or cable and the instrument is limited to a maximum of 16‑note polyphony (one note on each of the 16 channels). Each note can have its own pitch‑bend, mod wheel and other expression messages, meaning you can now emulate the single‑string pitch vibrato of a guitar or violin without having the vibrato applied across the whole instrument" (https://www.soundonsound.com/sound-advice/mpe-midi-polyphonic-expression), it appears to be significantly less complicated than you might think.
MPE: Channel = voice number.
Where do you have voice numbers in Pd?
[clone]
Messages to [clone] should put the voice number leftmost. [notein], [ctlin] etc. put the channel number as the rightmost output. So you'd have to use [pack] and a message box to reorder the numbers. (Also note that MIDI objects report channels 1-16, but [clone 16] will produce voice numbers 0-15 -- easily handled, just don't omit the [- 1] objects.)
I'll admit that I didn't download the full spec, so there might be some fine print that I'm not aware of. But based on the online descriptions, I think it's pretty much like this.
hjh
-
Thank you! That's helpful.
-
@jamcultur You can use a switch argument "-s" for [clone] to use 1-16 (or 1-64 if you wish)..... [clone -s 1 16]
You patch might be easier to read if you do so...
David. -
Hello, chiming in here quickly. Opposed to jamculture's request my main issue here is to get MPE data out of pd and into a DAW (reaper in my case). I'm especially interested in pitch modulation of several midi notes at once (each one individually). But the way I tried it, Reaper will just receive hundreds of micro MIDI notes, whenever I adjust the pitch of one voice via a number box. (See picture attached (this would be for one voice only)). Do you have any ideas how I could handle this kind of pitch modulation per voice (also beyond the 2 semitones that the normal pitchbend range will be interpreted as in vsts.)?
-
@jj37592 You should I think just send one note and then bend it.
There are standard rpn messages for changing the bend range....... recognised in hardware synths as they are General midi standard compatible..... even the Microsoft GS Wavetable synth reads them.The bend range......
"You can set it with both CC#100&101 (RPN LSB&MSB) first to 0 and then adjust the range with CC#6 (Data Entry MSB) in semitones."
.... from https://forum.cockos.com/showthread.php?t=69372I know nothing about Reaper, but it probably accepts OSC and user definable NRPN messages as well?
If Reaper will not accept the RPN messages, but the pitch bend range can be set somewhere (or the note can be bent by other means), then OSC messages might be easiest from Pd.
If you need NRPN......... nrpn.pd
NRPN messages are 14-bit..... like [bendin] ..... so the highest resolution in midi...... but OSC can do better!.
David. -
@jamcultur said:
Thanks. That might be what I need, but I need to do some more research on MIDI MPE messages. I'd like to find a MIDI MPE sample file that I could download. I see that Max/MSP added some new objects for MPE, mpeconfig, mpeparse, mpeformat, polymidiin, and others. I'm going to look to see what they're doing.
a file would not be as helpful as simply looking into the specs. the basic "polyphony" releated stuff is relatively simple, the only prerequisite would be that midiin and midiout do not filter out numbers they dont know.
max´s mpeparse or midiparse are quite useful, but it is not really difficult to write your own, it is basically sorting numbers.
-
@whale-av said:
@jj37592 You should I think just send one note and then bend it.
Thanks, @whale-av. This already solved it for me. Since i dont need to change the bend range while playing at the moment, i can just adjust it in the vsts gui.
Still experienced some hickups with different vsts, interpreting the data in MPE mode. Interestingly excluding notes and bends via channel 1, but only sending them via channels 2 and upwards helped (i.e. for the vst Serum in MPE mode).Thank you and all the best,
Jakob