EdGelmetti Contributor - Level 2 2016-10-31

2016-10-31

XR18 with TouchOSC, other OSC Clients

Has anyone has success in using TouchOSC and perhaps Lemur with the XR18?

I'm shifting the mixing duties from my Macbook/Firewire setup with Reaper to the XR18 for mixing, the Macbook for backing tracks and synths.

In order to control my whole system, I used Lemur (bandmates setup with TouchOSC) to control Reaper via OSC which was very easy to set setup with both Lemur and TouchOSC.

With the XR18, I can only get TouchOSC to send data, which the XR18 receives, but does not send corresponding data back to TouchOSC. Lemur simply doesn't seem to work.

I am trying to build separate AUX sends for each performer, from which, they control a preset of sliders related to their headphone mix. I know the commands to be sent but when using TouchOSC, I can see the slider move on X Edit, but when I move the slider in X Edit, I do not see the response on OSC client.

With Lemur, I'm trying to be a little more sophisticated. I want to continue using the template I have with Reaper (controls song selections), but add an additional OSC interface (OSC1) to send mixing commands to the XR18.

I wouldn't claim to be an OSC expert, but I've worked with it and Reaper for several years now with several OSC clients, so I've run into the usual networking and data structure issues.

The XR18 is stumping me...I can't get TouchOSC to receive data, nothing from Lemur.

Any luck with your own OSC attempts using these clients?

  • 0 Kudos
  • 85 Replies
  • Reply
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Phil Smith;88785 wrote:
I managed to get it working with PD


Hi Phil,

That's great that you got it working but what exactly did you get working? Would you be willing to share your .touchosc and .pd files as an example?

Thanks,
Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Ed Gelmetti;88791 wrote:
Ideally, I'd like to create a relay which bridges TouchOSC (for a custom and concise interface) to the XR18 via Pd. I can send commands from TouchOSC through Pd and see a response on the XR18, but nothing from the XR18 returns.

My setup uses an external router to which both my Mac and XR18 are tethered with static addresses.

I would appreciate it if you would share your Pd file, or explain the process.


Hi Ed,

This is exactly what I had in mind except maybe with Python or C. The implementation method isn't really relevant and it sounds like Phil already got something working with Pd. I need to present a simply control interface to a user without exposing them to X Air Edit. This method may also be useful for working with other controllers and control surfaces such as the X-Touch Mini which isn't directly supported by the X Air.

--Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
Contributor - Level 2

Re: XR18 with TouchOSC, other OSC Clients

Ken Mitchell;88802 wrote:
Hi Phil,

That's great that you got it working but what exactly did you get working? Would you be willing to share your .touchosc and .pd files as an example?

Thanks,
Ken


Hi Ken

You need to send a polling message to the mixer at least every 10 Seconds in order to get OSC commands back. These responses are sent to the same UDP port that was used to send the polling message. Here is an excerpt of my Java code (the syntax is more or less similar to C++ so that you probably will understand it) that does this (in an extra thread):

// Register for remote commands only
OSCMessage msg = new OSCMessage("/xremotenfb");
// use "/xremote", if you want even your own commands echoed back

while (true) {
[INDENT]try {
[INDENT]NanoAir18.instance().oscPort.send(msg);
[/INDENT]} catch (IOException e) {
[INDENT]System.out.println("Couldn't send poll-message to XAir");
[/INDENT]}

try {
[INDENT]Thread.sleep(10000);
[/INDENT]} catch(InterruptedException e) {
[INDENT]break;
[/INDENT]} catch(Exception e) {}
[/INDENT]}

BTW: Phil already shared his PD code. Look into this thread:
http://forum.music-group.com/showthread.php?7995-Pure-Data-midi-to-OSC

(But he didn’t use touchOSC as far as I know, but interfaced to a BCR2000)
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Thanks Michael,

I actually got the polling part of the code working in a python thread but it's the communication between the XR18 and TouchOSC I'm having a bit of trouble with. I'll have a look at Phil's Pd code to see what he's doing. It looks like he's doing midi-to-OSC so I'll be curious to see how he's handling the OSC responses from the XR18 going back to the BCR2000.

Thanks again,
Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

It looks like Pd-extended is now defunct. What are others using in place of it?

Thanks,
Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
Contributor - Level 2

