MIDI channel distributor with note protection

General Discussion about Plogue Bidule

Moderators: vincent@plogue, davidv, seb@plogue

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

MIDI channel distributor with note protection

Postby V_ad_im » Thu Sep 21, 2017 7:37 am

Hi!

I make a midi transposer for using more than 12 step scales with VST instruments. Some instruments not able to receive MIDI by multiple channels, so, I need a MIDI channel distributor with note protection (for send first pressed note (for example, C) on 1ch, second (E) on 2 ch, third (G) on 3ch etc.) for using a couple of identical instruments. Polyphonic adapter is not good for this - if I place a VST instrument inside polyphonic adapted group, I have only mono output.. Midi switcher also not good - it has only "note close on output close" function, but not "protection notes" mode. Is there easy way, or I need to make a channel distributor from scratch?

Best regards,
Vadim
Attachments
Screen Shot 2017-09-21 at 3.16.45 PM.JPEG
Screen Shot 2017-09-21 at 3.16.45 PM.JPEG (138.59 KiB) Viewed 544 times
Last edited by V_ad_im on Thu Sep 21, 2017 3:14 pm, edited 1 time in total.

NTO
Posts: 111
Joined: Sat Feb 18, 2017 9:54 am

Re: MIDI channel distributor with note protection

Postby NTO » Thu Sep 21, 2017 10:01 am

Sorry, if I misunderstood...
2017-09-21_Bidule_NoteFilter2VST.png
2017-09-21_Bidule_NoteFilter2VST.png (64.36 KiB) Viewed 535 times

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protein ection

Postby V_ad_im » Thu Sep 21, 2017 10:32 am

Thank you, but this case not for me - I have a scale with dynamic root note (root note will changes), so for your scheme 16*16 instruments will needed..) but I plan to use < 12. A goal is each new pressed note (not depended on pitch) with own pitchband data is distributed to one currently free of 12 vst instruments. As if I have a mono sound source and want to make a polyphonic instrument.
Last edited by V_ad_im on Thu Sep 21, 2017 3:20 pm, edited 2 times in total.

Credo
Posts: 54
Joined: Tue Jan 13, 2015 4:56 am

Re: MIDI channel distributor with note protection

Postby Credo » Thu Sep 21, 2017 1:42 pm

Would a key-switch bidule into a channel splutter not work? I think that bidule lets you assign all 128 MIDI notes to a specific channel.

As a quick hack for closing notes after a port bounce, set the note closer in the channel splutter to off and echo 'just the note-off events' to all of the plugins at all times. Put channel remappers after each port in the MIDI channel splitter if you need to specify a different channel for the plugin(s) connected from there.

If you really want a smart note and pedal closer that remembers things across bounces, that's a bit more involved. I'm still trying to figure out a reliable way to do that myself.

I'm headed to work right now, but I'll try to come back later tonight and screen shot some ideas.
Last edited by Credo on Thu Sep 21, 2017 8:36 pm, edited 4 times in total.

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protection

Postby V_ad_im » Thu Sep 21, 2017 2:57 pm

Thanks a lot for a hint! I will try it.
Also I want to make same module for a >40 articulations distribution by keyswitches between 2 or 3 identical instruments (for example, for a big strings sample library)

as I understand, algorithm is:

1st note ON recieved - send to 1st ch. with flag "free"
set 1 ch flag to "busy"
store pitch of note to 1 ch connection.

2nd note ON recieved - send to 2st ch. with flag "free"
set 2 ch flag to "busy"
store pitch of note to 2 ch connection.

3rd note ON recieved - send to 3st ch. with flag "free"
set 3 ch flag to "busy"
store pitch of note to 3 ch connection.

2nd note OFF recieved -
detect a pitch of 2 note and restore to 2 ch connection.
send to 2st ch.
set 2 ch flag to "free"

ETC..

recently I made a same pitch transposer in MAX 7, for polyphony function external object Lpoly was used (see picture), it works fine, but now I want to make same in Bidule for use transposer in inserts of sequencer, but not as standalone.
Attachments
Screen Shot 2017-09-21 at 10.38.47 PM.JPEG
Screen Shot 2017-09-21 at 10.38.47 PM.JPEG (119.88 KiB) Viewed 510 times
Screen Shot 2017-09-21 at 10.54.02 PM.JPEG
Screen Shot 2017-09-21 at 10.54.02 PM.JPEG (177.14 KiB) Viewed 510 times

Credo
Posts: 54
Joined: Tue Jan 13, 2015 4:56 am

Re: MIDI channel distributor with note protection

Postby Credo » Thu Sep 21, 2017 7:54 pm

