Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Live Use

Reply
 
Thread Tools Display Modes
Old 10-22-2018, 09:57 PM   #1
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default Most hassle-free way to make non-MPE plugins work like MPE?

I love my Roli seaboards, and I also love the MPE instruments that are playable with them. However, I already have a lot of money invested in non-MPE plugins. In an ideal world, I'd be able to leverage these.

MPE allows you to pitch bend and adjust all sorts of CCs per each played note. It does this by changing the MIDI channel of each played note and having the associated control changes for a given note be locked to he channel that note was played on.

You can emulate MPE with non-MPE plugins... "all" you have to do is run a separate instance of the plugin responding to each MIDI channel. The rub... separate instances means separate FX parameters for each instance.

Ideally, I'd like a way to duplicate a plugin instance up to 16 times over, make each respond to a different input MIDI channel, and tie *all* parameters (perhaps via parameter modulation?) such that a change on the master is replictated to all instances. I know this will eat a lot of CPU and memory, I have a monster of a machine and these are typically light plugins, so I'm not concerned.

I'm a developer with a couple of decades of experience, but I've never developed for Reaper or in lua before. With enough patience I could probably write something to accomplish this goal, but I want to confirm something meeting some or all of my needs doesn't already exist.
kilna is offline   Reply With Quote
Old 10-22-2018, 10:18 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Short answer: JSFXes can do this. Reascripts can't. So LUA etc is out of question, you need to do JSFX programming in EEL. No big deal if you are a software developer. We can work together on this.


Long answer:

I am intending to buy a Seaboard Rise 49, and so I am very interested in this discussion.

At firs I want to get my monophonic plugins e.g. (Kontakt based) Sample Modeling and (SWAM based) Audio Modeling run with the Seaboard. Does this already work for you without hassle ?

Then I'd like to use the Seaboard as a usual keyboard (as it is supposed to replace the "upper" masterkeyboard in my Live setup). Does this already work for you without hassle ?

Then I'll try to learn to play MPE instruments (e.g. the famous synth plugin that comes with the Seaboard). What did you find trying this ?

I found that Pianoteq in fact does handle MPE. I might want to try this, but it does not seem to make much sense for me. I don't know about Kontakt's ability to use MPE. Do you ?

Finally I'd like to create a setup with multiple monophonic instruments combined to an MPE instruments. I found that with the Seaboard you can set the count of channels used with MPE. Maybe this is enough for a recording type of work, but for Live, the count of available voices maybe needs to be dynamically managed. I suppose I rather easily can do a JSFX that distributes the messages to appropriate channels if necessary. What do you think ?

-Michael

Last edited by mschnell; 10-23-2018 at 06:47 AM.
mschnell is online now   Reply With Quote
Old 10-23-2018, 12:25 AM   #3
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

I'm working with Blocks rather than a Rise (I have 4 of the 24 key blocks controllers arranged into 2 48-key keyboards so I can have accompaniment)... my understanding is the Roli Dashboard app is basically the same between the two systems. It allows you to configure a given keyboard in one of the following modes (from the Roli website):

MPE
MPE Mode optimizes the Block with any other hardware or software that supports MPE. When MPE mode is selected, the global channel is set to 1. Global messages – like from a sustain pedal – are sent on the global channel, while note information is sent on channels with the range set by MIDI Start Channel and MIDI End Channel, by default 2–16.
Multi Channel Mode
In Multi Channel Mode, the Block transmits data over multiple channels of MIDI. This setting makes it compatible with non-MPE multi-timbral synths.
Piano Mode
In Piano Mode the Block will behave like a conventional MIDI keyboard by turning off the Glide, Slide, Press, and Lift dimensions of touch. The Block transmits all MIDI data on a single MIDI channel only, making it compatible with mono-timbral synths.
Single Channel Mode
In Single Channel Mode the Block transmits all MIDI data on a single MIDI channel only. This makes it compatible with mono-timbral synths. Pitch bend, channel pressure, or Slide (MIDI CC 74) messages will apply to all notes equally.
So, in short, depending on your settings in Roli Dashboard it should support any of the configurations you described. You'll have to open the Dashboard and change the mode setting if you want to switch between them.

With regard to using it as a primary keyboard, I have rapidly adopted it as my go-to because of how expressive it is... there really isn't anything like it. However, I still prefer a regular hard keyboard for instruments that you don't expect to pitch bend, like a piano. The weight of real non-squishy keys gives a different kind of physical feedback... if you're like me you'll switch between the Roli or a traditional keyboard depending on what instrument you're playing.

With regard to my experience with MPE instruments... I own Equator, Strobe 2, Auras and the free Cypher2 player... I've fallen in love with doing slides, glides and pressure changes so much that I want every synth VST I own to be able to do the same thing (hence this post). It really has changed my entire approach to music creation, no more endless envelope tweaking... I can now do what used to take an hour of screwdriver tweaks and get the same expression in realtime.

