Filter MSB LSB Value in BMT Pro

Hi all,
I want to Filter MSB LSB with Rule f.e. just MSB LSB PC 121.74.0-127 and 121.75.0-127
for all 16 midi Channels, should midi data go through outgoing but all other MSB LSB should be blocked to not going through Outgoing also for all 16 midi Channels.

Anyone can help please?

Hi, I’m a bit confused. Are you talking about NRPN’s here? NRPNs have MSB and LSBs and also if they are 14-BIT NRPN’s the values have MSB and LSB.

Or are you talking about filtering CC0 (MSB) and CC32 (LSB) bank changes prior to sending a program change.

I think that might be what you mean. Are you looking to only process Program changes if Bank MSB is 121 and Bank LSB is 74 or 75?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes I mean like that.
Thanks Steve.

Well the easiest way is to look at incoming Bank Change message. Per the MIDI spec the program change should be the next message after a bank change.

In the attached example I look for Bank change any bank set to pp and value set to qq.

In rules, I disect the MSB and LSB and if the MSB is not 121 I exit without sending anything. If LSB is less than 74 or greater than 75, the again I exit without sending anything.

If all conditions pass, I send the original MIDI message along.

Here are the rules.

// MSB bust be 121
// Shift MSB into position and put in rr
rr=pp>>7
if rr!=121 then exit rules, skip outgoing action
// look at LSB 
// mask lower 7 bits
rr=pp&0x7f
if rr<74 then exit rules, skip outgoing action
if rr>75 then exit rules, skip outgoing action

Didn’t test it but if I did it right, it should work.

If the controller breaks the MIDI rules and sends CC0 and CC32 then other message then the PC, it will not work. We would have to capture CC0 and CC32 in global variables and evaluate them later when the next PC comes in to determine whether to pass them along.

Filter-Bank-Change.bmtp (1.2 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes with this Rule are send this two MSB LSB 121.74 and 121.75 but no Midi Note are outgoing and other CC. It must send Midi Note On/Off and All other CCs but just with this two MSB LSB(121.74 and 121.75)
Are they 14 Bit message7 or 7bit?
I think 14bit are they.

Yes MSB is 7 bit and LSB is 7 bit so it comes to 14 bit value total. I break it down in to chucks within the rules.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

But on this two Bank changes 121.74 and 121.74 it should be sent out all midi Notes On/Off and all other CC messages like CC7, CC11 etc over outgoing port.
With this Rules now are send just this two MSB LSB, this is not how I want.
It must be send all midi notes On/Off and other CCs over outgoing Port.

You need other translators or MIDI through path for sending notes. I’m just addressing your request to filter out bank changes for given Program changes. You can put MIDI through paths in the router if you want all notes and other CCs to go through untouched.

image

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Maybe with other Translator but notes and other CCs must be sent just when this two Bank Changes are active, when I switch other Bank(MSB LSB) it should nothing send to outgoing Port.
Im Switch this MSB LSB and PC from Hardware Arranger Korg Pa5x and outgoing to VST Host Plugin.
And just when incoming MSB LSB are this two 121.74 and 121.75 should be sending to the VST Host midi data.

Oh I see, then we probably need to monitor current bank and block all other notes when not on a valid bank.

The attached should do this.

I use global variable ga as the current bank.
I added 3 translators, 1 for 3 byte messages (CC and Note), and 1 for 2 byte messages (PC) and another for 1 byte messages (Start, Stop, timing clock etc). You may not need the 1 byte message translator if you want these to always get through. If that is the case disable it.

Each translator looks at the current Bank value and only passes MIDI messages if it is valid.

I deleted the MIDI thru path now since everything is done in translators.

The rules of the added translators are the same, looking at the current bank (ga).

I hope this does it for you.

I tried translators that disabled and enabled the MIDI through path but they did not execute fast enough and some messages slipped through the cracks.

Filter-Bank-Change-a.bmtp (2.5 KB)

Note that bank change messages other than valid banks are also not passed through. If you want them to go through you will need to delete the rules that exit the translator.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes it works, but I have Stuck Notes on Patch Change, when I hold key presed and switch Patc(MSB LSB PC) I have Stuck Notes) every Time. My idea is to work as Patch Persist on Gig Performer or SST(Seemles Sound Transition).
Maybe an Translator where is sending Note Off messages?

