Advice on wired ethernet - iPad (TouchOSC) to GP

Before going ahead and purchasing adaptors and other equipment to permit a hard wired ethernet connection from the iPad to MacBook, I wanted to ask for suggestions from others in the community as to the best way to make the connection.

I am looking for a reliable connection for shows and would like to be able to use the OSC functionality of GP. I’m already sending midi commands to mac apps from TouchOSC via the the simple lightning connector and Midi Network setup and could actually translate the midi messages to OSC in the OSCulator application if necessary. I would like to keep it simple and save on resources.

My devices are “ancient”: MacBook pro (2012) and iPad (4th gen) - this second one will not run TouchOSC MkII, otherwise they are both still working great for me.

I see that I will need to order the Apple camera USB-C adaptor with a lightning slot for power which will then be connected to a USB-C to ethernet adaptor. After this I’m not sure of the best way to physically connect to the Mac and settings that would be required.

Any suggestions much appreciated, thanks.

have you thought about a cme widi connecting both devices osc will work well over midi

@DJAA I think you might be mistaken since OSC does NOT work over MIDI. It requires a network connection.

@Syme It’s good you’re trying to achieve the simplest possible solution. So let me suggest you try the following:

  • Use a direct connection between iPad and Mac with a lightning cable (no camera or ethernet adapters needed) and
  • Use the OSC function of TouchOSC Mk1 instead of translating MIDI to OSC in a third-party app

The communication via direct USB connection works like this (the steps need to be done only once):

  1. iPad to Mac: Find out your Mac’s host name (like this) and use it for the “Host” field in TouchOSC.
  2. Mac to iPad: The iPad is automatically assigned an IP address when it is connected. It cannot be set manually. To find it out you need to use the command “arp -a” in the terminal or a free iPad app like Net Analyzer, for example.
    Use this IP address for the “Remote Client IP address” field in Gig Performer.

(Please note that a fresh IP address is assigned if the iPad is restarted. In this case you need to repeat this step. Using standby or flight mode for the iPad does not require this.)

This trick was inspired by this great thread that even takes it a level further (too much for my personal requirements).

This is the simplest possible solution for the hardware-part I can think of. Let’s see if it works for you. :wink:
The programming part is covered pretty well in the manual and in this forum, too, I believe.

@Florian I’ll let my guitar seup working on samsung tablet running touchosc via cme midi connection for the last 6 months?

You’re using the TouchOSC system but you are most likely only using it in MIDI mode.

2 Likes

Yes, I did see the thread that @Florian is referring to, maybe misunderstood, but the repeat after restart part did not seem ideal. I will nevertheless try and see if it works here, thanks. The “next level” part was beyond me.

To @DJAA’s reply: The CME devices are integral to my on-stage setup, I have never read anything about these two different protocols being transmitted via these devices - do you have a link?

The cme widi transmits .midi over bluetooth, you can setup touchosc to display and control via midi, for me removing the whole ethernet stack and using blutooth was simpler and more reliable.

Yes this is true, the cme products work great paired to each other in “signal rich” spaces. I’m using the H4MIDI WC and WIDI Master. My problem is these older devices (iPad gen.4); I’ve had nothing but problems with disconnections via bluetooth in environments other than my home space. I absolutely need a wired connection for this part of my setup.

We still seem to be talking about different protocols, OSC is my concern. I would agree with the other posts here that these midi devices do not transmit osc until I see proof to the contrary.

They don’t - the end!

1 Like

I used a wired Ethernet connection from MacBook to iPad for a couple of years. After my 3rd Ethernet to lightning interface failed- I’ve gone WiFi and so far it connects quicker and more reliable.

1 Like

Thanks for this suggestion, I experimented and it worked. Although it is based on the discussion that @Florian referenced here, I’ll describe my experience if it might help someone else.

Wifi off (not essential) on both MacBook and iPad, with the Lightning cable connecting the two.

TouchOSC Mk1 connections settings on the iPad. There are two settings for Host that work:

  1. Host: the xxxxxx.local using the computer name found in the Shared settings of MacOS system settings.
    Outgoing port: the listening port as specified in GP OSC general settings.
    Incoming port: I used the port assigned automatically in TouchOSC; this could be manually changed.
    Local IP Address: shown as 127.0.0.1(iPad IP-1) and not editable. (this is the default IP when wifi is off for the two iPads I have).

  2. Host: the GP IP address assigned in the GP OSC general settings.
    Outgoing port: (as above)
    Incoming port: (as above)
    Local IP Address: (as above)

