# LiveOSC (Sonic Pi -\> Ableton Live)

**URL:** <https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850>\
**Category:** Creations & Ideas\
**Created:** [May 16, 2020, 11:36pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850 "2020-05-16T23:36:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [May 16, 2020, 11:36pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/1 "2020-05-16T23:36:38Z")

</div>

I’m still pretty new to Sonic Pi, but the first thing I needed was to try and record live\_loops to tracks in Ableton. My goal was to sync BPM and start recording with tracks armed. I couldn’t find this else where so thought I’d share what works so far on a Mac (not sure about Windows, but believe it works the same):

**UPDATE: Judging by a comment below, if you aren’t on a Mac you may need to install Python for this to work. [https://www.python.org/](https://www.python.org/)**

Install LiveOSC into the Live app on your system:

> **[ideoforms/LiveOSC](https://github.com/ideoforms/LiveOSC)**
>
> OSC interface for Ableton Live. Contribute to ideoforms/LiveOSC development by creating an account on GitHub.

This receives on port 9000 and sends on 9001 (which is hard to find).

**NOTE: You need to receive on port 4560. The LiveOSC command for that is:**  
`osc "osc "/remix/set_peer", "", 4560`

A list of available LiveOSC commands are here:

> <https://github.com/ideoforms/LiveOSC/blob/master/OSCAPI.txt>

The only thing that was missing so far is the global record so I needed to just map the record button to a midi\_cc.

My test session had 4 live\_loops. I also wanted to record midi to two tracks. I set up a define for this, like so:

```
define :osc_setup do
      use_osc "192.168.1.6", 9000
      osc "osc "/remix/set_peer", "", 4560
  
     osc "/live/tempo", current_bpm
     osc "/live/arm", 0, 1
     osc "/live/arm", 1, 1
     osc "/live/arm", 2, 1
     osc "/live/arm", 3, 1
     osc "/live/arm", 4, 1
     osc "/live/arm", 5, 1
end

use_bpm 60

osc_setup
midi_cc 1, 1, channel: 9

```

To record multiple tracks at once I needed to setup a multichannel audio source using Loopback by Rogue Amoeba (a flexible aggregate audio builder). I used a normal “pass-through” as source with 10 channels and routed everything but the default 1,2 stereo channels to 4 other output channels like this.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/3/3ab8f06fac0a8d4752e5e84a565ee41b99123729.jpeg)

Choose this as your mac audio source input  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/f/faf9e61ffbb21d8eca5e8ebbae754987a3e234b4.jpeg)

In Ableton you will also need to set this for your audio input:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/0/099ab8a33ec270e6e49c848eee57cbf8b18de444.png)

And choose LiveOSC from your control surface under Link/Midi:  
[![](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/b/b085d7997f16f1673f6eaba74182ba7f76eba35c.png) ](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/b/b085d7997f16f1673f6eaba74182ba7f76eba35c.png)

From inside each live\_loop you can then use with\_fx :sound\_out\_stereo, channel [channel you want to send to - remembering that with stereo they come in pairs - so I use 3, 5, 7, 9 for my 4 tracks.

You can also send midi out from the loops as needed. I use the IAC Driver on my mac (which wasn’t enabled by default):

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/2/2a36db7785d937a3018ca197bf2a5e21569e75f9.jpeg)

With this when you run your code, it will start Ableton recording the tracks it arms. You still need to stop recording in Ableton, but it will start recording from the beginning.

This is pretty rudimentary, but a good starting point.

Oh, and you can also control params on devices and all kinds of other things. This was one of my main reasons for trying to learn Sonic Pi - even though it is incredible on its own.

