Launch clips & scenes with OSC messages

Discuss music production with Ableton Live.
Post Reply
adelbello
Posts: 11
Joined: Sat Aug 29, 2020 1:35 am

Launch clips & scenes with OSC messages

Post by adelbello » Sun May 02, 2021 4:34 pm

Is it possible to use incoming OSC messages to launch clips and/or scenes in Ableton?

I've been getting into Sonic Pi (https://sonic-pi.net/) and was thinking it would be awesome to control Ableton's behavior programmatically via OSC messages sent by Sonic Pi. I've been able to connect the two via Connection Kit's OSC TouchOSC device and I'm able to receive OSC messages in Ableton sent by Sonic Pi. However it only allows me to map the messages to certain parameters, not clip launching or any kind of playback. I haven't been able to find anything anywhere that would allow me to do what I want here. Is it even possible?

dougdi
Posts: 98
Joined: Wed Jul 26, 2006 2:45 am

Re: Launch clips & scenes with OSC messages

Post by dougdi » Sun May 02, 2021 5:29 pm

Maybe use Osculator to convert the OSC messages to midi? It’s a handy app.

https://osculator.net/
Doug

adelbello
Posts: 11
Joined: Sat Aug 29, 2020 1:35 am

Re: Launch clips & scenes with OSC messages

Post by adelbello » Sun May 02, 2021 7:40 pm

That looks really promising. Thanks! I’ll give it a try.

chapelier fou
Posts: 6002
Joined: Mon May 15, 2006 12:15 pm

Re: Launch clips & scenes with OSC messages

Post by chapelier fou » Sun May 02, 2021 8:17 pm

I would not bother translating this to midi.
It’s super easy to do this in M4L.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

adelbello
Posts: 11
Joined: Sat Aug 29, 2020 1:35 am

Re: Launch clips & scenes with OSC messages

Post by adelbello » Mon May 03, 2021 1:03 am

chapelier fou wrote:
Sun May 02, 2021 8:17 pm
I would not bother translating this to midi.
It’s super easy to do this in M4L.
That was my initial thought. This seems like a fairly (I would think) common use case. I haven’t been able to find any m4l devices out there that do this though. I would love to learn how to create some myself at some point but don’t have the time right now. Do you know of any m4l devices out there that can launch clips from OSC messages?

chapelier fou
Posts: 6002
Joined: Mon May 15, 2006 12:15 pm

Re: Launch clips & scenes with OSC messages

Post by chapelier fou » Mon May 03, 2021 7:09 am

I don't know but I wrote you a very rough patch.
To load, copy the code, drop a new M4L audio effect somewhere, open the edit mode, cut everything, paste in the device, save somewhere in the ableton library Audio effects/Max Audio Effects.

a message /launch/scene "x" will launch scene x
a message /launch/clip "x y" will launch clip y in track x (starting from 0).
The default port is 8080 but you can change it with the number box.

Let me know if it works and need further help.

<pre><code>
----------begin_max5_patcher----------
932.3ocyXssiZCCD84vWQTTejxF6bC5as+FUUHSv.dqwIx1gx1Ua+1qujjEJ
ApEwZEqzB3wS7YNyLd7375jfnUUGwhnvuD98vffWmDDXDoEDzNNHZO5XIEIL
pEsGKDns3no14j3iRi7ZjbWHkb.uTfkghRLCKB+DnSupFIEKkuTisfEEE9i1
oTOY4NBa6RNtTZmEjTLKdZXRl9S.LV+k9y9mg0rmvTKnwlfuKzBiQJnUJYsw
9pV87mg4QZYuMYh9ioijwkHJMbCgiGEGA.f9qzTewQ3CDGSSKlko3XZre4Hv
mb77LWIGU9SclaXIkTuTPqjpQvQw+LnIRWL2S7Gr3d3OC+K0CeA8kgqBoWkd
qPrsQScLLCMoxfzb8nqySvf7DN.Oy8HO0Q3Y5X80CkSa+2AtVXxkSWb6H5vL
MY.lV7XEQaKNM22AzLeGPUSnM5QUAVQOWXo6aOS6rGA5.d8RqMtDIkbxpFo8
71fdxFDsrFyEDgDyJMFNvH23k7cxeegtwsKn00kYyR71tfDOldvUXgCehhZX
k6dxzPR+Hcocu3.LLOO8+zfRhyN.nGc.jqxPBSdSxYa3xdpEbgm1UbWmYYxa
UKsVq1k7.hyP6wWa5ACmanUHWnLr389T.YitbWdTOfbkIKw7kXFZEEe5pXqQ
zWb3FkINfnM3pMch6je5xSXDIAQsbZd77dFLjVWZLmoEshs8Fd5yzcuJpo0a
g5OkyaHEHLCPwwwCpfXWEW5Jbcg2gVnFE4DxWr7J1NusT58UQ8psMpr269BN
1zM6wqoPO0VnOObsYcsxZwpvfIMZLrDDatF27764ThAnoOOjnl1rUg1e5lXS
ESJH+1tmnOQ8RZKHpsFTcok1e0yI8JzmF+UtZaV32pnqitQGkF2SBvdhZx8j
LLPsGnm8RD1CfSBl3WmzY2izrVpJOr+8EhXLGs7y8bhpFdYGWaO8dZ36lzZr
PRXHIohchRvbqRCFcbEotE4lHo5lZ7H0sH2FoLevIfKHk5CN4h2qybFOR.W3
DXrHk8QgDD9gEmxbINA8ARKbgSE9.InKwoE9.oBW3jOpF4TIhyyZ1SVWWotF
RakV6kL.cuuW3kiRO4J5oyFqE6R31G0zboPiOh0trQwKmF3xFROgCvAbNuVl
8.bTc8A8qSwprABUSNOWw0CmO0LjvrCMcWFwwGHc5uvHAwU8eHUMezvs8nbL
29Nch1WsFyYMj1WSihbJHMMPo6mQTir7vzm0j2l7W.MKnOB
-----------end_max5_patcher-----------
</code></pre>
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

adelbello
Posts: 11
Joined: Sat Aug 29, 2020 1:35 am

Re: Launch clips & scenes with OSC messages

Post by adelbello » Tue May 04, 2021 4:30 am

Wow! This is amazing! It totally works. I thought there was an issue with the /launch/clip call but it was me just not sending the right arguments at first. I'm inspired now after seeing this to learn a little bit about m4l so I can extend it to take clip/scene names as well.

Thank you so much for putting this together.

chapelier fou
Posts: 6002
Joined: Mon May 15, 2006 12:15 pm

Re: Launch clips & scenes with OSC messages

Post by chapelier fou » Tue May 04, 2021 5:34 am

It’s cool, isn’t it ? :wink:
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

chapelier fou
Posts: 6002
Joined: Mon May 15, 2006 12:15 pm

Re: Launch clips & scenes with OSC messages

Post by chapelier fou » Tue May 04, 2021 7:13 am

Looking for clip and scene names will be less easy, but totally doable.
You’ll have to scan each clip and scenes and get their names and associate them to the correct ids. For this you can use [coll] or [dict].
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

Post Reply