Remote Control Template for TouchOsc/RTPMidi

Hi Zyiticens, ive been playing around with remote control protocols for various music devices recently, and thought Id share a template and some instructions on getting remote control over the network running for Zynthian using the new and most excellent version of TouchOSC.

I have a bunch of questions and issues with OSC etc but Ill add these to another thread. Id be very happy to write this up in a wiki page with better formatting of the screenshots etc.

The control template has a bunch of buttons for remote controlling the Zynthian interface, accessing pages, advancing through presets and snapshots, has a keyboard, emulates knob presses, and also provides a basic control page for the premapped ZynaddsubFx synth. Some things dont work properly yet, mostly due to my lack of understanding and will be cleaned up as I learn more.

Its mostly for testing, but shows how a template might also be used to augment performance using Zynthian. Its not meant to replace the GUI, which is very elegant and a testament to the gifted developers that have contributed to the Zynthian project.

Its not very pretty, and ive probably broken every design rule going. Its probably also very easy to break some of the controls ie the preset +/- will keep going up one preset even if it has run out of presets in that bank, and wont go back down the list until it gets back to that number. Many of the buttons just emulate various knob presses and so will only work in the same context as those knob presses. As I learn more about the scripting I will try to have them work globally.

The attached template uses the new version of TouchOsc which currently is a paid app on mobile or has a free to use desktop app on Mac/PC/Linux.
The desktop app does ask you to consider buying a licence to help development.
https://hexler.net/touchosc

The “TouchOSC Templates Makers” facebook group is also very friendly and helpful, and contributers there as well as the developer himself have given me help with this.


Zynthian Remote Control
Several options exist as outlined in the wiki page, Qmidi, RTPmidi, OSC and TouchOSC bridge.

Touchosc Zynthian Template v1.tosc (14.3 KB)

It will remote control Zynthian over TouchOsc bridge and RTPMidi. RTPmidi requires a further piece of software to initiate the midi session. For windows this daemon works fine (rtpMIDI | Tobias Erichsen), MacOSX can use built in network Midi. (Using Wireless MIDI to Connect Your iPad or iPhone to Your Computer and Hardware Synths)

It works on both wired and wireless network connections, possibly depending on your local configuration. It will also work with a direct midi hardware connection without the RTPMidi or TouchOsc bridge settings as usual midi hardware.

To setup TouchOsc on desktop to talk to Zynthian (use TouchOsc Bridge setup for Ipads, phones etc)

RTPMidi
Setup RTPmidi as per the links above. In TouchOsc, clink the Chain (connections) button on the toolbar, then go to the Midi tab. If RTPmidi is setup correctly, Press Browse you should see the name of your local midi host ie your desktop. Set that as both the send and recieve port.

On the Zynthian itself, RTP-Midi needs to be enabled on the Admin screen or in the Webconf.

Start the TouchOsc app on desktop, load the above attached template. Press the play button to make the template active. Start Zynthian, make a layer with ZynaddsubFX.

If the RTPMidi, Zynthian and network settings are happy it should all just work. The volume fader should control volume and the keyboard should be playing sound from the Zynthian if theres an instrument loaded. On the second tab, you should be able to control Cutoff etc on ZynaddsubFX.

Using RTPMidi there is two way control, ie the volume control on Zynthian should make the Volume fader in TouchOsc go up and down, and vise versa.

TouchOsc Bridge

For mobile devices on wifi (or on desktop app) then these settings will get the template working over the TouchOsc Bridge protocol. The TouchOsc webpage has instructions on how to load a template into the mobile app from the desktop.

First make sure that TouchOsc Midi Bridge is enabled on the Zynthian Admin screen, either via the GUI or the webconf. Make sure the Zynthian is connected to your network via Wifi or ethernet. I havent tried this with a Wifi hotspot connection but I assume that should work too. Ill update when i test this.

In TouchOsc app, go to the Chain (connections) icon on the toolbar.
-Go to the Bridge tab
-Tick Connection 1
-In the host field, press the Browse button.
-“Zynthian” should appear if network settings are right, and it should add the IP address to the Host field.

  • Go to the MIDI tab in the same panel. Chain icon (connections)
  • Tick Connection 1
  • Click Browse next to Send Port.
  • Bridge1 should appear, select it.
    -Do the same for Receive Port.

Click Done.
Click Play.

The template should now be live and controlling Zynthian. Start Zynthian, make a layer with ZynaddsubFX.

If the TouchOSC Midi Bridge settings and network settings are happy it should all just work. As above the volume fader should control volume and the keyboard should be playing sound from the Zynthian if theres an instrument loaded. On the second tab, you should be able to control Cutoff etc on ZynaddsubFX.

Play some music and remember to record and upload :face_with_monocle: some sound to show the devs youre having fun with this excellent little box.