With regard to managing the number of voices, you can configure in the Roli Dashboard how many MIDI channels to use in MPE and Multi Channel modes, so if you know you're never going to use more than 10 fingers at once (probably a reasonable assumption) you can trim that value back.
kilna is offline   Reply With Quote
Old 10-23-2018, 05:08 AM   #4
preferred.nomenclature
Human being with feelings
 
Join Date: Dec 2014
Posts: 353
Default

Quote:
Originally Posted by kilna View Post
Ideally, I'd like a way to duplicate a plugin instance up to 16 times over, make each respond to a different input MIDI channel, and tie *all* parameters (perhaps via parameter modulation?) such that a change on the master is replictated to all instances.
That would be amazing. It doesn’t exist as far as I know. I think I’ve seen seen scripts that do pieces of what you describe, will try to find and point you to them.
preferred.nomenclature is offline   Reply With Quote
Old 10-23-2018, 06:34 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

To begin with, did you try to limit MPE to 2 channels (2+3) and use two monophonic VSTs each on one of the channels ?

I do know that AudioModeling is closely affiliated with Roli and hence their SWAM instruments (I do have some of those) should be easily supported.

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 09:57 AM   #6
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

There are 2 approaches you can take, I've only done one of them so far.

The first, which I have done, is to create a separate track for each note-specific VST instance, and set the track's MIDI-in to just one of the MIDI input channels. I made the same number of these to match the number of MIDI channels the Roli was configured to output on. This worked when manually configured.

The second method, which I have not done yet because I only just concocted it, is to create a single track with a large number of outputs... and set the "MIDI input" in the IO section of the plugin connector for that specific FX instance to "MIDI Bus 1" (which I assume limits to MIDI channel 1 since there are 16 busses listed)... and then route audio output channels 1+2 of the VST as appropriate (in the case of the second instance, channels 3+4, in the case of the 3rd 5+6, etc). Ideally this would be the approach; I don't want to have a ton of separate tracks if I can avoid it, and from what I was reading it seems that parameter modulation works natively only within a track. Hopefully the multiple output channels can be mixed down to stereo within the FX chain.
kilna is offline   Reply With Quote
Old 10-23-2018, 01:24 PM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

You don't need multiple tracks at all.

You can place all necessary instances of the plugin in a single FX track's "chain" and to the appropriate routing within this track:

