preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: lokki on April 05, 2021, 11:26:13 AM

Title: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 11:26:13 AM
it would be great to have more proper MPE support on preenfm3.

what would be needed?

an instrument can be set to MPE which would enable the following (ideally):

receives midi on selected channels (2-(x<=16).

receives pitchbend on those channels which affects only the notes that sounded on that channel. usually the pitchbend for this "note pitchbend" is set to 48 semitones, but 12 24 and 36 is also possible.

i think that is all.

this would greatly reduce the setup time for MPE instruments and would allow us MPE-peoples to use the limiter etc. properly.
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 05, 2021, 01:08:31 PM
it would be great to have more proper MPE support on preenfm3.

I agree, i'm thinking for a while about something simple in the UI and simple in the code that would turn an instrument to MPE mode.
Maybe i could limit MPE to instrument 1.

I think the "Mixer>Global>Global midi channel" could be removed as its goal was to add minimal MPE support.

Then could add something like "Mixer>Global>Inst1 mode" with "normal/MPE" option.

If MPE is enabled,
. "Mixer>Midi>Channel" of instrument 1 would be disabled and would maybe display "MPE"
. Channel 1 would always be the global message channel
. Channel 2-X : would be for instrument1 voices, with 'X' depending of the number of voices defined in "Mixer>Voices"
. Would be the user responsibility not to overlap MPE channels with instrument 2-6 midi channels.

Pitchbend would be still have to be definied in the modulation matrix, it would need a way to allows 48 semitones pitchbend.

Would definitely make MPE easier and increase the polyphonie to 15 MPE voices.



Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 02:59:35 PM
That would be absolutely awesome!

There is also cc74 (per channel) for timbre if you wanna go fancy.

Also aftertouch becomes poly in MPE as well (since pressure is per voice,i.e. note)

Some controllers also send a release velocity, that could be a matrix source.

Keep in mind that with MPE you have a voice pitchbend and a global on channel one, so you need two different matrix sources for that. Maybe MPE-Bend could be added with support for up to 48 semitones
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 03:04:46 PM
Global midi channel was still useful to me, to switch patches on all instruments via a single program change, but it is an edge case I guess
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 05, 2021, 03:14:42 PM
Yep I've changed my mind and will keep Global midi.

I think i found  the information i needed.
https://support.roli.com/support/solutions/articles/36000027933-what-is-mpe-
Only Lower zone will be supported.

The matrix is already per voice as it contains voices specific params (velocity, notes, poly aftertouch, LFO with key on sync etc...)
CC74 already exists.. don't think i'll need 2 sources for pitch bend. If it's received on channel 1 it will be the global one.
Will see...


Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 05, 2021, 03:19:37 PM
I'm wondering how/whether the following features can work in MPE mode :
. arpegiator
. glide
. Unison / Mono play mode
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 03:20:21 PM
Nice!

But how do you discern the two ranges?

I.e. global bend is set to 12 semitones, to bend chords up and down and voice bend is set to 48 semitones to allow gliding of individual notes...

Voice bend is more often used as a way to play legato glides in a polyphonic context. (Actually one of the reasons MPE was developed)
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 03:22:43 PM
I think voice bend replaces glide in MPE, so no need for that. Also mono makes no sense with MPE i guess.

Arp i am not sure, haven't used it on the preenfm3. What prevents it from working on MPE?
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 05, 2021, 03:26:59 PM
Unison would still be nice, but poly unison... So not sure that works...
Maybe look at vital Synths code (GitHub) he seems to have found a really clever (read CPU friendly) unison mode that could be implemented polyphonically
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 05, 2021, 11:11:41 PM
I think i have something ready to be tested to get feedback v107 beta 1
https://drive.google.com/file/d/1gHB-Uwz2uUZ538p_qn9P1pFJMwGaIXZl/view?usp=sharing

Edited beta 2 : https://drive.google.com/file/d/1f6-MYm4T89KhmynH3VSSJTLv1ynFhcLl/view?usp=sharing

Code is pushed in v107 branch :
https://github.com/Ixox/preenfm3/commits/v107

For MPE set Mixer>Global>MPE Inst1 to "On".
Instrument 1 will then be a MPE instrument.

Channel 1 : global channel
Channel 2 - X : voices depending on number of voices. See Mixer>Midi>Channel to confirm
If MPE Channels are in red in Mixer>Midi>Channel, it's because play mode is not set to poly.

Then All CC can be sent to channel 1.
Voices channel (2->X) will then process midi CC#74, pitch bend, after touch, note on, note off.

I added 2 matrix sources (please tell me if you have better 5 chars names), they are near the end of the matrix source list before usCC#.
. pbMPE : pitch bend global for MPE global channel
. atMPE : after touch global  for MPE global channel
. 74MPE : midi CC74 (this one is not new but i renamed it).

I increased the matrix multiplier maximum to 24.0 (24.0 tones = 48 semitones)
PitchBend for voices is the legacy "PitBe" source.
For pitchbend, use "O*Fh" as destination which means : O* = All operator and  Fh = Frequency harmonic).
The multipler is the number of tone (not semitone).
So basically you may want the following lines :
. PitBe     24.0      O*Fh <= pitch bend per voice
. pbMPE   2.0      O*Fh <= global pitch bend
. 74MPE    5.0     IM* <= to increase modulation on sliding (if sliding is linked to midi CC#74)

I made my tests with "KB-1" keyboard on my ipad, and having my 5 fingers sliding around on the ipad gave good results :)