Re: XR18 with TouchOSC, other OSC Clients

Hi, Michael is correct I didnt use Touschosc. I know PD extended seems to be dead but its till works ok for me. It has networking commands in it that vanilla PD didnt have at the time. I havent looked at it in months as I mangaed to get it working fine for me, Things may have changed or you may be able to add MrPeach (or I thnk there was an alternative) to a current version of PD.

Disclaimer: I dont really know what Im doing, if you read my thread Michael linked to, you will see I was making it up as I went along. All the information is there if youre interested though.
Super Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Ken Mitchell;88748 wrote:
[...]

That's led me to another idea... What about a TouchOSC relay that could communicate with both the XR18 and TouchOSC. One side of the program would carry on a dialog with the XR18 using UDP port 10024 while the other side of the program would converse with TouchOSC via UDP 8000 and 9000. OSC messages coming from TouchOSC would be relayed to the XR and parameter changes from XR would be relayed to TouchOSC. There could even be a translation layer that allowed for say, a single TouchOSC object to control a number of controls within the XR.

Thoughts?

--Ken


That's basically what X32Reaper does; a proxy that connects to REAPER on one side, receiving & translating REAPER OSC data to X32 format and sending to X32, while keeping a /xremote running to ensure receiving & translating X32 OSC data to REAPER format and sending to REAPER.

The source code is available: https://github.com/pmaillot/X32-Behringer

-Patrick
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Thanks Patrick. I should have cited my inspiration for the idea from the start and that was the X32Reaper program. I'm starting with a single fader and I'll build from there.

--Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
Contributor - Level 2

Re: XR18 with TouchOSC, other OSC Clients

Patrick - thanks for the info on your Reaper-X32 relay. Bummer, I'm neither a programmer, or use Windows...on a Mac here.

All - thanks for the info. I want to restate what you've all said in case in the future, another X-Air user comes along wondering why TouchOSC and other typical clients don't work.

Basically, the transaction from a client includes the destination IP & Port, along with the Sending IP & Port - the catch is, the port used for the Sending IP is unknown (unless you program something to capture it) to the client such as TouchOSC. The "incoming" port setting in TouchOSC does not dictate to the OSC server where to return data.

The "incoming" port you specify in TouchOSC, for instance, is simply an open door for return data, but it does not represent the actual port to which OSC server, in this case the XR18, returns data.

The XR18 will return data to the port which was assigned by the OS as it left your device/OS. Still, this is not the open door TouchOSC specifies.

Where my confusion about how the XR18 works comes from my use of Reaper for the last 3 years using it as an OSC server to my iPad for Lemur, and for my bandmates using TouchOSC.

What Reaper does, that the XR18 does not do, is allow for explicit port assignments based on defined IP addresses. So, for each connection into Reaper by myself and bandmates, I have told Reaper to which IP and Port to return OSC replies.

THIS IS WHAT BEHRINGER SHOULD DO!!!

Feature Request: Allow explicit definitions for client addresses and ports related to OSC communication.

So, thank you all for pointing out the subtle issues in networking...I've been able to bridge the gap in understanding why the XR18 doesn't work easily with OSC.
Valued Contributor - Level 1

Re: XR18 with TouchOSC, other OSC Clients

Hi Ed,

I actually have a working prototype of XAirReaper that currently works with a single fader. The problem I'm seeing with this approach is that the end user has to re-compile the program to make any changes to the TouchOSC <--> XAir OSC translations. Patrick created a fairly stable 1:1 relationship between Reaper and the X32 since X32 has physical controls but I'm not sure that approach will be flexible enough TouchOSC.

I've found another open source tool called "OSCII-bot" that was written by Justin Frankel, the lead developer of Reaper. It's basically a MIDI->OSC, OSC->MIDI, MIDI->MIDI, OSC->OSC manipulation tool that's highly configurable via plain text script files. I'm studying the source code now in hopes of being able to add support for the "Behringer style" of UDP send and receive. If I can get that to work it should be pretty easy to create a TouchOSC to XAir OSC to TouchOSC transcoding script or scripts. OSCII-bot runs on both Mac and Windows.

--Ken
If you want "Loud", then run a piece of sheet metal through a table saw. --Ivan Beaver
    Go to page