Old 09-28-2020, 02:37 AM   #1
Kitarraman
Human being with feelings
 
Kitarraman's Avatar
 
Join Date: Jun 2018
Location: Italy
Posts: 77
Unhappy TouchOSC and ReaperOSC: what the duck?

Hi folks, I spent the whole day yesterday trying to set a Custom Layout on TouchOSC in order to control the Control Changes on my Virtual Instruments.
After I finished working on my Layout, I uploaded it on my device via TouchOSC Editor and it wasn't working, it was sending MIDI signals to Reaper but with no effect on the virtual instrument. So I dig deeper into the Hexler documentation and, for what concerns TouchOSC integration with Reaper, they send you to the ReaperOSC page for documentation. Well, after reading the documentation in Default.ReaperOSC I have no idea on how should I code my custom layout.
Anyone of you guys here managed to get their custom layouts working? Can you help a fella out? I tried reading the code on LogicTouch.ReaperOSC but couldn't make much of it, there's almost no tutorial on YT on how to use a custom layout on Reaper and, at this point, I'm wondering if I should've gone with Jon Tidey's ReaperWRB instead.
I expected TouchOSC to work with Reaper right out of the box but I was apparently wrong 😕
I'll leave attached my custom layout, just in case
Attached Files
File Type: rar Virtual Instruments Control.rar (992 Bytes, 6 views)
__________________
Kitarraman
Composer and Sound Designer for Videogames
https://www.kitarraman.com
Kitarraman is online now   Reply With Quote
Old 09-28-2020, 08:29 PM   #2
BenjyO
Human being with feelings
 
Join Date: Nov 2011
Posts: 19
Default

Hey Kitarraman,

I took a glance at your layout and juding from its contents and your post I think you missed one important concept of how TouchOSC works and OSC in general.

If you configure its controls the way you did, by enabling MIDI messages to be sent, these messages won't be sent via the OSC protocol but as pure MIDI information. In order for TouchOSC to send pure MIDI to REAPER, some sort of "bridge" is needed in between them. OSC messages (not MIDI) can be sent directly to REAPER via Wi-Fi and through the selected ports. Pure MIDI messages get to your computer but they get stuck before getting to REAPER.

The "brige" I mentioned above exists though and Hexler made their own TouchOSC bridge which is in fact a companion for the mobile app for those who want to send pure MIDI (just like you). Here's the link to it: https://hexler.net/products/touchosc#downloads.
Steps:
1. Download it to your computer, install and run it.
2. You'll see its icon in your tray bar (if you're on Windows like me - don't know where it pops out on a Mac) and you can close it from there after you're done with it. For now you need it running though because it will serve as a mediator between TouchOSC and REAPER.
3. Go to REAPER.
4. There you need to configure your track to receive these messages.
4.1. Before that though, I believe that for the first time you need to enable TouchOSC Bridge in your MIDI devices (REAPER Preferences>Audio>MIDI Devices) if it's not already enabled by default when it's running - I'm not sure because I've done it quite some time ago - be sure to check it for yourself. If you don't see it there in the list of your MIDI devices, be sure to check it's running (tray bar) and then click the "Reset all MIDI devices" button which will rescan those which are available. As you might've guessed from everything written so far TouchOSC Bridge acts in REAPER as a MIDI device - like any other MIDI controller.
5. When you are sure that it's available and enabled, go to the track which should receive MIDI messages sent from TouchOSC and arm it.
6. Right-click on the track's input control and set its input to "Input: MIDI">"TouchOSC Bridge">"All channels" or "channel 1" in your case (judging from the channels you chose in your TouchOSC layout). You might've noticed that this is the same procedure as setting up a MIDI keyboard.
7. If you want REAPER to also send MIDI messages back to the TouchOSC app you also need to configure a MIDI Hardware Output send.
7.1. Open this track's routing and add a MIDI Hardware Output to TouchOSC Bridge. Now this track can also send MIDI messages back to the TouchOSC app.