10 Likes

Thanks a lot, @feedbackl00p !! You made an excelent work. I will give it a try ASAP.

BTW, it would be nice to make available this template (or any other) from the wiki including some guide/help for configuring everything. If you like, i would create an account for you.

Regarding the template files, i think they should be in a github repo. Perhaps in zynthian-data, or in a dedicated repository.

Regards,

Hi @feedbackl00p !!

I just tested and it works like a charm!! Congratulations! I tried an alternative network configuration with “qmidinet”, and it worked without a glitch!

You implemented almost everything that can be done with the current CUIA API, that is quite limited. I will add some missing operations that are almost trivial to implement, so you can complete the template.

FYI, we are in the first stages of designing a proper API for zynthian, although it will take some time to be ready.

Regards,

4 Likes

Hi joefemodo, id be very happy to write this up in a wiki page. Let me know how to proceed. Also happy for the template to be included in github. Is that something I can upload or do I need access?

1 Like

Hi @feedbackl00p !

FYI:

Perhaps you can use this to improve your Control Template :wink:

BTW, I just created a wiki account for you. I will send you the credentials by PM.

Cheers!

I return to this topic to ask for help in solving a problem that occurred after updating the operating system. Previously with OS version 2109 the TouchOSC Template worked regularly from the PC. With the update to version 2308 the Template, although sending midi messages to the device, does not start any corresponding function but only note on. Did I miss something? Thanks for your help

There are lot of changes in CUIA API, so probably you have to update the OSC messages your patch sends. The wiki section is updated, so take a look.

https://wiki.zynthian.org/index.php/Accessing_Zynthian_from_your_computer

You can test the CUIA OSC API from command line.

Regards

I give up! Since yesterday I’ve been trying to find a way to adapt the template to the new operating system… but frankly I really lack the skills to do it. At the time I had no difficulty following feedback100’s instructions… but now I lack the basics to deal with this adjustment. And I’m very sorry because with this template I had found a convenient way to interface with the Zynthian. Without it I feel lost. I trust in the help of this Community. Thanks anyway

Hi @stefano.bellotta !

Zynthian’s CUIA OSC API is really easy to use and the current documentation is updated, so it shouldn’t be too difficult to replace the OSC commands by the new ones in the template. Perhaps somebody want to do it.

@feedbackl00p , are you available for this simple task? The current CUIA API has improved quite a bit, so probably you may want to improve the patch.

Regards,

1 Like

OK! I just opened the touchOSC patch and i see it’s not using OSC at all. It sends note messages all the time!! So you simply have to fix the notes in the patch to match the notes used in the last version, or change the assigned notes from the webconf.

Regards,

1 Like

In the meantime, thank you for the further help you are giving me. I want to try to do it myself. I opened the TouchOSC editor to edit the template…the questions are: 1) should I correct the Midi or OSC messages? 2) in which fields of the editor should I intervene to correct the type of message? 3) does the modification consist of modifying the value 0-127 or inserting the note corresponding to the message sent according to the Keyboard binding map (Master Note UI Action) of the Webconf? Unfortunately, these are concepts that escape me or that I am confused about (whatever) and having clearer ideas would help me solve the problem…also for the benefit of others. Thank you

1 Like


This is the TouchOSC editor screen relating to the template. On which of these fields should I intervene and with which parameters… those of the Master key UI action?

1 Like

Hi there,
I downloaded the template and tried some modification.
Naming the pages CUIA and the controls according to the CUIA names described here seems to work.
CUIA/SCREEN_ADMIN is ok, but for instance not SCREEN_AUDIO_MIXER.
When i press the button on my zynthian, i get this message on the log :
Oct 26 17:55:55 zynthian startx[1867]: DEBUG:zynthian_gui.callable_ui_action: CUIA ‘SCREEN_AUDIO_MIXER’ => None
But when I send via TouchOSC I see this message:
Oct 26 17:57:49 zynthian startx[1867]: INFO:zynthian_gui.osc_cb_all: OSC MESSAGE ‘/CUIA/ SCREEN_AUDIO_MIXER’ from ‘osc.udp://192.168.0.37:65535/’
Oct 26 17:57:49 zynthian startx[1867]: DEBUG:zynthian_gui.callable_ui_action: CUIA ’ SCREEN_AUDIO_MIXER’ =>
Oct 26 17:57:49 zynthian startx[1867]: ERROR:zynthian_gui.callable_ui_action: Unknown CUIA ’ SCREEN_AUDIO_MIXER’
I don’t see what’s not working… any idea anyone ? :slight_smile:

Wow I saw the issue : a space before SCREEN_AUDIO_MIXER ! My bad…
I’ll try to map the corresponding messages to the other control and post the tosc file here is there is some interest

Cheers

1 Like