OPEN STAGE CONTROL and BOME MIDI TRANSLATOR PRO

Hello everyone.

I'm here to ask for your help due to functionality of Open Stage Control with Bome MIDI Translator in terms of translating MIDI to KEYSTROKES.

  1. I have one PC and connected touchscreen monitor to it, from which I want to control my OSC Template

  2. OSC is fully set up, all ports are working in it

  3. all buttons with MIDI informations work through Bome

  4. even Incoming MIDI and Outgoing keystrokes connection is working well according to Event Monitor and Log Window.

*The problem is: the final outgoing keystroke is not working in softwares like Cubase, Notepad or any other software. All connections are good but the outgoing task is never executed.

Does anyone know how to solve this or what is the problem.

Thanks!
Filip H.

I had similar kind of problem with notation program Finale and o-s-c, but not with Bome, but with AHK.

The same functionality as in Bome and more can be achieved by using Autohotkey (AHK). Here is a link to an extension that enables AHK to receive OSC messages:

The problem was that AHK was sending keys too fast for Finale. in AHK you can slow down the keysequence programmatically. Here is my AHK code, modified from the example, that sends the keys in slowed sequence (you need to install AHK and download the DLL from the link):

#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
Gui +LastFound
hWnd := WinExist()

; OSC datatypes. Just for better readability,
; you also just could use the numbers
global oscTypeNone := 1
global oscTypeInt := 2
global oscTypeFloat := 4
global oscTypeString := 8
global oscTypeAll := 0xffffffff

OnExit("exithandler")

DllCall("LoadLibrary", "Str", "x64\Debug\OSC2AHK.dll", "Ptr")

OnMessage(0x1002, "msghandlerFloat")

success := DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 9003)
if (success != 0)
    msgbox, Failed to open port!

DllCall("OSC2AHK.dll\addListener", AStr, "/finalekeys", UInt, 0x1004, UInt, oscTypeString)
OnMessage(0x1004, "msghandlerString")

return

msghandlerString(wParam, lParam, msg, hwnd) {

    if (wParam = oscTypeInt)
    {
        msgbox ("No String!")
        return
    }

    VarSetCapacity(theStr, 20)
    theStr := DllCall("OSC2AHK.dll\getStringData", str, theStr, UInt, 20, UInt, lParam, AStr)

    SetKeyDelay, 50, 50
    ControlSend, AfxFrameOrView100u1, %theStr%, Finale

}

exithandler() {
    ExitApp
    return
}

do_exit:
    ExitApp
    return

Esc::
ExitApp

The part where the keys are sent is this:

    SetKeyDelay, 50, 50
    ControlSend, AfxFrameOrView100u1, %theStr%, Finale

Here you can set the delay for the key sequence. Also, edit the ControlSend part for your needs. "AfxFrameOrView100u1" is the ClassId of Finale program, where I send the keys. Find the one you need in Cubase with the tool WinSpy included in AHK installation. Remember also change the window title in the code from Finale to Cubase, and osc address from "/finalekeys" to something for your needs.

With this code AHK listens the port 9003 (you can find the port part in the code easily), and sends the keys from o-s-c that are strings after OSC address. for examle, if you want to send combination control-shift-c, set o-s-c to send to localhost 127.0.0.1:9003 osc message "/finalekeys ^+c". AHK interprets ^ as control and + as shift. Find the full list of controls in AHK documentation.

Cheers,
Uljas

1 Like

Hi! It's not called a template, but a "session" (just so you know).

I know you probably want to keep using Bome, but have you tried this app? I think it's made by a member of this forum (@rafaews). Reason why. I really hope I'm not mistaken.

1 Like