Let me know all your remarks



Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 06, 2021, 06:52:29 PM
Next update for future beta 2  ;)

Legacy matrix sources (PitBe, AftTo) will be the global pitchbend and after touch (channel 1) in MPE mode.
New matrix sources renamed to "PB MPE" and "AT MPE" They will be the pitchbend and after touch per voice in MPE mode.

CC#74 will only be per voice in MPE mode.

Fix the problem where pitchbend per voice is per semitone so limited to 24 semitone. It will be per tone and limited to 24 tones.
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 06, 2021, 10:19:34 PM

Here is Beta 2 with the modification above :
https://drive.google.com/file/d/1f6-MYm4T89KhmynH3VSSJTLv1ynFhcLl/view?usp=sharing
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 08, 2021, 07:24:24 AM
Thanks Xavier for all your work. I will be able to check it out this weekend...
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 09, 2021, 05:22:43 PM
i tested it briefly and it works very well, this is great and makes creating sounds for MPE controllers so much easier!

a couple of remarks:

-i would suggest to put AT MPE PB MPE and CC#74 together, since they all belong mainly to MPE, seems strange to have random in between in the menu.

-i am not sure we even need a distinction between AT MPE and non MPE AT, are there any controllers that have both? like general aftertouch and poly aftertouch on the voices? maybe you can make them one, so some patches will "work" out of the box.

-the midi channel showing in the instrument tab is a bit confusing, if i set an instrument to 4 voices i get 1-5, but of course i only have 4 voices, shouldn't it read 2-5? 1 is always reserved for general modulation.

lastly it would be killer to have unison available, but i know that in its current implementation this is not possible (since it requires mono sounds and you use additional voices to do the unison fx)
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 09, 2021, 10:07:33 PM
i tested it briefly and it works very well, this is great and makes creating sounds for MPE controllers so much easier!

Nice... thanks.

-i would suggest to put AT MPE PB MPE and CC#74 together, since they all belong mainly to MPE, seems strange to have random in between in the menu.

Agreed

-i am not sure we even need a distinction between AT MPE and non MPE AT, are there any controllers that have both? like general aftertouch and poly aftertouch on the voices? maybe you can make them one, so some patches will "work" out of the box.

