help with playback OSC commands - please

• Jan 26, 2017 - 16:55

Hi everybody!
Following some other threads I understood the right way to remote playback control was via OSC and not via MIDI.

So I installed touchOSC on my phone and TouchOSC Bridge on my laptop.
I am sure that "something" is going from the OSC app to Musescore (e.g.: if I use the keyb layout I'm able to send notes to musescore) but I really don't know how to send, e.g., a "play" command.

In other threads I found some suggestion and link to code files as
https://github.com/musescore/MuseScore/blob/master/mscore/osc.cpp#L69
and
https://github.com/musescore/MuseScore/blob/master/mscore/shortcut.cpp

I've tried to create a layout with a pushbutton associated with "/actions/play", e.g., but it doesn't work.

Someone could help me, please?


Comments

In reply to by [DELETED] 5

Hi lasconic, so glad for this reply!
Yes, it still doesn't work.

The layout I created send, which pushbuttons, these messages:
/actions/move-left
/actions/prev-element
/actions/move-right
/actions/next-element
/actions/next-chord
/actions/prev-chord
/actions/play
/actions/file-save-a-copy
/actions/loop

Nothing happens for all of them.

I'm pretty sure the port is right because if I use OSCulator to listen the port Musescore is listening too, then OSCulator tells me the port is already in use (and I'm ok sending the same messages I wrote before to OSCulator)...
Really I don't know what's the problem...

In reply to by M4rco

Here is a working python program. Hope it helps.


import sys
from simpleOSC import *

# opening an OSC socket to a computer running MuseScore with OSC
def main(*args):
#print args[1]
initOSCClient('localhost', 5282)
sendOSCMsg( '/actions/prev-chord')
closeOSC()

if __name__ == '__main__':
sys.exit(main(*sys.argv))

In reply to by [DELETED] 5

Thank you very much!
Thanks to your code I had an interesting testing night.
Everything worked!

The point is that with touchOSC interface I can only send a command together with a double parameter (I was able to send from my phone to Musescore messages like /mute1 or /vol1, /vol2 that have that method signature).

But, right know, I think is impossible via touchOSC to send messages without parameters (so all the commands in the shortcut file doesn't work, from mobile) and the messages with an integer as a parameter (like /volume /tempo /select.measure).

I was able to make all the commands work from the python code, using the appropriate method signature.

Thank you very much

Do you still have an unanswered question? Please log in first to post your question.