There is also a Python library (pylive [https://github.com/ideoforms/pylive](https://github.com/ideoforms/pylive) ) that allows python control of Live - but what seems to be missing is the runtime engine available in Sonic Pi.

But this allows for some serious generative audio, midi and parameter control via Sonic Pi.

ONE CAVEAT SO FAR:  
I thought I’d be able to receive these commands using the Max 4 Live “Connection Kit” which contains TouchOSC for learning/mapping OSC sends to parameters. This works much like @robin.newman shared in a previous post ( [view it here](https://in-thread.sonic-pi.net/t/sonic-pi-3-controls-ableton-live-9/699)). However, for some reason I can’t receive any commands sent at this point in TouchOSC, even when set to port 9000 - so I assume that LiveOSC is commandeering that port.

UPDATE on reading OSC responses back in Sonic Pi:  
If you send an OSC command that is just expecting a return - you have to actually read the cue log to see what OSC path/command it’s actually sending back then use ‘get’ from the Time State.

Example:  
##| requests info from track zero, device zero  
osc “/live/device”, 0, 0

```
##| returns all device parameters with names and values (it seems the OSCAPI doc is a bit incorrect here)
devices = get "/osc*/live/device/allparam"
puts devices

```

That will output an array into your log so you can find the exact parameter to manipulate.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [May 17, 2020, 6:37am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/2 "2020-05-17T06:37:20Z")

</div>

First thanks for sharing your exporations !

> [@Hypostatic](#):
>
> Install LiveOSC into the Live app on your system:

Which version of Ableton Live do we need ?  
Does the lighter version, Ableton live Intro is sufficient ?

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [May 17, 2020, 8:36am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/3 "2020-05-17T08:36:11Z")

</div>

Hi Isaac,

I don’t work with Ableton but I really appreciate this thorough documentation you have shared here!

The context of why I am generally interested in interfacing Sonic Pi with external gear/software: I meanwhile have a [Fates](https://llllllll.co/t/fates-a-diy-norns-dac-board-for-raspberry-pi/22999), which is a Raspberry-based music platform originally developed by Monome and its community. Currently I am trying to marry Sonic Pi live coding with the different applications which Fates provides. So one of the main goals here is to clock Fates with Sonic Pi, which proves to be kind of tricky (although it seems to be simple).

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [May 17, 2020, 9:04am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/4 "2020-05-17T09:04:36Z")

</div>

Nice article. [This was my previous post](https://in-thread.sonic-pi.net/t/sonic-pi-3-controls-ableton-live-9/699) about using Ableton with SP

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [May 17, 2020, 3:22pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/5 "2020-05-17T15:22:29Z")

</div>

@nlb - I’m running the full version of Live 10, but I think it should work with the Lite version. LiveOSC also has two different forks on Github for 9.6 or later and also for prior. TouchOSC is a Max 4 Live device so you need the full version to access that (as Max iisn’t included in the lite version).

If it does work in the Lite versions I’m sure people would like to know. If you try it, please share your findings!

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [May 17, 2020, 3:28pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/6 "2020-05-17T15:28:53Z")

</div>

@Martin. Thanks! And that Fates looks like fun - now I want one! I need to dig deeper into that. It should be noted I suppose that yeah, the syncing is something I’m not even totally sure about yet with Ableton. As I’m just for now looking at recording and manipulating, the above works - trying to perform it all might be another story. As I’m still learning SP in the first place I haven’t gotten that deep yet. But algorithmic control of Ableton Live via SP code is definitely intriguing to me. Max is just not the way I envision code - at least for most of what I want to do. I’m not a super coder either but am familiar with many languages. Obviously using something more standardized is very powerful.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [May 17, 2020, 4:01pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/7 "2020-05-17T16:01:57Z")

</div>

Well bad news…

Tested with Adobe Live 9 Lite:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/2/25a99fb3e42de511cf3112de457d1459d91dea4c.png)

it seems not to work.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/8/86090196c4924baae61fe08278d8b145d72a034c.png)

Am i correct with the set up in Ableton ?

the osc messages are well received (checked with another program)

EDIT : python must be installed ? Start of headhache 🙂 under windows 10

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [May 17, 2020, 6:00pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/8 "2020-05-17T18:00:01Z")

</div>

Interesting. Yeah, the Live setup looks accurate. I failed to mention the need for Python (forgetting the LiveOSC is python based). Python 2.7 is default on Macs and I had actually upgraded to 3.8 when installing PyLive, so I had that dependency already. I’ll edit my notes above though. Sorry if I steered you down one of those hurdle paths.

And yeah, worse, testing inside (other than trial and error) is tough without Max 4 Live and some of the tools in their connection kit (which mentioned in my caveat, don’t register with LiveOSC). TouchOSC is great for mapping any commands from SP to various things as @robin.newman showed, but I was most interested in the way I could have easy command control for recording at this point. You can’t for instance map TouchOSC to the transport record button. For algorithmic ‘knob twiddling’ and everything else it would be great. Another ideal would be if you do get it working with the Lite - but it is possible the developers realized that it was opening up the door to getting around a full purchase and stopped OSC support on it. I’ll try and do some research into that.

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [May 17, 2020, 6:06pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/9 "2020-05-17T18:06:53Z")

</div>

One thing @nlb - Here are my MIDI/Link settings:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/b/b085d7997f16f1673f6eaba74182ba7f76eba35c.png)

- I don’t believe the Link features (not in your Lite version) matter - that’s for Midi.

It is interesting though that under “input” it shows the greyed out “touchAble”. I’ll have to look into this, but again might be a default only included in the full Live Suite.

---

<div class="post-metadata">

**Author:** ![Lunatico](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Lunatico](https://in-thread.sonic-pi.net/u/Lunatico)\
**Post date:** [June 20, 2020, 9:59am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/10 "2020-06-20T09:59:04Z")

</div>

Hi  
I’m trying to try LiveOSC with Ableton Live but it’s not working, something i am doing wrong

 ![LiveOSC](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/e/e6257d50951a6dd94a93a19f43859f3c7dd57115.jpeg)

---

<div class="post-metadata">

**Author:** ![Lunatico](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Lunatico](https://in-thread.sonic-pi.net/u/Lunatico)\
**Post date:** [June 20, 2020, 9:59am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/11 "2020-06-20T09:59:29Z")

</div>

![LiveOSC1](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/8/8c28338157925d37ba3c8503ae9491fe733ecc05.jpeg)

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [June 20, 2020, 3:36pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/13 "2020-06-20T15:36:36Z")

</div>

@Lunatico - for starters, it looks like you have the error OSC line incorrect:

`osc "osc "/remix/set_peer", "", 4559`

**EDIT: I realize that this was in my code above. My fault for not typing code in the forum properly! And seems it’s been too long and I can’t edit.**

should be

`osc "/remix/set_peer", "", 4560`

The first issue is the two osc calls with one in quotes. The second is that this command is telling Ableton to send OSC messages back to Sonic Pi on 4560, which can’t be easily adjusted. I think by default LiveOSC uses 9001, which means Sonic Pi won’t hear the messages. Sonic Pi sending can be whatever port you prefer (matching the port set wherever you are sending obviously), but the incoming is fixed for now.

Also, make sure you also have the send and receive OSC turned on in the Sonic Pi settings.

ADDITION: It’s been a while since I’ve done this all, but make sure @Lunatico that you do all of the setup mentioned above, including install python if you don’t have it already. On Mac OS (which I was using for this) python 2.7 should be installed. I updated to python 3 though.

---

<div class="post-metadata">

**Author:** ![Lunatico](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Lunatico](https://in-thread.sonic-pi.net/u/Lunatico)\
**Post date:** [June 20, 2020, 7:53pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/14 "2020-06-20T19:53:25Z")

</div>

Hi  
Hypostatic a lot of thanks for your answer & help  
I’ve tried but it doesn’t work.  
No problem, I’ll wait for the configuration of the fantastic Reaper 😉

---

<div class="post-metadata">

**Author:** ![Hypostatic](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/hypostatic/32/1383_2.png) [@Hypostatic](https://in-thread.sonic-pi.net/u/Hypostatic)\
**Post date:** [June 20, 2020, 10:45pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/15 "2020-06-20T22:45:27Z")

</div>

Hey @Lunatico - see if this works for you: [Sonic Pi OSC with REAPER](https://in-thread.sonic-pi.net/t/sonic-pi-osc-with-reaper/4092)

The hardest part might be routing all of the audio which is different on each system but I tried to explain the best I could.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 15, 2023, 9:55am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/16 "2023-09-15T09:55:04Z")

</div>

Hello !

> **[GitHub - ideoforms/AbletonOSC: Control Ableton Live 11 via Open Sound Control...](https://github.com/ideoforms/AbletonOSC)**
>
> Control Ableton Live 11 via Open Sound Control (OSC) - GitHub - ideoforms/AbletonOSC: Control Ableton Live 11 via Open Sound Control (OSC)

AbletonOSC sends response on the 11001 port. Sonic pi use 4560. How can i change this port to set to 11001 ?  
Cheers

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [September 15, 2023, 1:25pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/17 "2023-09-15T13:25:03Z")

</div>

Probably easier to change it at the Control Ableton\_Live 11 end. Looking at the software there is a file constants.py which sets the OSC\_LISTEN\_PORT and the OSC\_SEND\_PORT change the send port from 11001 to 4560 Before you install it. I think that should work, unless Ableton itself requires port 11001. I only have an earlier version of Ableton so cant test.

EDIT you can alter the code similarly in the sonic pi daemon.rb file Look for the line that says  
`"osc-cues" => 4560,` This is around line 1363 and alter it to say `"osc-cues" => 11001`  
Then resave. (you may want to save a copy of tehe original first). YOu can do this in an existing build, as it will not afrfect or need any files to be recompiled.  
I tried it on a mac build looking inside the package Contents/Resources/App/Server/Ruby/bin folder to find the file. This will also work in LInuc builds. Haven’t tried Windows, but should be possible there tool.

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 15, 2023, 3:27pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/18 "2023-09-15T15:27:20Z")

</div>

> [@robin.newman](#):
>
> Probably easier to change it at the Control Ableton\_Live 11 end. Looking at the software there is a file constants.py which sets the OSC\_LISTEN\_PORT and the OSC\_SEND\_PORT change the send port from 11001 to 4560 Before you install it. I think that should work, unless Ableton itself requires port 11001. I only have an earlier version of Ableton so cant test.

Thanks @robin.newman ! Your help is always appreciated 🙂  
it works a priori. I mean spi receives some osc messages from ableton live so good point.

in this folder, edit `constants.py` and restart Ableton Live  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/7/716334e76033ba4326911fb1863f2caab5a3a7d3.png)

Now in SPI. I can set easily but get data is harder.

```ruby
use_osc "localhost", 11000

# sending osc

osc "/live/song/set/tempo", 60
sleep 1
osc "/live/song/set/tempo", 110
sleep 1

# getting

##| (1653)(AbletonOSC)$ ./run-console.py
##| AbletonOSC command console
##| Usage: /live/osc/command [params]
##| >>> /live/song/set/tempo 123.0
##| >>> /live/song/get/tempo
##| (123.0,)
##| >>> /live/song/get/track_names
##| ('1-MIDI', '2-MIDI', '3-Audio', '4-Audio')

foo = osc "/live/song/get/tempo"

print foo

```

![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/1/1bbeca10b5e7df801173ec22c87b75f6f2c7cd27.png)

I guess i have to use a live\_loop but i have to check my past notes 🙂

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [September 15, 2023, 3:56pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/19 "2023-09-15T15:56:36Z")

</div>

Yup, you need a live loop. Something like this I would imagine, looking at your info above

```ruby
live_loop :getTempo do
  t = sync "/osc*/live/song/get/tempo"
  puts "tempo is: #{t[0]}"
end

live_loop :getTrackNames do
  tn = sync "/osc*/live/song/get/track_names"
  tn.length.times do |x|
    puts "track_name #{(x+1)} is #{tn[x}" #index goes from 0 so track_name 1 is when x=0
end

```

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 15, 2023, 4:02pm UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/20 "2023-09-15T16:02:46Z")

</div>

thank you @robin.newman but no success with this code ( a little typo)…

```ruby
live_loop :getTempo do
  t = sync "/osc*/live/song/get/tempo"
  puts "tempo is: #{t[0]}"
end

live_loop :getTrackNames do
  tn = sync "/osc*/live/song/get/track_names"
  tn.length.times do |x|
    puts "track_name #{(x+1)} is #{tn[x]}" #index goes from 0 so track_name 1 is when x=0
  end
end

```

i will look at the reasons why tomorrow 🙂

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 16, 2023, 7:33am UTC](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850/21 "2023-09-16T07:33:19Z")

</div>

Good morning,

Okay so with AbletonOSC to get some data, you have first to send the osc message then AbletonOSC will send you the answer

```ruby
use_osc "localhost", 11000

# sending osc

osc "/live/song/set/tempo", 60
sleep 1
osc "/live/song/set/tempo", 110
sleep 1

# getting

##| (1653)(AbletonOSC)$ ./run-console.py
##| AbletonOSC command console
##| Usage: /live/osc/command [params]
##| >>> /live/song/set/tempo 123.0
##| >>> /live/song/get/tempo
##| (123.0,)
##| >>> /live/song/get/track_names
##| ('1-MIDI', '2-MIDI', '3-Audio', '4-Audio')

live_loop :getTempo do
  osc "/live/song/get/tempo"
  t = sync "/osc*/live/song/get/tempo"
  puts "tempo is: #{t[0]}"
end

live_loop :getBeat do
  
  t = sync "/osc*/live/song/beat"
  puts "beat number: #{t[0]}"
end

live_loop :getTrackNames do
  
  path = "/live/song/get/track_names"
  osc path
  tn = sync "/osc*"+path
  tn.length.times do |x|
    puts "track_name #{(x+1)} is #{tn[x]}" #index goes from 0 so track_name 1 is when x=0
  end
end

```

![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/0/00f978ca922372f5843678d2e14fa7d09b12631e.png)

Maybe kill the live\_loop when i get the info but don’t know how to. @robin.newman an idea ?

First use of AbletonOSC so i guess my journey just begins 🙂  
So next episode soon

Have a good day

[Next page](https://in-thread.sonic-pi.net/t/liveosc-sonic-pi-ableton-live/3850.md?page=2)
