Sending device parameter names to controllers via API

Learn about building and using Max for Live devices.
Post Reply
agent314
Posts: 1458
Joined: Wed Apr 07, 2010 3:07 am

Sending device parameter names to controllers via API

Post by agent314 » Wed Mar 09, 2022 8:02 pm

Not strictly Max for Live related, but does anybody have any experience or resources/documentation to share regarding how to dynamically send device parameter names to an external controller (in my case, a TouchOSC device)?

I've got my TouchOSC controls set up with a remote script to enable blue hand functionality, but I'd really love to be able to have the parameter names populate a text label above each so I can see at a glance what controls what.

I'm looking at the decompiled control surface scripts to try to see how the data gets passed to a device like Push2, but I can't figure out what code actually sends data to the controller.

I can find the path to the device params in the LOM but don't know how that actually gets output.

[jur]
Site Admin
Posts: 5406
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: Sending device parameter names to controllers via API

Post by [jur] » Thu Mar 10, 2022 3:44 am

Download the "Maxforlive building tools" pack. You'll find device(s) that will help you understand how to get the parameters names.
Then I guess you'll have to look into the [udpsend] object to send via OSC those to your controller.
Ableton Forum Moderator

agent314
Posts: 1458
Joined: Wed Apr 07, 2010 3:07 am

Re: Sending device parameter names to controllers via API

Post by agent314 » Sun Mar 13, 2022 11:32 pm

I've taken a look at those before, but the are only for M4L tooling, correct?

As I understand it the M4L API itself can't talk to any Control Scripts etc. to serve up parameter names or values to a controller in a dynamic way a la the bluehand functionality

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

Re: Sending device parameter names to controllers via API

Post by chapelier fou » Mon Mar 14, 2022 7:00 am

It would be impossible since there is no standard do « display text in midi controllers ».
But in case of TouchOSC, sending text with [udpsend] will work but you’ll have to figure out how to display the strings in TouchOSC.
No idea how simple it is.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

agent314
Posts: 1458
Joined: Wed Apr 07, 2010 3:07 am

Re: Sending device parameter names to controllers via API

Post by agent314 » Mon Mar 14, 2022 9:33 pm

I understand there's no way to send text via MIDI since it's not a supported data type - that's where I'm hoping the Python API could come in.

I'm a little confused though, because the Python control scripts all just seem to be collections of class definitions, and I can't see anywhere that any class methods are actually called.

zsteinkamp
Posts: 11
Joined: Mon Apr 11, 2022 1:09 am

Re: Sending device parameter names to controllers via API

Post by zsteinkamp » Mon Apr 11, 2022 3:10 am

Check out my project that does just this.

https://github.com/zsteinkamp/m4l-zs-Knobbler3

I decided to use OSC to send the track/device/param name to TouchOSC. I also use OSC to send value updates (both from the computer to ipad and ipad to computer), since I got tired of wifi MIDI being so flaky. OSC works so much better.

Happy to talk more about this project!

I tried to make it easy to understand for someone looking at it (lots of comments in the patcher, bpatchers, and javascript code). I also went down first the sysex path, then looking at the Python API for control surfaces, but doing it with OSC has ended up being a bulletproof implementation. I use it every day.

For updating stuff in TouchOSC --
If you send TouchOSC a message like "/text1 Foobar", and there is a "text1" LABEL object in your TouchOSC layout that receives that OSC message, then that label will now read "Foobar".

agent314
Posts: 1458
Joined: Wed Apr 07, 2010 3:07 am

Re: Sending device parameter names to controllers via API

Post by agent314 » Fri Apr 29, 2022 5:48 am

Holy moly, at first glance this appears to be exactly what I am looking for!

Thank you for making and sharing this - eager to dig in

zsteinkamp
Posts: 11
Joined: Mon Apr 11, 2022 1:09 am

Re: Sending device parameter names to controllers via API

Post by zsteinkamp » Fri Apr 29, 2022 12:01 pm

Cool deal. :) Let me know how it goes, if you run into any trouble, etc.

Post Reply