Audio: "Pin-Routing" (using the [2 in 2 out] (or similar) button and assign each plugin to two (of the 64 possible) channels, e.g. 1+2, 3+4, 5+6, .... At the end you can place some pluging (e.g. ReaEQ) and sum the appropriate channels at the two inputs of same.

Midi: most plugins just pass through the midi stream. If it does not, there are options to froward the stream to the next plugin.

Now you can simply set each plugin to receive a dedicated Midi channel.

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 01:36 PM   #8
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

I believe we're saying the same thing in different ways... pin routing is colloquially the "plugin connector" I referred to, as it's described in the UI/docs. One thing you might not have caught though is that in the upper right of the pin routing pop-up for a given FX entry, there is an "IO" button... it's a menu to set various audio and MIDI I/O aside from the audio pin grid. There, you can set the MIDI input to a given "bus"... I assume these busses are channels, since there are 16. So (if my assumption is correct) the setting of the MIDI channel doesn't have to be within the VST itself if the VST responds on all MIDI channels.
kilna is offline   Reply With Quote
Old 10-23-2018, 02:10 PM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

No the Midi buses are not the Midi channels.

By the buses Reaper internally blows up the 16 Midi channels to 256 (16 Buses with 16 channels each). At all menus where you can route Midi, you can select a bus as target and/or source. Additionally in the dedicated routing menus you can select if the channel is to stay the same or if it is to be filtered and/or modified.

-Michael

Last edited by mschnell; 10-23-2018 at 02:16 PM.
mschnell is online now   Reply With Quote
Old 10-23-2018, 02:18 PM   #10
ChristopherT
Human being with feelings
 
Join Date: Apr 2017
Location: South
Posts: 553
Default

I too am contemplating getting a seaboard - so very interested in Reaper responding to some of the MPE info.

I really hope to play some of my Kontakt orchestral libraries with a seaboard (especially cello, viola and violin)

I'm still a little hesitant to purchase and jump in, not knowing if I can successfully interact with Kontakt instruments via Reaper.

Watching this topic
ChristopherT is online now   Reply With Quote
Old 10-23-2018, 04:46 PM   #11
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 4,186
Default

There's no good easy way to automaticly link ALL of the parameters between two plugins at the once, let alone across more than two. You would have to do it manually one by one by one. That'll be tedious, but IS doable, and once you've got it, you can save the FX Chain or a Track Template and recall it whenever you want.
ashcat_lt is offline   Reply With Quote
Old 10-23-2018, 05:15 PM   #12
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by ashcat_lt View Post
There's no good easy way to automaticly link ALL of the parameters between two plugins at the once, let alone across more than two. You would have to do it manually one by one by one. That'll be tedious, but IS doable, and once you've got it, you can save the FX Chain or a Track Template and recall it whenever you want.
Yeah, there's really no way to do this without some custom coding... though from the sounds of it, this may be useful to more than just me.

Quote:
Originally Posted by ChristopherT
I really hope to play some of my Kontakt orchestral libraries with a seaboard (especially cello, viola and violin)
Yes, my thoughts exactly! I've heard there are string libraries out there that are already MPE compatible, but I'm loathe to spend more money, especially if I can get what might be a pretty comparable result by exploding out a few instances of existing VSTs I have... NI's string stuff is already pretty damned good, I just need to get the expressiveness of the Roli into them without having to do endless manual plumbing each time.

Quote:
Originally Posted by mschnell
No the Midi buses are not the Midi channels.
Dang it. So does that mean there's no way of limiting the MIDI channel a given FX instance is sent, since as best as I can tell there's only one MIDI input to the FX chain, which has all the channels? Ideally each FX instance in the chain would get just one MIDI channel, and preferably have that channel remapped to channel 1. Not quite sure how to go about handling the MIDI plumbing if trying to use a single track with multiple discretely routed stereo pairs for each per-note FX instance.
kilna is offline   Reply With Quote
Old 10-23-2018, 10:20 PM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
the setting of the MIDI channel doesn't have to be within the VST itself if the VST responds on all MIDI channels.
Of course if using a VST per voice same would need to be set not to respond to all Midi channels (unless the midi stream is filtered by other means before).

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 10:25 PM   #14
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
Yeah, there's really no way to do this without some custom coding... though from the sounds of it, this may be useful to more than just me.
Should be doable for plugins that present their parameters in "decent" DAW automation variables (e.g. SWAM instruments do so), but with Kontakt libraries the DAW parameters are completely cryptic and not automatable (unless you dedicatedly define some for that purpose).

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 10:31 PM   #15
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
So does that mean there's no way of limiting the MIDI channel a given FX instance is sent
Of course there is. As mentioned in my first post in this thread, JSFX plugins are a perfect means to do "Midi filters", modifying the Midi stream in any possible way. Here you can e.g remove all but a dedicated channel.

But I suppose the more obvious way is to (e.g.) add the global channel to all other channels and/or merge voice-channels in the MPE stream and set the plugin instances to use only a dedicated channel each.

I seem to remember that a JSFX also can be done in a way that it sends out Midi messages to dedicated Midi buses. But I did not try to use this feature, yet.

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 10:37 PM   #16
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

For a working example, I created a Reaper project with ReaSynth on 4 tracks, routing 4 different source MIDI channels to each. I couldn't figure out a way to get it to work on a single track with multiple outputs due to the inability to limit a given VST to a specific MIDI channel input.

You can download the project here:

https://drive.google.com/file/d/1-6j...lzzYM_A8dvgeX/

Obviously this does not have the parameter modulation/syncing addressed.

Maybe all of this would be better served by a VST wrapper rather than trying to have Reaper do everything.
kilna is offline   Reply With Quote
Old 10-23-2018, 10:41 PM   #17
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Only if that "VST wrapper" does exactly what you require.

In fact I started to use Reaper as the "VST wappers" I tested (e.g. Forte) were not able to accomplish my requirements, but Reaper could do this by JSFX scripts.

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 10:44 PM   #18
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
ReaSynth on 4 tracks, routing 4 different source MIDI channels to each
Seems rather chaotic to me.

For four voices with a monophonic synth attached to each I would limit the Seaboard to 4 MPE channels (2,3,4,5) and just set each synth to a single channel.

"Global" (channel 1) messages of course still to be handled if/as appropriate.

-Michael
mschnell is online now   Reply With Quote
Old 10-23-2018, 10:51 PM   #19
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Of course there is. As mentioned in my first post in this thread, JSFX plugins are a perfect means to do "Midi filters", modifying the Midi stream in any possible way. Here you can e.g remove all but a dedicated channel.
Sure you can filter MIDI. But there's no way to filter MIDI per FX on a chain of FX, since each FX item in an FX chain inherits the MIDI output of the prior... I would not be able to have the stack of per-channel FX in a single track with multiple-stereo-pairs for the output of the track. The FX would have to be in separate tracks, increasing clutter and making parameter modulation more difficult.
kilna is offline   Reply With Quote
Old 10-23-2018, 10:58 PM   #20
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Seems rather chaotic to me.

For four voices with a monophonic synth attached to each I would limit the Seaboard to 4 MPE channels (2,3,4,5) and just set each synth to a single channel.

"Global" (channel 1) messages of course still to be handled if/as appropriate.

-Michael
Technically speaking what I've implemented here is Mulit-Channel using Roli's nomenclature, rather than MPE... so I can use channel 1 and not care in this specific case. I don't think we'll get true MPE using this method anyway unless we start routing global CCs to channel 1 and everything else to other channels.

I only did 4 channels 'cause I didn't want to spend all night on a proof-of-concept, and I routed all 16 input channels into those 4 just to see if I could. You could just as easily set the Roli Dashboard to only do 4 channels of output in Multi-Channel mode and skip all of the routing past channel 4.
kilna is offline   Reply With Quote
Old 10-23-2018, 11:12 PM   #21
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by kilna View Post
I don't think we'll get true MPE using this method anyway
...and by this, I mean that a stack of per-channel non-MPE FX is not going to "know" what a global CC "means", there's no singular place to route globals... it has to either be routed to every target FX or no target.
kilna is offline   Reply With Quote
Old 10-24-2018, 06:51 AM   #22
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
But there's no way to filter MIDI per FX on a chain of FX,
Of course there is.

The simple way (as suggested by the Midi specs) is to just set the VSTis each to a single dedicated input channel.

Reaper extends this to using Midi buses.

Later this day I will test this, and do a JSFX that outputs Midi messages on multiple buses. I'll upload it here for you to try.

Now you can set the source Midi bus individually for each VSTi in the FX chain and each will get what the JSFX decides on multiple channels, if appropriate.

-Michael

Last edited by mschnell; 10-24-2018 at 07:12 AM.
mschnell is online now   Reply With Quote
Old 10-24-2018, 06:57 AM   #23
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
I don't think we'll get true MPE using this method anyway unless we start routing global CCs to channel 1 and everything else to other channels.
I understand that this is exactly what the ROLI does: channel 1 = global, channels 1..n used for voices, n user definable between 2 and 16.

Now a JSFX (or other Reaper functionality) could merge channel 1 to all other channels by sending the channel 1 messages multiple times with different channels (and/or use Midi buses in a similar way).

-Michael
mschnell is online now   Reply With Quote
Old 10-24-2018, 07:04 AM   #24
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
...and by this, I mean that a stack of per-channel non-MPE FX is not going to "know" what a global CC "means", there's no singular place to route globals... it has to either be routed to every target FX or no target.
If you want to use a monophonic VSTi (or a multitimbral VSTI with monophonic voices), there is no difference between "global" and "dedicated to a voice", as there is only one voice (or multiple completely independent voices).

Regarding a VSTi that can create multiple inter-depending voices, same would need to speak MPE, or need dedicatedly crafted preprocessing for it's special needs.

IMHO, creating dedicatedly crafted preprocessing for any kind of VSTi makes sense, anyway, as e.g. most VST's can't adhere to note-off velocity ("lift"), but for e.g. a Trumpet, Sax or Flute voice it would be appropriate to e.g. do a "fall" triggered by fast lift. With the instruments I use, fall and similar endings are triggered by dedicated articulations like Multi-Key gestures that don't seem appropriate with a ROLI.

Anyway, appropriate routing is easily doable.

-Michael

Last edited by mschnell; 10-24-2018 at 07:10 AM.
mschnell is online now   Reply With Quote
Old 10-24-2018, 08:56 AM   #25
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Later this day ...
here you are:
Code:
desc:MidiBus Test

slider1:0<0,2,1{all,filter bus,convert channel to bus}>mode
slider2:1<1,16,1>in bus
slider3:1<1,16,1>out bus
slider4:0<0,1,1{off,on}>send channel 1 to buses 2..16

@init
ext_midi_bus = 1;

@slider


@block
  while (midirecv(offset, msg1, msg2, msg3)) (
    bus = midi_bus;
    channel = msg1 & 0x0f;
    (slider1 != 1)|| (bus == (slider2-1)) ? (
      slider1 == 2 ? (
        midi_bus = channel;
       ) : ( 
        midi_bus = slider3-1;
      );  
      midisend(offset, msg1, msg2,  msg3);
      _midicount += 1;
    );
    slider4 && (channel == 0) ? (
      i = 1;
      loop (15,
        midi_bus = i;
        midisend(offset, msg1, msg2,  msg3);
        _midicount += 1;
        i += 1;
      );
    );
  );
-Michael

Last edited by mschnell; 10-24-2018 at 09:03 AM.
mschnell is online now   Reply With Quote
Old 10-24-2018, 12:12 PM   #26
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
The simple way (as suggested by the Midi specs) is to just set the VSTis each to a single dedicated input channel.
The problem of course is that each FX will do that in its own way, and it's a manual step that is repeated for each FX instance, which is why you suggested:

Quote:
Originally Posted by mschnell View Post
Later this day I will test this, and do a JSFX that outputs Midi messages on multiple buses. I'll upload it here for you to try.
So buses are specific to a given track? By their name I was left with the impression that buses are shared for the whole project, but if they're discrete per track then we can route incoming MIDI on channel 2 -> Bus 2 channel 1. MIDI input for a track is on Bus 1 right, so we can just leave Bus 1 Channel 1 as-is and anything that needs to pay attention to global can listen to that. Is this how your JSFX below is constructed?

Thoughts / Questions:
  • The output MIDI channel on the target buses should be configurable and default to 1 (route incoming MIDI on channel 2 -> Bus 2 channel 1)
  • Amount of polyphony should be configurable, in addition to which MIDI channel to start at
  • Since it seems to work OK in my demo above, channels beyond the polyphony amount should loop back to the first channel, so if we start at channel 2 as per MPE default for the first note-channel, and have 4 note poly set, then channel 6 should map to bus 2, channel 7 to bus 3, etc. This is similar to the same behavior as the MPE spec for any polyphony amount greater than 15, a channel with a note already playing will be re-used.
  • How will we bulk add the FX into the chain with the appropriate bus inputs set? Seems like a simple duplicate of an existing FX item in the chain and subsequent modification of the input bus for each would be the way to go, so the "MPE Explode" functionality would be a context-menu action for an existing FX item. The setup process would be add the VSTi item into the FX chain, optionally configure it, right-click the FX item, select "MPE Explode", you are prompted for the amount of polyphony and start MIDI channel, and then the appropriate FX and routing are added into the FX chain at that spot.
  • How will we go about parameter modulation in bulk for all params in the group of the identical newly created FX items?
  • How do we mix the multichannel audio output down to stereo...? I've not worked with multichannel tracks in Reaper, are they mixed down to stereo for "free", i.e., with no additional work needed on my part?

I want to help... pointers on where to get started coding for any of the above would be helpful.

I won't be able to try out your JSFX until tonight, it's noon here now.

Last edited by kilna; 10-24-2018 at 12:37 PM.
kilna is offline   Reply With Quote
Old 10-24-2018, 03:10 PM   #27
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by kilna View Post
So buses are specific to a given track? By their name I was left with the impression that buses are shared for the whole project,
I initially had this impression as well (buses as a means of routing Midi behind the scenes). But I now seem to understand that the buses are just extensions of the Midi channel (from 16 to 256 of them)

Quote:
Originally Posted by kilna View Post
Is this how your JSFX below is constructed?
I think yes. The plugin is a proof of concept for a within-FX-chain Midi router by means of Buses. I suppose the GUI is self explaining...

If you understand and verify the basic functionality of the plugin and find it's usable for that purpose, it of course can be enhanced with necessary or desirable features.

What do you mean by "parameter modulation". Right now we are just discussing parameters that can be modulated by Midi CCs. DAW-variable only parameters can be handled, but this will be a second step.

For mixing the audio you simply can combine the channels at the input pins of some plugin. But if you want to have more control there also are Mixer plugins (supposedly JSFXes).

"Bulk add" obviously is a task a Reascript could perform. But I am not very knowledgeable with this issue. There are several specialists for this in the JSFX/Reascript forum.

I use multiple tracks to hold the VSTs that are to be active for a certain patch, and use SWS "LiveConfigs" for switching between them, by muting/unmuting appropriate tracks.

-Michael

Last edited by mschnell; 10-24-2018 at 09:44 PM.
mschnell is online now   Reply With Quote
Old 10-25-2018, 01:48 PM   #28
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

OK, so I've used your code as a starting point and added the features related to routing that I described above:

Code:
desc:MIDI Channel to Bus
//tags: MIDI processing routing

in_pin:none
out_pin:none

slider1:1<0,15,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Start MIDI Channel / Bus
slider2:14<1,16,1{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Qty of Channels / Busses (MPE Polyphony)
slider3:1<0,1,1{Disabled,Enabled}>Map High Channels Wrapped Busses
slider4:0<0,16,1{Disabled,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Broadcast Channel (sent to every output bus)
slider5:0<0,16,1{Passthrough (mapping disabled),1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}>Map to MIDI Channel

@init

ext_midi_bus = 1;

@slider

start_channel = slider1;
end_channel = start_channel + slider2;
(end_channel > 15) ? (end_channel = 15;);
num_channels = (end_channel - start_channel + 1);
wrap = slider3;
broadcast = (slider4 > 0);
broadcast_channel = (slider4 - 1);
map = (slider5 > 0);
map_channel = (slider5 - 1);

@block
while (midirecv(offset, msg1, msg2, msg3)) (
    
  input_bus = midi_bus;
  input_channel = (msg1 & 0x0f);
  message = (msg1 & 0xf0);
  (broadcast && (input_channel == broadcast_channel)) ? (
    bus = start_channel;
    loop( num_channels,
      output_channel = ( map ? map_channel : input_channel );
      midi_bus = bus;
      midisend(offset, (message + output_channel), msg2, msg3);
      bus += 1;
    );
  ) : (
    ((input_channel >= start_channel) && ((input_channel <= end_channel) || wrap)) ? (
      output_bus = input_channel;
      (input_channel > end_channel) ? (
        output_bus = (((input_channel - start_channel) % num_channels) + start_channel);
      );
      midi_bus = output_bus;
      output_channel = ( map ? map_channel : input_channel );
      midisend(offset, (message + output_channel), msg2, msg3);
    ) : (
      midisend(offset, msg1, msg2, msg3);
    );
  );
);
This does all of the things I want:
  • Configurable polyphony
  • Configurable start channel/bus
  • Ability to rewrite to a target channel (since many FX only respond on one channel)
  • Ability to map a larger number of incoming MIDI channels to a smaller number of busses (higher MIDI channels wrap back around to use lower bus numbers)... this allows me to run, say, only 4 VTSs while retaining as much polyphony as I want during recording the MPE MIDI stream.
  • Ability to optionally send one MIDI channel to all of the target busses (for MPE common-info on MIDI channel 1)

If you want full MPE compatibility, set:
  • Start Midi Channel -> 2
  • Qty of Channels / Busses -> 15
  • Map High Channel Wrapped Busses -> Either option
  • Broadcast Channel -> 1
  • Map to MIDI Channel -> Whatever your FX are configured to

...and you'll of course need 15 instances of whatever FX you want, configured each for busses 2 through 16

I've also updated my proof-of-concept Reaper file to use the new methodolgy:

https://drive.google.com/file/d/1VDR...ew?usp=sharing

In this example I have 4 ReaSynth instances, each responding to busses 2-5... the MIDI Channel to Bus plugin configured for start channel 2, channel quantity 4, wrap enabled, broadcast to channel 1, and mapped to channel 1.
Attached Files
File Type: rpp MPE Test.rpp (8.4 KB, 42 views)
File Type: txt MIDI Channel to Bus.txt (1.8 KB, 37 views)
kilna is offline   Reply With Quote
Old 10-25-2018, 03:23 PM   #29
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

GREAT !!!

Do you think this as a ready v1.0 at this point of time ?
Do you want me to add an about section and upload it to be used by ReaPack ?
Or (better) do you want to do this yourself ?

Thanks,
-Michael
mschnell is online now   Reply With Quote
Old 10-25-2018, 03:33 PM   #30
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
What do you mean by "parameter modulation". Right now we are just discussing parameters that can be modulated by Midi CCs. DAW-variable only parameters can be handled, but this will be a second step.
Yes, it'd be something new in addition... So the idea I had is that I'm never going to want to change an FX parameter for only one instance of the duplicated FX, if I change it on one, I want the same value replicated across all of the other FX responding on different channels. Parameter modulation is a way for Reaper to take a change made on a parameter in one FX item in the chain and have that in turn change a parameter in a different FX in the same chain. What I'd want is to do this for all parameters. This way I only have to move an envelope in the first FX in the chain to alter the same value in all of the duplicated FX.

Quote:
Originally Posted by mschnell View Post
For mixing the audio you simply can combine the channels at the input pins of some plugin. But if you want to have more control there also are Mixer plugins (supposedly JSFXes).
I implemented this in my proof-of-concept above using ReaEQ at the end of the FX chain.

Quote:
Originally Posted by mschnell View Post
"Bulk add" obviously is a work a Reascript could perform. But I am not very knowledgeable with this issue. There are several specialists for this in the JSFX/Reascript forum.
This is what I am going to work on next. Ideally the script action will:
  • Prompt the user for amount of polyphony and start MIDI channel
  • Add the "MIDI Channel to Bus" JSFX configured as above, just before the selected FX instance
  • Duplicate the selected FX instance in the chain until the amount of polyphony is satisfied
  • Configure each of the cloned and original FX to point at an appropriate input MIDI Bus and output stereo pair
  • Set up parameter modulation on all params with the first FX instance as a master to each of the duplicated FX instances
  • Add ReaEQ (or another lighter FX) at the end of the FX chain to mix all of the instances down to a single stereo pair

Last edited by kilna; 10-25-2018 at 03:42 PM.
kilna is offline   Reply With Quote
Old 10-25-2018, 03:39 PM   #31
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Do you think this as a ready v1.0 at this point of time ?
I think the "MIDI Channel to Bus" component is stable based on my tests.

Quote:
Originally Posted by mschnell View Post
Do you want me to add an about section and upload it to be used by ReaPack ?
Or (better) do you want to do this yourself ?
I think I want to learn about ReaPack, so I'll do it... The "MIDI Channel to Bus" JSFX is probably more generally useful than just for MPE so it should be its own distribution in ReaPack, and then the MPE Reascript action I described above would have a dependency on it.
kilna is offline   Reply With Quote
Old 10-25-2018, 10:15 PM   #32
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Great !

There are two things to learn about feeding ReaPack:
1) creating meta information in the source code of the file(s)
2) using GitHub for uploading, version managing and "polling/pushing"

You should skim this thread -> https://forum.cockos.com/showthread.php?t=177978for more information

Re 1: I'll do an example for this JSFX later this day which you can modify place at the top of the code and then upload it to GitHub.

I am not sure about how the dependency to "the MPE Reascript action" could be managed by RaPack (other than mentioning that in the "about:" section). (Nor did I full understand the purpose of the MPE Reascript action.)

-Michael
mschnell is online now   Reply With Quote
Old 10-26-2018, 08:41 AM   #33
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Later this day:

Code:
desc: MIDI Channel to Bus
tags: MIDI processing routing
author: kilna & Michael Schnell (mschnell@bschnell.de)
version: 1.0
changelog: initial release
donation: United Nations Foundation http://www.unfoundation.org/
about:
  ## Description
  A Midi stream received in a single Midi Bus containing messages with multiple channels is distributed do multiple Midi Buses. 

  ## usage 
  “Start MIDI Channel / Bus” selects the first Midi channel that is to be routed to the set out output buses
  “Qty of Channels / Busses (MPE Polyphony)” defines the number of different channels (starting frim the start channel) that are to be routed to the set out output buses. Other channels are passed through unchanged. 
  “Map High Channels Wrapped Busses”   ???
  “Broadcast Channel (sent to every output bus)” channel to be sent to all buses defined by the two first settings
  “Map to MIDI Channel” if enabled, the channel of the messages that are routed to the buses defined by the two first settings is changed to the one defined here. 

 
// NO WARRANTY IS GRANTED. THIS PLUG-IN IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
// WARRANTY OF ANY KIND. NO LIABILITY IS GRANTED, INCLUDING, BUT NOT LIMITED TO,
// ANY DIRECT OR INDIRECT,  SPECIAL,  INCIDENTAL OR CONSEQUENTIAL DAMAGE ARISING
// OUT OF  THE  USE  OR INABILITY  TO  USE  THIS PLUG-IN,  COMPUTER FAILTURE  OF
// MALFUNCTION INCLUDED.  THE USE OF THE SOURCE CODE,  EITHER  PARTIALLY  OR  IN
// TOTAL, IS ONLY GRANTED,  IF USED IN THE SENSE OF THE AUTHOR'S INTENTION,  AND
// USED WITH ACKNOWLEDGEMENT OF THE AUTHOR. FURTHERMORE IS THIS PLUG-IN A  THIRD
// PARTY CONTRIBUTION,  EVEN IF INCLUDED IN REAPER(TM),  COCKOS INCORPORATED  OR
// ITS AFFILIATES HAVE NOTHING TO DO WITH IT.  LAST BUT NOT LEAST, BY USING THIS
// PLUG-IN YOU RELINQUISH YOUR CLAIM TO SUE IT'S AUTHOR, AS WELL AS THE CLAIM TO
// ENTRUST SOMEBODY ELSE WITH DOING SO.

in_pin:none
out_pin:none
...
Please insert you signature and a description of "Map High Channels Wrapped Busses" (as I don't understand what this is supposed to do).

Hope this helps.

Last edited by mschnell; 10-26-2018 at 11:17 AM.
mschnell is online now   Reply With Quote
Old 10-26-2018, 10:19 AM   #34
kilna
Human being with feelings
 
kilna's Avatar
 
Join Date: Oct 2009
Location: San Diego, CA, USA, Earth, Sol System, Milky Way Galaxy
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Please insert you signature and a description of "Map High Channels Wrapped Busses" (as I don't understand what this is supposed to do.
I have been struggling to describe this part of it, and I am not happy with that name.

So when recording MPE MIDI, the amount of polyphony you have for recording (which in MPE translates to MIDI channels) can be up to 15. Higher numbers are good, because you want to avoid note conflicts.

Now, say you do not want to run 15 synths, to keep CPU or memory use down, or just to reduce clutter... what this parameter does is if you only have 4 busses configured, and a MIDI note comes in on what would have been routed to a 5th bus, then it is instead routed to the first bus. The 6th would go to the 2nd, etc.

This way, an MPE MIDI performance with 15 channels of note data can still be used with a smaller number of VSTs/busses. Also, you can leave your ROLI with the default settings and not have to change the number of MIDI channels it uses... you just set it once and use it the same configuration for natively MPE instruments and composite FX constructed using this routing.

So, I don't know how to explain that in a sentence of text short enough to fit onto the label for the drop-down menu. I really don't like the description it has right now, I want to change it, I just don't know what to change it to.
kilna is offline   Reply With Quote
Old 10-26-2018, 11:24 AM   #35
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

I see.

But I feel that the algorithm is not perfect right now, if you want to decently manage a reduction of the max voices.

I suggest to track the running notes/channels in the MPE input and to assign new notes to the output channels/buses in a round-robin way, independently of the input channel, re-using an output voice by sending a note-off and affiliating a new input channel to same.

The downside is that you need to cut a note before the corresponding note-off event including the note-off-velocity (aka "lift dimension") occurs. This obviously will degrade certain sounds.

-Michael
mschnell is online now   Reply With Quote
Old 10-26-2018, 10:46 PM   #36
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

BTW. (happily you got up to speed with EERL programming very fast ) :
Regarding reducing the count of voices I suggest using an array that holds the assignments of incoming channels to outgoing "slots", used in a "overwrite the least recently used entry" way with a configurable max count of active entries.

Same would hold the incoming channel (or maybe the outgoing slot if sorted the other way) (or -1 for unused), a mark that a sound is running (set with note-on, reset with note-off) and the note-on velocity (the same byte as the mark could be used: "not running" = 0, as note-on velocity 0 means note-off), and a "last used" timestamp .

If a message with a not managed channel arrives, the least recently used entry that is not "running" is re-used. No problem here.

If no not running entry is found, the least recently used entry needs to be re-used. Now you need to send a Note-off to the old target slot to kill the sound (as supposedly the keyboard did not detect legato here). Here I suggest to use the saved note-on velocity for note-of velocity to provide the best possible consistency.

It makes sense to save this fact (including the "old" channel) in the same or in an additional array, to be able to discard messages to such channel, preventing incoming messages to a dead voice from taking away a voice slot.

Using just note-on and note-off events for assigning slots to incoming channels can't be done, because MPS allows for meaningful messages to a channel before note-on (e.g. Pitch-bend for staring a detuned sound) and after note-off (modulating the release phase).

Afterthought:
All this is strictly about means to use "any" VSTi with an MPE enabled keyboard. There also are things that might be viable for dedicated sound engines. E.g. I use "The Trumpet" by sampleModeling, which is based on NI Kontakt. Here it would make sense to convert Note-Off velocity ("lift" Dimension) to triggering a "Fall", which is done by sending note-on events outside the range of the instrument). Kontakt can't manage Note-off velocity .

-Michael

Last edited by mschnell; 10-27-2018 at 06:35 AM.
mschnell is online now   Reply With Quote
Old 10-28-2018, 09:39 PM   #37
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 391
Default

I have a note limiting script for MPE. More on it here:

https://forum.cockos.com/showthread....05#post2045105

I do just that. However, I do (very!) occasionally get stuck notes, so I don't know if it did it correctly.

In the stash at:
https://stash.reaper.fm/v/34469/MPE%...l%20Strip.jsfx
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 10-28-2018, 11:20 PM   #38
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

I'll take a look later this day. Maybe trying to integrating the to scripts...

-Michael
mschnell is online now   Reply With Quote
Old 10-29-2018, 11:57 AM   #39
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Quote:
Originally Posted by woodslanding View Post
I have a note limiting script for MPE.
Thanks for providing the code.

In fact I did my own version of a round-robin Midi bus scheduler for an MPE data stream. It seems to be partly working, but while implementing the details, I remembered your warning regarding stuck notes. To prevent stuck notes, I intended to make sure that there are no Note-On events without appropriate Note-Off events in any of the outgoing buses.

Taking a closer look, this prevents the usual (non MPE) way how a keyboard sends legato notes: ignoring that the target is monophonic, simply send a Note--On before the Note-Off of the previous key.

Now an MPE keyboard needs to handle each voice as a monophonic instrument. So I am very unsure how it is to detect that the player intends legato (instead of starting a new voice), and what information exactly it sends to the sound engine.

Unfortunately I don't have an MPE keyboard (yet) .

Any help regarding these specs ?

-Michael

Last edited by mschnell; 10-29-2018 at 12:49 PM.
mschnell is online now   Reply With Quote
Old 10-30-2018, 07:22 AM   #40
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,685
Default

Some more thoughts:

I suppose an MPE keyboard sends legato transitions in the same way as a normal keyboard: the Note-off messages for the first note is sent after the Note-On message of the second note. All on the same channel.

Now if there only are two notes, it would be easy to handle this by the JSFX, saving the two least recent two Note-On for any slot (output-channel), kill one if a Note-Off for the same key is detected and send Note-Off events for the remaining ones if a slot needs to be reused for another input channel.

But if the keyboard would be allowed to send many overlapping notes this would not work so easily.

How can we be sure what the ROLI does ?

-Michael

Last edited by mschnell; 10-30-2018 at 02:09 PM.
mschnell is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.