Basic grid Translator processing

Hi I need help with my project. It's both me learning how to use BMT and setting up the basic of a live-set. The first thing is learning how to map grids of buttons without making single translators for every single button.
So I have a grid of 8 buttons on my controller that I want to map to a specific channel on a specific note range of my DAW.

BMT log for MIDI IN button 1:
1: MIDI IN [Twitch]: 97 60 7F
2: MIDI IN [Twitch]: 97 60 00

BMT log for MIDI IN button 8:
3: MIDI IN [Twitch]: 97 67 7F
4: MIDI IN [Twitch]: 97 67 00

Meaning they are all Note ON messages on Channel 8, note 60h (96) to 67h (103). Note offs are made with Note ON velocity 0 as you can see.

So I set up 2 translators, one for Note ONs, one for Note OFFs.
Channels are easy, incoming is always 8, outgoing is always 1
Notes need to be transposed to start at C0 (MIDI note #0) and up (0, 1, 2... 7). Incoming notes are as you can see in the log, 96 to 103 (decimal). So I assigned incoming notes as "any note" set to "pp" and outgoing notes as "rr" and used a simple rule:
rr==pp-96
Velocity is simply passed with a "qq" variable.

So far so good.
The translator for note off is identical. The the difference should be that incoming velocity is 0 and that's it.
Well, to keep it short, it doesn't work. Seems like BMT won't process this in the order I want. The first translator (note on) works fine, but the second (note off) should have velocity 0 not 127.

BMT log for Incoming, Rules and Outgoing after setting up the two translators is as follows:
1: IN 0.0 Note On on ch. 8 with any note set 'pp' to note=96 with any velocity and 'qq' to velocity=127
2: RULE 0.0:1 expression: (rr=pp-96) = 0
3: OUT 0.0 Note On on ch. 1 with note:rr=0 and velocity:qq=127
4: IN 0.1 Note On on ch. 8 with any note set 'pp' to note=96 with any velocity and 'qq' to velocity=127
5: RULE 0.1:1 expression: (rr=pp-96) = 0
6: OUT 0.1 Note On on ch. 1 with note:rr=0 and velocity:qq=127

Another interesting log is MIDI IN + MIDI OUT
1: MIDI IN [Twitch]: 97 60 7F
2: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 00 7F
3: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 00 7F
4: MIDI IN [Twitch]: 97 60 00

From the DAW side I can confirm that notes are triggered correctly but no note off command is sent.

Anyone any advice?

Hi, if you post your project file. I will correct it and tell you what I did.

Note off can be a bit tricky since MIDI allows the following forms

9x nn 00

8x nn vv

where nn= note number vv is velocity and x is MIDI CH -1

MT Pro will recognize either form and will recognize 9x nn 00 as a Note Off but if you want to send note off you in the same format, you will likely need to use raw MIDI as sending note off from MT Pro otherwise will send as 8x nn vv.

An alternative would be:

Incoming: Note-Off MIDI CH 8 Note 96 velocilty qq

Outgoing: Note-On MIDI CH 8 Note 96 velocity qq

The output is actually a note-off (tricking MT Pro).

If you use

Outgoing: Note-Off MIDI CH 8 Note 96 velocity qq

It will send 87 60 qq

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Actually I'm not sure which format is needed in my DAW but I guess the "standard" 8x nn vv. I'll be testing both so it should not be a problem.

Although my problem seems to be in BMT Pro where output will be at vv 127 no matter what. Either setting the outgoing message as Note-on or Note-off I always get 127 (and by the way wtf is a Note-off vv 127 message, shut down very hard? >_<)

I don't think I understand the alternative method.. say I'd like to have an Outgoing Note-off. Should I have Note-off both in Incoming and Outgoing? But that way wouldn't the Note-on incoming messages be ignored?

Anyway I attached the project file if you want to have a look. And thank you so much! I was going mad x_x I think I worked on this tiny bit of program for a couple of working days LOL


Attachments:
1586363274244_Twitch_FLS_mapping.bmtp

Sorry I probably pushed the wrong reply button because my new comment shows up under my original post…

Well, my guess is the FL Studio will toggle the pad on and off when sending a note on so you do not need to send it FL Studio note off.  However you will need to convert the MIDI message to the original note number on your Twitch. 

Here is what I did.

1) Disabled your initial preset

2) Added a preset Twitch to FL Studio and set the default input port to Twitch and default output port to FL Studio (which is aliased to BMT 1)

3) Added a translator to convert note number and MIDI channel. Also added logic to exit withough outputing notes if the incoming note number is out of range.

4) Added preset FL Studio to Twitch and set up reverse translation. In this case I'm using raw MIDI message input that checks for proper MIDI channel, note range and whether it is a note-on or note off message.

It turns out if you and the status byte with 0xe0, and the result is 0x80 then it is a note on or note off message. This saves me from having separate note-on and note-off translators.

Again, I set the preset to overrided default project ports only looking for input from FL Studio (aliased to BMT 1) and output to Twitch.

5) I added a preset for local feedback in case the DAW doesn't handle it but I think FL Studio will so I left the preset disabled.  The logic here will toggle the state of a bitmapped global variable and send either note-on or note off depending on the current state.  I use the global variable ga and toggle bits 0-7 of the global variable to indicate the LED state.  I then look at the state to determine the velocity to send back to the twitch.  If you are not connected to FL studio, you should enable this preset in order to toggle the LED state.  This translator has the most complex rules for handling bit manipulation of the global variable ga so that you can use a single global variable to handle up to 32 bits (buttons)

 

