AppleScript that sends data to MIDI Translator via even in and MT outputs MIDI CC messages

Hello! I am totally lost. I spend 3 days trying to solve this.

I am using my DAW (FL studio) with BetterTouchTool. My MacBook have a touch bar that I use for shortcuts. Some VST’s have MIDI CC switches that I want to use without MIDI keyboard.

The result should be like this:
BetterTouchTool touch bar Slider runs AppleScript that outputs some data. That data should be supported by MIDI Translator as an event in. Then the data is triggering MIDI CC message with value of the touch bar slider in range of (0-127).

Ideally if AppleScript would send data to MT without interrupting DAW and not causing some undesired Keystrokes.

How is that possible? Whole internet full of converting MIDI into Keystrokes but not Keystrokes into MIDI CC.

Help me please, any reply would be appreciated.

Thanks!

Hi and welcome to the Bome community!

Yes Bome MIDI Translator Pro can process incoming MIDI keystrokes and output MIDI messages from them. There are a few things you will need to consider.

  1. Bome MIDI Translator Pro will NOT suppress the initial keystroke so any other applications that may be looking for this keystroke, will likely also process it.
  2. By default Bome MIDI Translator settings is to ignore incoming keystrokes when focused. This is because usually you are using keystrokes to program Bome MIDI Translator Pro. You can turn this option off in settings but be warned that you might need to turn this on again if you need to use the same keystrokes to update your project file (for re-programming)

You can also use AppleScript to pass global variables in Bome MIDI Translator Pro although I’ve never done this. For the most part, I’m a PC user but if you want to give this a try, let me know and I will dust of my MacBook Pro and see if I can put together an example for you.

Page 79 of the Bome MIDI Translator Pro User Manual may provide some assistance here.

Steve Caldwell
Bome Customer Care


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

Thank you very much for your help! There is too much information and you helped me to find exactly what I needed!

I have the only problem for now. When I’m moving slider sometimes value jumps out of expected range (for example I move slider from 90 up to 127 and in that range there are a value of 50 that is not expected). I understand that it could be timing and counting cause. but when I tried to add delay in my script, it became really long running value spit, so maybe you could help me to set it correctly to avoid jittering.

Here is the script I use in BetterTouchTool:

“”’
on bttWidgetSliderMoved(sliderValue)

set scaledValue to round (sliderValue * 127)

tell application ‘Bome MIDI Translator Pro’

set variable ‘g0’ to scaledValue

end tell

tell application ‘System Events’

key code 105

end tell

end bttWidgetSliderMoved
“”’

In MIDI Translator:
Event input is F13 physical key (keystroke)
0 rules
Output is set to MIDI Message - Control Change - CC#60 - value g0

My guess is that the value of g0 might still be changing when you output your CC. Maybe you should copy g0 to a local variable like qq and then output the value qq.

Also maybe you should have a watchdog timer in your script to trigger only when the input value has stopped moving so that the keystroke only fires when you stop moving the slider.

Steve Caldwell
Bome Customer Care


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