I was thinking the same thing but i found that :
"Messages that can be sent as Zone Level and Note Level are the following:
Channel Pressure: Control Change for the second dimension also called Press. Channel Pressure information must be combined if received at both message levels.
"
Here : https://docs.juce.com/master/tutorial_mpe_zones.html
Juce belonged to Roli so i assume they know what they're talking about.

-the midi channel showing in the instrument tab is a bit confusing, if i set an instrument to 4 voices i get 1-5, but of course i only have 4 voices, shouldn't it read 2-5? 1 is always reserved for general modulation.

I thought about that too. But if i don't include 1 it seems it's free for other instrument.
Could be "1+2-5" but takes space.

lastly it would be killer to have unison available, but i know that in its current implementation this is not possible (since it requires mono sounds and you use additional voices to do the unison fx)

Maybe in a further future.

Out of curiosity, what MPE controller do you use ?
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 10, 2021, 12:55:57 AM
Quote
I thought about that too. But if i don't include 1 it seems it's free for other instrument.
Could be "1+2-5" but takes space.

but "global midi" is not only reserved for MPE, so even if you don't have MPE enabled you can still have it enabled and use it.
and in reverse you could still use channel 1 for another sound with limited options i guess (no pitchbend, no aftertouch, but simple note on and off should not affect the MPE voices)

what about (1)2-5?

i use a self-made midi bass controller, that supports MPE since my latest update :-) but i plan on getting a LinnStrument if i can find one second-hand and thus a bit cheaper...
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 10, 2021, 09:20:42 AM
but "global midi" is not only reserved for MPE, so even if you don't have MPE enabled you can still have it enabled and use it.

The channel 1 for MPE is different from the "global midi" you can define in Mixer>Global>Global Midi.
MPE global channel 1 is hardcoded.

"Global Midi" channel (Mixer>Global>Global Midi)  will send midi it receives to ALL instruments except MPE (maybe i should include MPE ??).
See line 218, 226, 240 here : https://github.com/Ixox/preenfm3/blob/v107/firmware/Src/midi/MidiDecoder.cpp?ts=4#L218

It's currently a bit confusing, but this is not something you have to modify often.

Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 10, 2021, 01:20:35 PM
Ah ok, i see. Makes sense. Maybe there could be an indicator in the preset Name when instrument 1 is a MPE instrument. This would be visible in all of the MIX submenus. Just add (MPE) after or before the preset name.
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 14, 2021, 11:23:31 PM
A further comment:

I would suggest to have in the global menu, next to MPE instrument on off also the MPEpitchbend range, which is settable to 12 24 36 and 48 semitones (ithink those are the most common). And if MPE instrument is enabled, this bend range is automatically applied to o*fh, since I fail to see a MPE preset where no voice pitchbend is implemented. That is also the reason it should happen automatically, it's kind of inheritent to MPE...

Pitch MPE could still be a matrix source, for other things...
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 15, 2021, 10:27:10 PM
Yes that's a good idea.
To make it simple and save one line in the global page, i may go to "Off", "MPE48", "MPE36", "MPE24", "MPE12", "MPE0" For "MPE Inst1" option.
MPE0 would allow to define any bitchebend using the matrix.
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 15, 2021, 11:21:50 PM
That is a good solution as well!!
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 16, 2021, 11:14:46 AM
something i noticed while playing with it some more, it is really fun!

-note shift does not work when instrument1 is in MPE mode. preferred solution would be to just shift all incoming MPE channels when instrument 1 shift is used.
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 16, 2021, 12:45:50 PM
something i noticed while playing with it some more, it is really fun!

-note shift does not work when instrument1 is in MPE mode. preferred solution would be to just shift all incoming MPE channels when instrument 1 shift is used.

OK this one is easy to fix :)
Thanks
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 16, 2021, 02:28:33 PM
Here is v0.107 beta 3
https://drive.google.com/file/d/1RVpGvL56s3j0LkuRu6Wx_Uo7_nBGpKVA/view?usp=sharing