Let me know if this works for you.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz


Attachments:
1586368429474_Twitch-FLS-Steve.bmtp

That’s OK. You are not the first person that is confused by the format of this forum. We are looking into changing this in the future.

Ok well this is awesome, but it is so beyond my comprehension that I’ll need some time to study. In the meantime I’ll just throw some basic questions about what you’ve done here ok? Not all the details of course, just the general logic.

. what’s the use of the second and third presets? (I’m really sorry but I do not have the slightest clue! xD)
. what’s “reverse tranlsation”?
. what’s “local feedback”?

It turns out if you and the status byte with 0xe0, and the result is 0x80 then it is a note on or note off message. This saves me from having separate note-on and note-off translators.
Again, I set the preset to overrided default project ports only looking for input from FL Studio (aliased to BMT 1) and output to Twitch.

Really not sure what’s your talking about here…

. what is a bittmapped variable? To me bitmaps are image files made of pixels… is this some kind of abstraction for rapresenting grids, with one pixel per grid square?
. what’s with the leds? Led state is something I’m not dealing atm because there is some sort of automation within my controller that handles it. I’ll certainly look more into leds once I’m more comfortable working with MIDI
Actually as I said I tested it and FLS needs the Note-off messages. Not for clip-launching but for actual notes when instruments are “focused” (aka selected) in the UI. Besides, I want to learn how to do it right for future use. Seems like fundamental stuff to me right?
Anyway when I press a button the note get triggered and stays on infinitely.

Wow the formatting of my reply got butchered! xD

. what\'s the use of the second and third presets? (I\'m really sorry but I do not have the slightest clue! xD)

SJC> Each preset has a defined input and output port. Everything under the preset will just receive and send to those ports instead of  the default project ports. In this way you can direct traffic by putting groups of translators under different presets. If you click on the preset on the left, you can look over to the right to see it's defined ports. I usually organize input and output at the preset level. You can override at the translator level as well, however it is easier to change a handful of presets then hundreds of translators if something in you project changes.

See this tutorial : https://youtu.be/KunN2A1rKMY

. what\'s \"reverse tranlsation\"?

SJC> In this context, reversetranslation is translating the message from the DAW back to the original message the controller sent (and expects for LED manipulation.

 what\'s \"local feedback\"?

SJC> In this context I'm talking about MT Pro ability to send back LED feedback without the need for a DAW (the remote host).

It turns out if you and the status byte with 0xe0, and the result is 0x80 then it is a note on or note off message. This saves me from having separate note-on and note-off translators.
Again, I set the preset to overrided default project ports only looking for input from FL Studio (aliased to BMT 1) and output to Twitch.

Really not sure what\'s your talking about here..

SJC> Thats OK, once you get a bit more involved with MIDI you can pick this up. Basically I'm doing a logical AND operator on the status byte (first byte) of MIDI message to determine if it is a note message.

 what is a bittmapped variable? To me bitmaps are image files made of pixels.. is this some kind of abstraction for rapresenting grids, with one pixel per grid square?

SJC> You can pick this up later too.  In summary every variable in Bome MT Pro is a signed 32 bit variable.  Instead of using all 32 bits for 1 or 0 state (on or off).  I 'm manipulating just 1 bit out of 32 to save on both programming time and global variable space. 

. what\'s with the leds? Led state is something I\'m not dealing atm because there is some sort of automation within my controller that handles it. I\'ll certainly look more into leds once I\'m more comfortable working with MIDI

SJC> Most MIDI controllers us LED to set their on/off state with note-on turning on the LED and note-off turning it off. Some use different note velocities to deterime the on color (if it is a multicolored LED).

Actually as I said I tested it and FLS needs the Note-off messages. Not for clip-launching but for actual notes when instruments are \"focused\" (aka selected) in the UI. Besides, I want to learn how to do it right for future use. Seems like fundamental stuff to me right?
Anyway when I press a button the note get triggered and stays on infinitely.

SJC> A note-on message will start the note playing. The note will play until you send it a note-off message. It sounds to me that your control buttons never send a note-off message. I think you did this, but in your case you set both translator input for note-on message which is why it doesn't look like a note off was ever sent to your DAW.  If I remember the description said note off but the incoming trigger you left as note-on.

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Thanks for all the explanation. I’ll look into all of that. But for now I’l leave the LEDs alone and just concentrate on the buttons.

It sounds to me that your control buttons never send a note-off message. I think you did this, but in your case you set both translator input for note-on message which is why it doesn’t look like a note off was ever sent to your DAW. If I remember the description said note off but the incoming trigger you left as note-on.

That’s right, you can see from my original post. My controller send two note-on messages vv 127 for push, vv 0 for release. I setup the two translators to catch both Note-on. The problem is that both are processed from the first Translator resulting in two Note-on messages sent to the DAW.
Next thing I’m going to try is filter incoming messages by velocity. I think I already tried without luck but I’ll retry.

Hi, 

Simply change your second translator input to note off and output also to note off and you should be good to go.

 

That worked!!!
The thing that tricked me is that since note-offs “were note-on too”, I thought that I had to use note-on in the translator. I didn’t know that BMT did recognize note-offs in that format.
I added the note-off translator to your preset so I retain your extra security filter. Awesome.
Thanks again! Stay safe :slight_smile:

Sorry for the long winded dissertation for such a simple solution!

Are you kidding?? That was great support. I appreciate alot you going the extra mile and add stuff that I’d not have the opportunity to discover otherwise.