As a final note: You can also send pure OSC messages which get converted in REAPER to MIDI messages and then I beleive they get sent via REAPER'S built in "Virtual MIDI keyboard" to your track (I haven't yet tried sending MIDI that way). This method does not require the TouchOSC Bridge application. You would need to configure your TouchOSC layout differently though and this is more complex than the above-described option I believe. In TouchOSC Editor you would need to go to the OSC tab and there untick the "auto" checbox. In the input field below it you would then enter a message which is defined in the .ReaperOSC file you plan to use as the "translator". The Default.ReaperOSC file for example defines several ways to send a CC message. One of them is this one "i/vkb_midi/@/cc/@". You would ignore the "i" before the first foward slash and copy paste the rest into the input field on TouchOSC Editor. Then you would have to replace the first "@" with the MIDI channel you want this MIDI data to travel through and the second "@" with the CC number.

I hope this helps somehow Cheers!
BenjyO is offline   Reply With Quote
Old Yesterday, 02:11 AM   #3
Kitarraman
Human being with feelings
 
Kitarraman's Avatar
 
Join Date: Jun 2018
Location: Italy
Posts: 77
Default

Quote:
Originally Posted by BenjyO View Post
1. Download it to your computer, install and run it.
2. You'll see its icon in your tray bar (if you're on Windows like me - don't know where it pops out on a Mac) and you can close it from there after you're done with it. For now you need it running though because it will serve as a mediator between TouchOSC and REAPER.
3. Go to REAPER.
4. There you need to configure your track to receive these messages.
4.1. Before that though, I believe that for the first time you need to enable TouchOSC Bridge in your MIDI devices (REAPER Preferences>Audio>MIDI Devices) if it's not already enabled by default when it's running - I'm not sure because I've done it quite some time ago - be sure to check it for yourself. If you don't see it there in the list of your MIDI devices, be sure to check it's running (tray bar) and then click the "Reset all MIDI devices" button which will rescan those which are available. As you might've guessed from everything written so far TouchOSC Bridge acts in REAPER as a MIDI device - like any other MIDI controller.
5. When you are sure that it's available and enabled, go to the track which should receive MIDI messages sent from TouchOSC and arm it.
6. Right-click on the track's input control and set its input to "Input: MIDI">"TouchOSC Bridge">"All channels" or "channel 1" in your case (judging from the channels you chose in your TouchOSC layout). You might've noticed that this is the same procedure as setting up a MIDI keyboard.
7. If you want REAPER to also send MIDI messages back to the TouchOSC app you also need to configure a MIDI Hardware Output send.
7.1. Open this track's routing and add a MIDI Hardware Output to TouchOSC Bridge. Now this track can also send MIDI messages back to the TouchOSC app.
Hi Benjy, thank you for your thorough explanation. I already did all the things you told in your reply, so I went to check each step again. Everything was already set the way you told, but weirdly enough now it started working. Enabling a MIDI Output send, as you recommended made the faders move in the app. I noticed that I need to route a MIDI output one track at the time otherwise TouchOSC will start to behave weirdly.
__________________
Kitarraman
Composer and Sound Designer for Videogames
https://www.kitarraman.com
Kitarraman is online now   Reply With Quote
Old Yesterday, 02:17 AM   #4
Kitarraman
Human being with feelings
 
Kitarraman's Avatar
 
Join Date: Jun 2018
Location: Italy
Posts: 77
Default

Quote:
Originally Posted by BenjyO View Post
As a final note: You can also send pure OSC messages which get converted in REAPER to MIDI messages and then I beleive they get sent via REAPER'S built in "Virtual MIDI keyboard" to your track (I haven't yet tried sending MIDI that way). This method does not require the TouchOSC Bridge application. You would need to configure your TouchOSC layout differently though and this is more complex than the above-described option I believe. In TouchOSC Editor you would need to go to the OSC tab and there untick the "auto" checbox. In the input field below it you would then enter a message which is defined in the .ReaperOSC file you plan to use as the "translator". The Default.ReaperOSC file for example defines several ways to send a CC message. One of them is this one "i/vkb_midi/@/cc/@". You would ignore the "i" before the first foward slash and copy paste the rest into the input field on TouchOSC Editor. Then you would have to replace the first "@" with the MIDI channel you want this MIDI data to travel through and the second "@" with the CC number.

