How to match a dial value to the actual parameter value ?

Learn about building and using Max for Live devices.
Post Reply
chapelier fou
Posts: 6025
Joined: Mon May 15, 2006 12:15 pm

How to match a dial value to the actual parameter value ?

Post by chapelier fou » Sat Jan 12, 2019 10:40 pm

So here's an example :

I'm using live.remote~ to remotely control the Volume Attack of a Simpler.
Using the "tiny" graphical style and the raw value as output, the two knobs (the remote knob and the actual knob) always have the same graphical position.
But for the value displayed on the remote, that's tricky. Is this case, the min is 0.00ms and the max is 20s. With clearly an exponential curve so you can dial precise values in the small range. Setting the dial "exponent" attribute to 10 seem to get quite close, but not accurate.
Is there a way to know how to display the correct value ?
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

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

Re: How to match a dial value to the actual parameter value ?

Post by [jur] » Sat Jan 12, 2019 11:14 pm

I don't think so.
Ableton Forum Moderator

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: How to match a dial value to the actual parameter value ?

Post by hoffman2k » Sat Jan 12, 2019 11:18 pm

call str_for_value
Parameter: value [float] Returns: [symbol] String representation of the specified value.

call __str__
Returns: [symbol] String representation of the current parameter value.

A dial will always be at whatever range set when the device is saved. So you can show that string in any textbox, but not on the dial itself.

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

Re: How to match a dial value to the actual parameter value ?

Post by [jur] » Sun Jan 13, 2019 12:32 am

You're right Hoffman, but I feel like Chapelier's question is more about the (exponential) curve. Or maybe I'm misunderstanding something?
Ableton Forum Moderator

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

Re: How to match a dial value to the actual parameter value ?

Post by chapelier fou » Sun Jan 13, 2019 1:36 pm

Thank you ! That's quite helpful. Indeed, I'd rather find a formula that would give me the right value without having to query the parameter with the API, but I was not aware of this and that might lead me to a solution.
I'll see if I manage to make it work properly.
(And damn, calling the __str__ function is "private", that's the first time I encounter this, I feel privileged !)
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

Post Reply