Feature request: string variables in BMT, and ability to send these as keystrokes or MIDI messages

I’ve got a Mackie MCU Pro Controller I’d like to use with Studio One. I would like to be able to overlay multiple functions on each button depending on what modifier buttons are depressed (eg Shift, Option, Control, Alt) when the button is pressed.

I can use a BMT translator to set a global variable g1 through g4 for each of these modifiers, and set to 1 if the button is pressed, and 0 if not.

What I would then like the ability to do is within the Rules section, check these flags when a button is pressed, and then set a local variable to the appropriate keycode I’d like to send to Studio One, and then in the Outgoing action, have this keycode sent to Studio one. For maximum flexibility, it would be nice to have these variables be able to be send as keycodes, text, or MIDI messages.

I think this feature would be a powerful addition to the Bome program.

An additional useful feature would be able to concatenate keystrokes or MIDI messages in string variables, and have these sent as keystrokes, text or midi message. It would also be useful to be able to do mathematical conversion from a numeric variable to an ascii character. This would make it much easier to program. I would only then need a single translator to convert a MIDI sequence to a keyboard character, without having to create a separate translator for each keystroke that you require. Given I have 48 buttons I’d like to program with up to 5 modifiers each — that would make for 240 translators which I expect would cause some performance problems.

 

Thanks for considering this..

 

R.

Currently I have to

 

I’ve got a Mackie MCU Pro Controller I’d like to use with Studio One. I would like to be able to overlay multiple functions on each button depending on what modifier buttons are depressed (eg Shift, Option, Control, Alt) when the button is pressed.

I can use a BMT translator to set a global variable g1 through g4 for each of these modifiers, and set to 1 if the button is pressed, and 0 if not.

What I would then like the ability to do is within the Rules section, check these flags when a button is pressed, and then set a local variable to the appropriate keycode I’d like to send to Studio One, and then in the Outgoing action, have this keycode sent to Studio one. For maximum flexibility, it would be nice to have these variables be able to be send as keycodes, text, or MIDI messages.

SJC> This can be easily done, if you have a specific example, I can show you how. For MIDI messages you can send raw MIDI in a single translator. For text or keycodes, each keystroke or text message will require a separate translator but you cannot use variables as MT Pro only uses integer variables and not strings or text variables. This is something that has been requested and is planned for a future release.

I think this feature would be a powerful addition to the Bome program.

SJC> I agree

An additional useful feature would be able to concatenate keystrokes or MIDI messages in string variables, and have these sent as keystrokes, text or midi message. It would also be useful to be able to do mathematical conversion from a numeric variable to an ascii character. This would make it much easier to program. I would only then need a single translator to convert a MIDI sequence to a keyboard character, without having to create a separate translator for each keystroke that you require. Given I have 48 buttons I’d like to program with up to 5 modifiers each — that would make for 240 translators which I expect would cause some performance problems.

SJC> Although as I said, conversion from numeric to ASCII character is not yet supported, there are ways we can handle some of this today. Keystrokes on PC or Mac are not ASCII, yet combinations of scan codes. However, if you application support serial data, we can send as ASCII strings with embedded variables to represent supported ASCII characters. I have written a set of translators to convert a single global variable value into a series of keystrokes to represent the variable. For instance, the value of 100 I can use rules and timers to send out "1" "0" "0" as keystrokes.

Also, we can reduce the number of variables required by "bit mapping" them. For instance a single global variable is a 32 bit signed integer so as such we can track the up/down position of up to 32 buttons with a single global variable.

If you have a specific example of what you want, I can put something together and post it here.

I've done many projects that convert Mackie MCU or Mackie HUI to generic MIDI messages and a few that have converted to keystrokes, so I'd be surprised to find many restrictions in what can be done, albeit a little more difficult not having string variables. With that said, Studio One does in general recognize generic MIDI so it is more reliable if we can translate to MIDI messages that Studio One supports rather than keystrokes, whenever possible.

 

Steve Caldwell
Bome Customer Care


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

 

 

 

The attached example shows how you can convert an incoming CC value to  a series of outgoing digits.

 

 


Attachments:
1597940370807_KnobToKeystrokeNumber-2020-08-20.bmtp

And here is a post with a template for MIDI to keystroke.

https://www.bome.com/support/kb/midi-to-keystroke-template

Hi Steve:

Thanks for the examples.

What I had done was similar to your midi- to keystroke template. There are four “shift” keys on the Mackie MCU Pro, and this, on top of the “normal” keys means five functions per key. So I used four global variables to track the status of the “shift keys” (shift, option, control and alt). I programmed a “do-nothing” state for the “normal” keys which were supported directly by MIDI in Presonus Studio One (since I couldn’t disable these), but then “swallowed” the midi for the other key variations so the the behaviour was predictable.

It works really well. Performance hasn’t been an issue yet - but I haven’t really pushed Studio One yet since I programmed this.. But I’m happy there is a program like Bome that helps me do this, because now I can map 250+ presets to my MCU Pro — which I’m quite stoked about — as Studio One didn’t have a lot of MCU Pro support.

I was also able to filter out the Mackie C4 Commander middleware MIDI to take out CC# 32-63 (decimal) which are the feedback to my Mackie C4 to set its LED rings, and it passes only CC messages with the knob values to Studio One. So know i have full Mackie C4 functionality with Studio One. (I wonder if that other gentlemen got his C4 working with Cubase)...

Anyways, back to my original post: I would really like it if Bome had some more power programming capabilities, and editing capabilities. While my resulting .bmtp file works well, it was very tedious to create, and with lots of potential for errors. I must have spend over 8 hours putting this together. As you can see — with 250+ rules, there is a lot of room for things to go wrong.

My preference would be if there was some string variables and operators including concatenation, or maybe a translation table function that could help reduce the amount of coding I had to do to get this working. I would have preferred to be able to complete my project with under 50 lines of translators than the almost 300 which I had to use.

Another idea which might have saved time for me — is if your editor could do a “bulk edit”. I found a lot of my time was setting individual fields like CC to filter, whether to swallow the MIDI, whether to stop processing, whether to do an outgoing action, which port to receive MIDI or send MIDI to. I had started with a template which I cut and pasted, but as I experimented, I learned I had to go back and change some things... But this was a lot of work considering I had over 250 translators. It would be nice to be able to highlight a number of dis-contiguous rules, and then manipulate the settings and rules in each all at the same time with a single mouse click.

Thanks for your very timely reply. I was impressed..

Richard.

 


Attachments:
1598055960229_Presonus-Studio-One-Project-v45-.bmtp

Could you please describe briefly how you use a CC control knob with this project? It seems strange that you are using timers to set a string of outgoing digits… I’m not sure how this works…

Very nice.

I think I would have reduced translators by using timers for the modifiers.

For instance

A would be A Down then A Up after a short delay

Shift A would be

  • Shift Down
  • Timer (say 10ms) then A Down
  • Timer (say another 10ms) then A Up
  • Timer (say another 10ms) then Shift Up

I think I've posted some examples before of this strategy. Timers are a bit complicated to program but it could reduce the number of translators if done correctly. With that said, either way there will be a lot of key strokes so not sure how much it will really save in your case.

 

Steve Caldwell
Bome Customer Care


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

 

 

 

 

Hi,
I set the variable based on the incoming CC value
I then use rules to strip out each digit, first 100s then 10s then 1s. I then send the digits one at a time using timers. Digits are always somewhere between 0 and 9 so The timers look at the current value 0-9 if they match output the digit otherwise do not do anything.

Steve