Big thanks SteveC

1 Like

Here is what I changed.

  1. Translator 0.0 I set to stop when complete so that translator 0.2 doesn’t send a duplication PC message.
  2. Added a rule to translator 0.0 to Perform an all notes off message prior to sending the Bank Change message. Then put a delay on the PC outgoing message so that the all-notes message takes place before the bank change
  3. Translator 0.4 handles method 1 of all notes off (passed by the parameter in the added rule in 0.0). it sends a single CC 123 value 127. However some synths do not support this message which is why I created 2 methods.
  4. Translator 0.5 handles method 2 of all notes off by using a timer (Translator 0.6) that iterates through 128 notes sending note-off messages one at a time.

The translator that executes all-notes off will be based on this rule of translator 0.0. Only one method will be used.

// method 1 = send cc method 2 is timer
Perform "All Notes Off",1

So now you should not have any stuck notes when doing a Bank Change. I left it on method 1 so if it doesn’t work, change the rule to method 2 and give it a try. I also assume you are sending notes on MIDI CH 1

Filter-Bank-Change-2024-10-04.bmtp (3.9 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes I sending Notes on Ch1
On 121.74 and 121.75 is working but when I change to oter MSB.LSB after si have Stack Note.
For Gig performer I will use this two Banks 121.74 and 121.75 but also other Banks Im using with Internal Sounds from my Korg Pa5x. The probkem with Stack Note happens when I switch from 121,74 or 121,75 to another Bank f.e. 121.1.1 then last note is helld, it becomes no Note Off Message,

OK, I added a perform rule to translator 0.2 so that it will also send an all-note off message prior to the bank change.

Filter-Bank-Change-2024-10-04a.bmtp (3.2 KB)

Edit: Although your original request was to filter out all PC’s going to other Banks.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

My request was:
To route incomming notes just on this 2 MSB LSB(121.74 & 121.75) and for all others MSB LSB block and not go through BMT to Gig Performer 5.
I do this filtering with Cantabile 3 with Bindings and States (2 x 128 Bindings and States) and its work perfectly without Stack Notes…but this is just for Windows(Cantabile is running just on Windows). I need the same but for MAC, and solution is BMT.
Anyway with the last Preset(Translators) MSB LSB are sending to Gig Performer and note On/Off and this should be blocked from BMT.
Still is not solved.
When I switch f.e. 121.1.0 then should be playable just internal Sound from my Pa5x but old MSB LSB f.e. 121.74.0 after switching to 121.1.0 should be sended Note Off and this way Note Off is not send and resulting with stuck note…

OK, I think I get it now.

Translator 0.0 will determine the bank number and store it in the global variable ‘ga’. No outgoing action on this

Translator 0.1 will process all 3 byte messages. If it is a note message and we are not on a valid bank, the message will be blocked. All other messages will go through untouched.

Translator 0.2 will process PC messages and send an all-notes off message (via perform rule) prior to sending the PC.

Translator 0.3 will ensure all 1 byte MIDI messages go through.

Translator 0.4 is method 1 of all-notes off.

Translator 0.5 and 0.6 handle manual note off message (method 2) if selected in the Perform rule of translator 0.2

So if you are on a valid bank, notes will go through.
If not, everything but notes will get through.
Program change always sends all notes off first.

I hope this is what you are looking for.

Filter-Bank-Change-2024-10-05.bmtp (3.5 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi

This is working but instead of outgoing messages NoteOn/Off how can we change to outgoing messages CC with separate values for each incoming Note On?

Regards
Nikola

I added these rules to translator 0.1 to convert from incoming note to outgoing CC using the same incoming MIDI channel and incoming note number.

//convert note to CC on same MIDI channel
//get MIDI ch
ss=tt&15
// make it a CC message
tt=176|ss

Although now that your are sending CC instead of notes, I’m not sure of needing an all notes off MIDI message. In this scenario all incoming notes are converted to outgoing CC and I’m not sure that is what you wanted. If this isn’t want you want, please be more specific and perhaps provide some examples of what you want converted fromg notes to CC and what different values.

Filter-Bank-Change-2024-20.bmtp (3.6 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz