searching for a device displaying parameter value & name

Questions and discussion about building and using Max for Live devices
Post Reply
bobavenger
Posts: 28
Joined: Sat Oct 11, 2014 10:44 am

searching for a device displaying parameter value & name

Post by bobavenger » Wed Apr 21, 2021 11:28 am

Hi there,

I'm searching for a m4l device that pop up a window displaying parameter's value (& name), each time I turn a knob,
just for a few second and then auto-close

ex : " Filter Frequency 2.46 kHz "

I'm able to make it appear in the status bar with a python script, but that's too small, I want a bigger window , so when I'm on my controller I can do fine parameter adjusting

does it exist? or someone can help me to program it?

Patrick_K
Posts: 10
Joined: Wed Apr 14, 2021 10:52 pm

Re: searching for a device displaying parameter value & name

Post by Patrick_K » Sat Apr 24, 2021 12:44 am

I looked through the LOM for Max 8 last night, and I don't see anything that would let you observe changes in parameter values across all devices, or ever within one device. You have to set a live.observer module to monitor an individual, specified parameter... meaning you'd need a bank of dozens of observers that were dynamically re-assigned to the full range of parameters possible for whichever device is currently selected.

This seems very messy. There's got to be a simpler method without resorting to Python within M4L... but needless to say there isn't a 1:1 relationship between what is addressable via python scripts vs. what max can access via the LOM.

Also, I'm no expert on this aspect of the LOM. Anyone that wants to chime in to correct/illuminate, please do.

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

Re: searching for a device displaying parameter value & name

Post by chapelier fou » Sat Apr 24, 2021 5:59 am

Observe the path live_set selected_parameter
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

bobavenger
Posts: 28
Joined: Sat Oct 11, 2014 10:44 am

Re: searching for a device displaying parameter value & name

Post by bobavenger » Sat Apr 24, 2021 8:03 am

I've found the grab_midi function
so I've make a try with it (and copy&paste from other's patches)
https://cycling74.com/forums/searching- ... 3a1d65703d

it looks like what I need, but there's some problems :
I don't need forwarding buttons, only encoders and it doesn't work for all of them (the ones that are connect_to in the script, for example to volumes)
so I think the best would be to send the messages (strings) from the python script to the max device,
do you knows how to do that? how max can receive a string?

pottering
Posts: 1312
Joined: Sat Dec 06, 2014 4:41 am

Re: searching for a device displaying parameter value & name

Post by pottering » Sat Apr 24, 2021 8:30 am

I just made one, scavenging parts from several places.

https://www.dropbox.com/s/yduirx0kdh2fd ... .amxd?dl=0

First part was this tutorial, found via google, which shows the API part for selected controls, I just copied it (but connecting live.thisdevice directly into the "path live_set..." message instead of that JS thing on the right):

https://www.youtube.com/watch?v=z3IG17LfiG4

Second part was copy-pasted straight from the live.observer's Help, used it with almost no modifications, it handles the "real-time monitoring" of the parameter.

Third was from this device from NoIsYs found in maxforlive.com which showed me the basics of how to get the parameter name.

http://maxforlive.com/library/device/47 ... eter-names

Fourth part was basically googling how to make a popup window, took some time, but was not as hard as I thought, after I realized I could put just put inputs in the sub-patcher instead of having multiple copies of stuff.

Fifth was trying to get the parameter's GUI values, after I noticed it showed floating point for all parameters, was only partially successful in this, seems many knobs (especially %) are way more precise than the GUI number. Well, basically most knobs will show just the more precise floating point numbers, for better or for worse.

EDIT: Oh, sh*t you want for MIDI controllers? Not sure that is possible without touch-sensitive knobs, like Push. But otherwise the logic should be similar, live.path gets the ID, live.observer can monitor that ID real time.
Last edited by pottering on Sat Apr 24, 2021 8:19 pm, edited 1 time in total.

bobavenger
Posts: 28
Joined: Sat Oct 11, 2014 10:44 am

Re: searching for a device displaying parameter value & name

Post by bobavenger » Sat Apr 24, 2021 9:07 am

oh thanks for the move,
& yes that was for midi controls (sorry for not being enough clear about my request)
so the selected_parameter is no the soluce here, as we can't select a parameter with the live API

I'll try to find a way to receive a message from the python script with the max device..

to be more explicit, with my python script I can get the parameter connected the currently moving encoder, with his name & value.
and then I can forward that midi value to a dumb parameter of the max device, that will forward it to the floating window.

but maybe it's possible to directly send the name & value as a string inside the max device? (without the dumb parameter & the value unit corresponding to parameter unit (Hz, %, ...)rather than 0-127)

