Sending device parameter names to controllers via API
Sending device parameter names to controllers via API
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.
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.
Re: Sending device parameter names to controllers via API
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.
Then I guess you'll have to look into the [udpsend] object to send via OSC those to your controller.
Ableton Forum Moderator
Re: Sending device parameter names to controllers via API
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
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
-
- Posts: 6025
- Joined: Mon May 15, 2006 12:15 pm
Re: Sending device parameter names to controllers via API
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.
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
MacStudio M1Max 32Go OS 12.3.1
Re: Sending device parameter names to controllers via API
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.
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.
-
- Posts: 11
- Joined: Mon Apr 11, 2022 1:09 am
Re: Sending device parameter names to controllers via API
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".
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".
Re: Sending device parameter names to controllers via API
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
Thank you for making and sharing this - eager to dig in
-
- Posts: 11
- Joined: Mon Apr 11, 2022 1:09 am
Re: Sending device parameter names to controllers via API
Cool deal. Let me know how it goes, if you run into any trouble, etc.