GP OSC general settings. There are again two options for the remote client IP address:

  1. The 127.0.0.1(iPad IP-1) from T-OSC connections
  2. The second IP address as described at the link above (iPad IP-2). I was able to find this second one by clicking browse in the connections settings in the T-OSC MkII editor on the MacBook. In my case it was 169.254.106.138.

Conclusion: Either of the two settings in T-OSC work for bi–directional communication, the advantage being that the first does not change after disconnection or reboot. On the GP side only sending to the iPad IP-2 allows for bidirectional communication, the disadvantage being that this one must be discovered and re-entered in GP after disconnection or reboot - not ideal.

Caveat: I use two instances of GP and T-OSC MkI only speaks to one at a time.

Would it be possible to send OSC messages to the first instance and relay them to the second?

1 Like

Since my original question was about ethernet connection, I would nevertheless be interested to know the details of how you, or anyone else, have accomplished this. Thanks.

I’m glad it worked.

This is because the Mk1 version of TouchOSC can only send to one single port. But:

Yes, I relay certain messages to a second instance myself using a global rackspace script. There is no general relaying function so you must write three short lines of code for every message you would like to transmit on to the other instance.

An example:

On OSCMessageReceived(m : OSCMessage) Matching "/Play"
    OSC_SendSpecific(m,"127.0.0.1",Receiving_Port_Of_Instance_2)
End
  • “/Play” is the example message that is
  • relayed to “127.0.0.1” which is the IP address of the same device
  • on the “Receiving Port” set in the other instance (change to the corresponding integer)

Can you go on from here?

One note on your explanations:

This seems to be a bug in TouchOSC Mk1 - you can ignore it. The iPad will only show the WIFI IP address, not its “secret” IP address of the direct connection, in your example 169.254.106.138, but it will still react to messages sent to it.

I’d be interested, too, especially since this was my approach before changing to the simpler direct connection. I used a lighting to LAN adapter with a charging input.
As promising as it sounded, the adapters and settings never worked 100 % - especially

  • after a restart of the iPad (here, too!)
  • when the charger was plugged in last (“not charging” message)
  • when TouchOSC had been launched before the LAN connection was established

you must write three short lines of code for every message you would like to transmit on to the other instance.

I suspected that this would be a solution. Good to know it is done from the global rackspace, thanks.

Can you go on from here?

My coding level is SeeSpotRun; I will give this a try and come back with questions.

What is an example of this?

Sorry for the confusion, I didn’t correctly tag the passage from @Florian’s previous post where he wrote:

Oh I see.

That’s really two lines to respond to an incoming OSC message (which is basically the callback overhead)

and one line to transmit the message.

I was trying to figure out how you needed three lines to send a message.

Thanks

I used a USB to lightning adaptor from amazon

This was connected to a router that connected to a mixer and the computer. Other than the lightning to ethernet adaptor, the other connections were with cat5 cables.

In the iPad, after connecting this adaptor, there was a setting for ethernet appearing in the general settings.

I bought 2 of these adaptors and 2 of another brand. I had 3 failures of these devices.

I use Remotix on the iPad to mirror the screen on the computer. Now that I am on wifi, I had an occasional problem where remote would not remember myth login. I think it may have been because a different ip address was given to the computer on occasion. So now I have reserved a static address for the computer from within the control panel of the router. Hoping this streamlines setup.

1 Like


After some digging I have a question:
The first example above shows TouchOSC changing both songs and parts in instance-1 including the scripting to send to instance 2, the second example with instance-2 in the foreground shows the first callback functioning.
What is wrong with the second callback please?

I’m not sure where you came across /SongPartName as an OSC address, but at the very least it’s implying that it operates using a name. However, you are attempting to pass it an integer.

Try this:

On Songpart(oldSongpartIndex : integer, newSongpartIndex : integer)
    SendOSCMessage { "/Song/SwitchToPart", newSongpartIndex } to "127.0.0.1": 9003
End

Also, you using GP5? If so, there is a more direct way to sync songs/parts between GP instances (in Options > OSC).

2 Likes