Patrick_K
Posts: 10
Joined: Wed Apr 14, 2021 10:52 pm

Re: searching for a device displaying parameter value & name

Post by Patrick_K » Sat Apr 24, 2021 5:41 pm

chapelier fou wrote:
Sat Apr 24, 2021 5:59 am
Observe the path live_set selected_parameter
I tried that first, but parameters can be adjusted via control surface w/o being selected.

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

Re: searching for a device displaying parameter value & name

Post by chapelier fou » Sat Apr 24, 2021 7:51 pm

Patrick_K wrote:
Sat Apr 24, 2021 5:41 pm
chapelier fou wrote:
Sat Apr 24, 2021 5:59 am
Observe the path live_set selected_parameter
I tried that first, but parameters can be adjusted via control surface w/o being selected.
Ok...didn't understand (either) that it has to react to parameters changed by MIDI (but this makes all the sense, now that I think of it).
Interesting problem. Not sure there is a solution.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

pottering
Posts: 1312
Joined: Sat Dec 06, 2014 4:41 am

Re: searching for a device displaying parameter value & name

Post by pottering » Sun Apr 25, 2021 2:35 am

This video implies it could be possible, but with the MaxForLive script:

https://www.youtube.com/watch?v=NFKfph2nv4k

https://cycling74.com/forums/using-m4l- ... chpadapc40

Patrick_K
Posts: 10
Joined: Wed Apr 14, 2021 10:52 pm

Re: searching for a device displaying parameter value & name

Post by Patrick_K » Sun Apr 25, 2021 6:32 pm

It's possible, it's just that the only way I know to pull it off purely through M4L is inelegant under-the-hood... but I went ahead and brute-forced it for y'all anyway.

Since this forum doesn't support attachments, I uploaded it on the other thread:

https://cycling74.com/forums/searching- ... 3a1d65703d

I did this in Live 11/Max 8.1.9, so if anyone needs it down-converted to earlier version, I might be able to pull that off... I think.

If someone can give it a whirl and see if this meets bobavenger's need, that would be much appreciated. If I'm off-target, or it's causing any noticeable CPU drag, please speak up.

bobavenger
Posts: 28
Joined: Sat Oct 11, 2014 10:44 am

Re: searching for a device displaying parameter value & name

Post by bobavenger » Sun Apr 25, 2021 9:37 pm

thanks Patrick for the move, and no your device doesn't charge my cpu more
but it's less effective than the patch that I previously posted, e.g for a macro that is connected to several parameters, it'll shows all of them instantly, and so we see only the last one on the screen and not the macro's value itself.
also it look likes it work only for the track where the device is, and not for volume, sends, etc , not for all parameter
but I haven't read the patch itself, how it works

I've made an another patch https://cycling74.com/forums/searching- ... 3a71b73932
it's just a hidden dial that receive message from my control surface script and then show up to the floating window
(I've added some side listener in the control surface script, only for the encoders, to sends value directly to the hidden dial)
but a dial can only receive 0 to 127 values
is there a max device parameter that can receive string, text?
that's the only thing that miss to my needs

and thanks Pottering for the links, I'll look at it

Patrick_K
Posts: 10
Joined: Wed Apr 14, 2021 10:52 pm

Re: searching for a device displaying parameter value & name

Post by Patrick_K » Sun Apr 25, 2021 9:53 pm

bobavenger wrote:
Sun Apr 25, 2021 9:37 pm

is there a max device parameter that can receive string, text?
that's the only thing that miss to my needs

Receive string text from where? A basic message object can display any text you want, but I don't think that's what you're after. I don't have any of the control scripts you speak of, so we're just kind of flying blind.

Thanks for taking a look at what I put together. Yes, at the moment it's limited to just the track it's on, and just the currently selected device. That can be changed/expanded, but it sounds like it's a moot point either way. I was just showing how one could display parameter name and value in real time for whatever control was currently being adjusted by a control surface, without having to tell M4L, ahead of time, which control you were adjusting... that's it. You turn a knob mapped to a device parameter, that parameter name and value displays on the screen as you adjust, then it goes away 2 seconds after you stop.

If you're close with the latest patch you put together, keep at it, and best of luck!
Last edited by Patrick_K on Sun Apr 25, 2021 11:32 pm, edited 1 time in total.

OmerOki
Posts: 1
Joined: Sun Apr 25, 2021 10:20 pm

Re: searching for a device displaying parameter value & name

Post by OmerOki » Sun Apr 25, 2021 10:26 pm

Is this somehow related to stoermelder packOne in VCV? :wink:

Post Reply