What´s the best way to send and receive OSC Ableton Live

Discuss Lemur and share techniques.
Post Reply
AkaMed
Newbie
Posts:37
Joined:31 Mar 2014 00:26
What´s the best way to send and receive OSC Ableton Live

Post by AkaMed » 11 Dec 2016 21:31

Hello
I am trying OSC but I don´t find what´s best for dealing with OSC in Ableton Live.
I have done it with LiveGrabber but the parameters are limited and I need to send track names and more information to Lémur, and LiveGrabber doesn´t support it.
What do you reccomend? I use Windows.
Thanks in advance.
Ruben

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: What´s the best way to send and receive OSC Ableton Live

Post by phase_change » 11 Dec 2016 21:54

LiveOSC might work - Idk about sending track names. You could also build something with M4L if you have Ableton Suite (I'm assuming you do).
Have you tried turning it off and on again?

AkaMed
Newbie
Posts:37
Joined:31 Mar 2014 00:26

Re: What´s the best way to send and receive OSC Ableton Live

Post by AkaMed » 11 Dec 2016 23:28

I am trying with LiveOSC. I can send and receive as I can see in the M4L OSCmonitor.
Lémur receives and moves one fader on the iPad screen when I move a fader in Ableton Live, but if I move the fader in Lémur (iPad) the M4L monitor says it is receiving the correct message, but the fader doesn´t move in Ableton Live.
I don´t know what´s happening.

BTW, I am not able to change the local IP in Lemur, and I wish i can, because I am using MIDIMUX with a USB cable and the IP should be 127.0.0.1

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: What´s the best way to send and receive OSC Ableton Live

Post by phase_change » 12 Dec 2016 01:27

127.0.0.1 is localhost my man. It points to the computer you're using. I don't know anything about MidiMux, but that's not how IPs work. Help me out here - you're trying to connect your tablet to your computer via a cable and you want to send OSC messages via this cable? *Edit* Unless I'm completely misunderstanding and MidiMux is running on your tablet and sending messages to localhost? It seems kind of odd to me. It doesn't make sense for Liine to allow Lemur users to change the local IP address from a design perspective. You send Midi/OSC messages from Lemur to an external device - most likely a computer with an IP address. You receive Midi/OSC messages to Lemur from an external device - most likely a computer, obviously using the IP address for your tablet. It's not designed to control other apps in your tablet, so no need to change your IP address to localhost except for this highly specific use case.

I have LiveOSC installed for Monome apps already, but am kinda tired and have a really busy week. If nobody else steps in to help you troubleshoot or you don't figure it out for yourself by next Monday I can try to figure it out for you. Just taking a stab at it - my bet is you haven't mapped the control in Ableton. The reason I say this is you're sending messages from your computer to your tablet fine and you're sending messages from your tablet to your computer fine, but no response in the app. So we can say with certainty it's not a network problem - the problem is located when the message is sent from LiveOSC to Live.

https://en.wikipedia.org/wiki/Localhost
Have you tried turning it off and on again?

AkaMed
Newbie
Posts:37
Joined:31 Mar 2014 00:26

Re: What´s the best way to send and receive OSC Ableton Live

Post by AkaMed » 12 Dec 2016 19:17

Thank you very much, phase_change.

I have created a hotspot in the host, I will use my laptop on stage and I will not have a router, and I have configured the OSC output in Lemur as 9000 and 192.168.0.2 for the OSC 0 target.

Lemur IP says it has 192.168.0.3:8000

So Lemur should send to 192.168.0.2:9000 and receive on 192.168.0.3:8000

Now I am able to control live from Lemur, but when i touch a fader in live, with the mouse, it doesn't move on the iPad Lemur screen.
The messages that Live sends when I move the fader on the laptop is i.e. "/live/volume 0 0.40949". I tried to put a monitor in Lémur but I don´t see anything, and I don´t know if it´s receiving the messages....
How can I check if Lemur is receiving OSC messages?

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: What´s the best way to send and receive OSC Ableton Live

Post by phase_change » 13 Dec 2016 05:09

LiveOSC sends to port 9001. You have Lemur listening on port 8000. To explain a lil' better: Your device has an IP address (192.168.0.3) in your network and also ports (ranging from 0-65535). A good analogy to understand this is to think of a geographical location, in this case let's say Florida (my coworker recently told me to use real world analogies when explaining stuff, so I'm giving it a shot). You're the captain of a ship and you want to moor your ocean liner in Florida on the Atlantic coast. I can give you the longitude and latitude of the state of Florida (it'd be a range of coordinates in this case instead of a single value, but stay with me.) But you can't just pull up to Florida and say "I'M HERE!" - you need to moor your boat at a dock. You have a few different ports to choose from, you could moor it in Port Miami, Port Lauderdale, Port Canaveral, Port Jacksonville, etc. There could already be traffic traveling to one of the ports stopping you from being able to use it at that time. So you decide to use Port Canaveral since it is open. In this analogy, your ocean liner is an IP/TCP packet, Florida is the IP address, and Port Canaveral is your port.

So in order to get this to work, you need to get the packets to go to 192.168.0.3:8000. I'm not 100% sure on this, but I don't think you can tell LiveOSC to send packets to 192.168.0.3:8000. I'm p sure it just sends to localhost on port 9001. This makes sense since IP addresses are usually dynamically allocated and may change over time even if you don't join a different network. So, what you need is something that gets the packets to go from 127.0.0.1:9001 and sends them to 192.168.0.3:8000. Imo, the quickest/easiest way to do this is going to be to create a max patch using the UDP send and UDP receive objects. I could do this for you really quick, but I think it'll be more fun if you first try to figure out how to do it for yourself and *gasp* you might learn something in the process. If you get stuck, I'll help you think through the problem.

Now to actually answer your question, you would use a Monitor object, a script with execution set to on OSC with custom address /live/volume, and enter something like Monitor.value = {OSC_ARGS[0],OSC_ARGS[1],OSC_ARGS[2]}; to check to see if Lemur is receiving OSC messages.
Have you tried turning it off and on again?

AkaMed
Newbie
Posts:37
Joined:31 Mar 2014 00:26

Re: What´s the best way to send and receive OSC Ableton Live

Post by AkaMed » 14 Dec 2016 21:54

Thank you again phase_change for your nice explanation.
I am not sure Liveosc works fine with Ableton Live 9.7 because I can't make it work.
I've done a M4L patch with "udreceive 127.0.0.1 9001" connected to "udpsend 192.168.0.3 8000", but I am not able to make it work even without an ADHOC, and also with or without the M4L patch.
I've also tried to change, in the Liveosc Python script (the file called RemixNet.py):

class OSCEndpoint:

def __init__(self, remoteHost='localhost', remotePort=9001, localHost='', localPort=9000, ):

I trid to change the remotePort value for 8000, but nothing happens.
Well, to be true, the response begins to be sooo slow in Ableton Live, and sometimes the faders move a bit, but by no way it gets working normally.... and still receiving nothing in Lémur.
That's why I begin to think that maybe it is incompatilbe, because I don't think it should be so dificult to make it work....

Any more ideas????

Thanks a lot phase_change for sharing your knowledge and trying to help me.

Ruben

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: What´s the best way to send and receive OSC Ableton Live

Post by phase_change » 15 Dec 2016 02:35

I'll check it out ASAP... sometime after the weekend, possibly middle of next week. I've kind of over-extended myself these last few days. There's definitely something going on, this should be easier to use. I can't think of a good reason offhand that it wouldn't work. With that said, when you're using open-source software/scripts, sometimes the code is poorly maintained.
Have you tried turning it off and on again?

Post Reply