V_ad_im wrote:Thanks a lot for a hint! I will try it.
Also I want to make same module for a >40 articulations distribution by keyswitches between 2 or 3 identical instruments (for example, for a big strings sample library)


For round Robin I find it simplest to just cycle a list and echo note off and pedal events to all relative channels (since in most plugins a note-off does nothing if that note wasn't on before). Otherwise we have to store lots of stuff in active maps and constantly check them, and either build ways to trigger specific note-off events, or use gates to control where they can go. I've been experimenting with various methods to track open notes and pedals through wads of raw message extraction into 'indexed maps', and only route note/pedal off events to specific places where they are open, but so far I can't quite get that working at full speed (have not tried in discrete mode); meanwhile, just spamming the note/pedal off events to every channel/plugin in the round does the trick.
Image

See the attached Bidule for an Example of doing a 16 bounce round robin, either to a single multi-timberal plugin, or you could fork it off to any mixture/combination of individual plugins.
roundrobinExample.zip
Round Robin Example
(5.71 KiB) Downloaded 7 times


Note, you could group this stuff up, and add in Key-Switching or Program Change based branches below my general channel splitter in the example as needed.

Other options include echoing ALL CC events as opposed to just pedals CC64-69 (might sound smoother on some types of instruments), and using note off to trigger the list advancement instead of note on. You could also 'shuffle' the list if you want a more random order, etc.

Note, the reason I do things this way instead of using a simple note closer, or some of the built in note closing abilities of various Bidules, is because in monophonic sequences we often want to preserve the 'legato effect' of notes 'overlapping' along with our channel/port bounces, and obviously in divsi sequences we want all of the relevant notes that began before the 'bounce' to keep sounding...so this is my personal 'quick and dirty, low thought' work-around.

Since we're emulating a single instrument, I just echo the pedals to all of the ports/channels at all times.
Last edited by Credo on Fri Sep 22, 2017 6:41 am, edited 10 times in total.

Credo
Posts: 54
Joined: Tue Jan 13, 2015 4:56 am

Re: MIDI channel distributor with note protection

Postby Credo » Thu Sep 21, 2017 8:37 pm

Credo wrote:Would a key-switch bidule into a channel splutter not work? I think that bidule lets you assign all 128 MIDI notes to a specific channel.

As a quick hack for closing notes after a port bounce, set the note closer in the channel splutter to off and echo 'just the note-off events' to all of the plugins at all times. Put channel remappers after each port in the MIDI channel splitter if you need to specify a different channel for the plugin(s) connected from there.

If you really want a smart note and pedal closer that remembers things across bounces, that's a bit more involved. I'm still trying to figure out a reliable way to do that myself.

I'm headed to work right now, but I'll try to come back later tonight and screen shot some ideas.




EDIT

Now that I'm looking at Bidule I see that the key-switching bidule isn't particularly helpful in the OP's scenario.

I think a more appropriate Bidule would be a series of "Note Filter (Range)" bidules routed through channel re-mappers.
Rather than trying to keep up with with individual open notes for each 'zone/range', just spam all note/pedal off events like I've done in the round robin example I've added to this thread.

If one is feeling up to connecting lots of wires, there is also the true "Note Splitter" bidule that gives access to all 128 notes individually, where they can be routed independently to wherever you like.

Credo
Posts: 54
Joined: Tue Jan 13, 2015 4:56 am

Re: MIDI channel distributor with note protection

Postby Credo » Fri Sep 22, 2017 6:49 am

P.S.

On my round-robin example, some instruments (things that rely heavily on CC1 or CC11 for dynamics rather than note velocity) might sound smoother if you echo those continuous controller events too, as opposed to 'just' echoing the pedals. Simply change the "and all the Pedal CC Events" accordingly.

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protection

Postby V_ad_im » Sat Sep 23, 2017 6:36 am

Thank you, sorry for delayed answers (in this days I work in the ship and have not good internet) - I will try it in near days. And one question to Seb - is it possible to make stereo outputs from polyphonic adapter?

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protection

Postby V_ad_im » Sun Sep 24, 2017 4:53 am

Credo wrote:P.S.

On my round-robin example, some instruments (things that rely heavily on CC1 or CC11 for dynamics rather than note velocity) might sound smoother if you echo those continuous controller events too, as opposed to 'just' echoing the pedals. Simply change the "and all the Pedal CC Events" accordingly.



Credo, I modified your example - now note off sends only to needed channels:
Attachments
roundrobinExample v3 CC to all ch_.bidule.zip
(5.92 KiB) Downloaded 9 times

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: MIDI channel distributor with note protection

Postby seb@plogue » Mon Sep 25, 2017 11:47 am

And one question to Seb - is it possible to make stereo outputs from polyphonic adapter?


There's no limits for the outputs of the polyphonic adapter, the only thing is that the last audio output will always
be seen as a "voice activity gate" (signal stays 1 as long as the voice is active, when it becomes 0, the voice than put pack into
the available list) output and this is why it's not shown.

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protection

Postby V_ad_im » Tue Sep 26, 2017 2:56 pm

seb@plogue wrote:
And one question to Seb - is it possible to make stereo outputs from polyphonic adapter?


There's no limits for the outputs of the polyphonic adapter, the only thing is that the last audio output will always
be seen as a "voice activity gate" (signal stays 1 as long as the voice is active, when it becomes 0, the voice than put pack into
the available list) output and this is why it's not shown.


Great!

The next question - if I attempt to put a VSTi into polyphonic adapter (I tested VSTi's of a different brands - result is same), there is an audible artifacts - what's wrong?
Attachments
audio examples of VSTi in a group.zip
(228.5 KiB) Downloaded 5 times
Screen Shot 2017-09-26 at 10.17.47 PM.JPEG
Screen Shot 2017-09-26 at 10.17.47 PM.JPEG (17.64 KiB) Viewed 400 times
Screen Shot 2017-09-26 at 10.18.58 PM.JPEG
Screen Shot 2017-09-26 at 10.18.58 PM.JPEG (48.32 KiB) Viewed 400 times

V_ad_im
Posts: 101
Joined: Mon Nov 21, 2011 5:29 pm
Location: Moscow area, Russia

Re: MIDI channel distributor with note protection

Postby V_ad_im » Fri Sep 29, 2017 2:44 am

Credo wrote:
Credo wrote:Rather than trying to keep up with with individual open notes for each 'zone/range', just spam all note/pedal off events like I've done in the round robin example I've added to this thread.

[/color]


As I see, note-off is only part of iceberg.. I found, that example above works good in standalone Bidule (or directly from midi-keyboard, as shown on a picture), but no good in a sequencer: if I use sequencer as input and pressing two keys at once, midi notes have one midi tick position (even if set PPQ resolution to maximum value), so midi note-on also seems on a one channel - midi switcher is so late for midi note-on messages too.. How to synhronize midi-on message with midi switch, triggered by note-on?
Attachments
Screen Shot 2017-09-29 at 10.11.15 AM.JPEG
Screen Shot 2017-09-29 at 10.11.15 AM.JPEG (333.34 KiB) Viewed 359 times
Screen Shot 2017-09-29 at 10.11.44 AM.JPEG
Screen Shot 2017-09-29 at 10.11.44 AM.JPEG (335.4 KiB) Viewed 359 times
Screen Shot 2017-09-29 at 10.13.22 AM.JPEG
Screen Shot 2017-09-29 at 10.13.22 AM.JPEG (142.81 KiB) Viewed 359 times
Last edited by V_ad_im on Sat Sep 30, 2017 12:52 am, edited 1 time in total.

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: MIDI channel distributor with note protection

Postby seb@plogue » Fri Sep 29, 2017 9:00 am

The next question - if I attempt to put a VSTi into polyphonic adapter (I tested VSTi's of a different brands - result is same), there is an audible artifacts - what's wrong?


There's nothing set up to be the voice activity gate see (f) on this :

https://www.plogue.com/bidule/help/ch08.html

Given that there's no way to know actual adsr settings or the sample length from the plugin, you would need to set up
something generic that should cover all cases by setting a longer time. It might also be possible to set up something
with RMS so that if it falls under a certain threshold the gate is turned off/the voice is flagged as terminated.

Credo
Posts: 54
Joined: Tue Jan 13, 2015 4:56 am

Re: MIDI channel distributor with note protection

Postby Credo » Sat Sep 30, 2017 5:02 am

I've had similar things with my attempts at note tracking.

I.E. Works fine when I play into with my keyboard, it hangs with a sequence.

I have some that map open events. All the map indexes get checked against note off events, and only get forwarded to channels with a match.

Theories as to why it gets broken:

I've mostly tested with scoring type DAWs, and I notice when a note gets hung it's when there is divsi on the stave. I also notice both notes were sent on the 'same' time stamp. So I figure that perhaps one of the note-ons did not get written to the map...maybe one can't write to the same map, two different indexes, in the same tick.....just a guess.

Eventually I'll get around to either setting a slight one sample delay on every other note, or cascade over a couple of maps per channel to see if that fixes it.

Here's an example of one of my attempts to do a smart channel bouncer. Works fine when playing by hand with a MIDI Controller....hangs in sequences that have divisi on a stave/track with multiple notes on the same time-stamp.
PC-Switching 4.zip
PC Based Channel Bouncer
(24.18 KiB) Downloaded 8 times


Return to “Bidule General”

Who is online

Users browsing this forum: No registered users and 5 guests