. "MPE" displayed in small chars beside Instrument 1 name in the mixer if MPE is enabled
. Global settings "Inst1 MPE" now has 6 options "No", "MPE48", "MPE3648", "MPE24", "MPE12", "MPE0" => MPE pitchbend is automatically added
. "CC74" matrix source renamed "74 MPE" and moved beside other MPE sources
. Midi note shift fixed for MPE instrument
. Fix a voice allocation bug that could crash the pfm3


Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 16, 2021, 07:31:18 PM
all seems to work fine, great!

Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 17, 2021, 08:13:32 AM
The general pitchbend now also has the broader range of 48 semitones, not sure that was intended, but I like it. It will break existing presets though...


Nevermind, it's all good
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 17, 2021, 11:21:52 AM
The general pitchbend now also has the broader range of 48 semitones, not sure that was intended, but I like it. It will break existing presets though...


Nevermind, it's all good

Just for other people that follow this thread : the general pitchbend must be definied in the matrix as it is for non-MPE instrument.
The only auto-wired modulation is the MPE "pitchbend per channel".

Thanks again Lokki for all your suggestions and tests on this feature.
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 17, 2021, 12:08:45 PM
The oscillator section fine-tune and broad tune only work once a new note is played, changes while a note is sounding have no effect. Is this supposed to be that way? (Not strictly MPE related) for sound design it would be beneficial to have the change applied immediately.
Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 17, 2021, 12:29:13 PM

Yes this is how it works.
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 17, 2021, 09:48:40 PM
a thought on unison.

for the near future, if voices of a patch (MPE or regular poly) is smaller then the max voice count of preenfm3 (by a factor of at least two) you could add one unison voice theoretically, no?

so for example:

a 4 voice MPE synth sound could have 4*4 voices (4 unison voices per voice) to get the maximum of 16 voices.

-unison voices don't need their own fx path, they could be added together before any filter/fx. maybe that could boost the voice count a little?

a second idea is to have a unison "fake" module. i had pretty good results with a small delay line (around 50ms) and a couple of read-heads that simply start in different positions of the delay-buffer. if you then also modulate the read-speed a little you can get pretty good results (chorus)

Title: Re: "proper" MPE support for preenfm3
Post by: Xavier on April 18, 2021, 10:31:27 AM
a thought on unison.
for the near future, if voices of a patch (MPE or regular poly) is smaller then the max voice count of preenfm3 (by a factor of at least two) you could add one unison voice theoretically, no?
so for example:
a 4 voice MPE synth sound could have 4*4 voices (4 unison voices per voice) to get the maximum of 16 voices.
-unison voices don't need their own fx path, they could be added together before any filter/fx. maybe that could boost the voice count a little?
a second idea is to have a unison "fake" module. i had pretty good results with a small delay line (around 50ms) and a couple of read-heads that simply start in different positions of the delay-buffer. if you then also modulate the read-speed a little you can get pretty good results (chorus)

All this is for sure doable. (except delay that likely requires more RAM that the pfm3 have).
But I don't think i'll spend time on that in the near future.
Title: Re: "proper" MPE support for preenfm3
Post by: served on April 28, 2021, 08:45:43 AM
Hi.

What would be the cheapest hardware controllor for PreenFM with MPE support?
I have seen the USB versions a lot. But not with DIN5 midi out.
Any suggestions?
Title: Re: "proper" MPE support for preenfm3
Post by: lokki on April 28, 2021, 09:56:24 AM
Define cheap. For about 1000 Euro or a little less you can get a Linnstrument 128 which has din-midi

The qunexus keyboards (keith mc millen) have din midi (via adapter) and a kind of MPE mode, no pitchshifting/sliding from one to the other key, but pressure and position sensors. Those are much cheaper (around 150 i guess)

But it should be easy enough to program an arduino with an usb host shield (or a teensy) to send usb-midi to serial midi output....