I hope this helps somehow Cheers!
I'll try to do as you suggest too, I have one question for you though: if I want to send a message to all MIDI channels, what do I have to replace the first @ with?
Can you help understand how I can set a custom layout so I can use it as a controller for the mixer?
Thank you for your time
__________________
Kitarraman
Composer and Sound Designer for Videogames
https://www.kitarraman.com
Kitarraman is online now   Reply With Quote
Old Yesterday, 09:05 AM   #5
BenjyO
Human being with feelings
 
Join Date: Nov 2011
Posts: 19
Default

Quote:
Originally Posted by Kitarraman View Post
I'll try to do as you suggest too, I have one question for you though: if I want to send a message to all MIDI channels, what do I have to replace the first @ with?
Can you help understand how I can set a custom layout so I can use it as a controller for the mixer?
Thank you for your time
Hey,

I took the liberty and modified the second page of your layout. I set it up to send MIDI data as OSC messages (only the Chris Hein page is modified). It's in the attached zip file.

To answer your question: I believe it's not possible to send MIDI to all channels directly from TouchOSC (pure MIDI or OSC). A workaround is to set up a routing path in Reaper by using auxiliary tracks and then maybe saving them as a template for future use. I made an example (showcases only the first 3 channels) and it's also in the attachment.

You basically have 1 track which receives pure MIDI from the Virtual MIDI keyboard (which is receiving OSC messages from TouchOSC and converting them them to MIDI).
Then you route this MIDI to 16 other tracks to each MIDI channel respectively.
Then you route all of these tracks to your receiving track (the one with the virtual instrument or the one which acts as a bus and sends to the virtual instrument tracks).

Hope this helps

EDIT: Forgot to correct my first post where I mistakenly wrote to replace the first @ with the channel number. When using OSC messages MIDI channels are 0-indexed as described in Default.ReaperOSC. This means for example that in order to send CC11 to channel 1 I had to assign this "/vkb_midi/0/cc/11" to the control.
Attached Files
File Type: zip Virtual Instruments Control.zip (1.0 KB, 2 views)
File Type: rpp Virtual Instruments Control.rpp (4.9 KB, 2 views)
BenjyO is offline   Reply With Quote
Old Today, 02:48 AM   #6
Kitarraman
Human being with feelings
 
Kitarraman's Avatar
 
Join Date: Jun 2018
Location: Italy
Posts: 77
Default

Quote:
Originally Posted by BenjyO View Post
A workaround is to set up a routing path in Reaper by using auxiliary tracks and then maybe saving them as a template for future use. I made an example (showcases only the first 3 channels) and it's also in the attachment.

You basically have 1 track which receives pure MIDI from the Virtual MIDI keyboard (which is receiving OSC messages from TouchOSC and converting them them to MIDI).
Then you route this MIDI to 16 other tracks to each MIDI channel respectively.
Then you route all of these tracks to your receiving track (the one with the virtual instrument or the one which acts as a bus and sends to the virtual instrument tracks)
A bit more complicated than I originally expected, but I'll try to reverse engineer what you did. Thank you Benjy
__________________
Kitarraman
Composer and Sound Designer for Videogames
https://www.kitarraman.com
Kitarraman is online now   Reply With Quote
Old Today, 06:43 AM   #7
BenjyO
Human being with feelings
 
Join Date: Nov 2011
Posts: 19
Default

Quote:
Originally Posted by Kitarraman View Post
A bit more complicated than I originally expected, but I'll try to reverse engineer what you did. Thank you Benjy
You're welcome
BenjyO is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.