Adjusting the dial range value automatically – possible?

Nov 12, 2011 at 11:50am

Adjusting the dial range value automatically – possible?

Hey everybody!

Just got started with M4L and I was wondering if there is a way to readjust the parameters of, say, a dial that i specify in the inspector (in my case the range) automatically.

By automatically i mean i have a number being put out somewhere to a number box and i want that number to be (at a certain bang) the highest possible value of my dial.

Might be a basic thing that i haven’t run across yet, but I kinda don’t know where to look. So if you just refer me to any source that i can search i would be very thankful, too.

Thanks a lot!

That’s it so far, have a nice day!
-K

#59968
Nov 12, 2011 at 12:42pm

hi kilombo
in max6 use attrui:

– Pasted Max Patch, click to expand. –

in max5:

– Pasted Max Patch, click to expand. –

hth
rob

#215898
Nov 12, 2011 at 1:41pm

wow, that was super quick!

it does really do the trick, thank you!

before, i only tried the live.dial objects, apparently they do not respond to this kind of message. but the other dials are just fine for me.

great forum guys.

cheers,
-K

#215899
Nov 13, 2011 at 11:13am

Sorry to bother you again, but it seems i DO need the live.dial object, b/c i can control those with my apc40 and the other ones aren’t eligible for midi control in live…

anyone know of a way to control the same thing only in a live.dial object? i tried the “size $1″ message, but to no avail.

any help much appreciated!

greets,
-K

#215900
Nov 13, 2011 at 11:17am

I checked the reference for the live.dial and there’s no such message… Can’t you access it using pattr ? (don’t know the apc way to access the dials)

#215901
Nov 13, 2011 at 12:44pm

I think [pattr] doesn’t work here because you need a GUI object for midi mapping.
But as a workaround you could use a live.numbox for midi mapping connected to the non-live dial.
Note that live.numbox can be made invisible by setting alpha=0 of the color attributes.

#215902
Nov 13, 2011 at 8:51pm

How about:

– Pasted Max Patch, click to expand. –

I’m not sure whether the range should be 0 to the size specified or 0 to the size minus 1. The dial behaves differently depending on whether or not the float output is set:

– Pasted Max Patch, click to expand. –
#215903
Nov 14, 2011 at 12:15am

Here’s that second patch in max 5:

– Pasted Max Patch, click to expand. –
#215904
Nov 14, 2011 at 2:52am

Or…

– Pasted Max Patch, click to expand. –
#215905
Nov 14, 2011 at 6:55am

@ kilombo : do you use midi mapping in live or does the apc rely on a script ? @ broc : if that’s the case, that’s a point…

#215906
Nov 14, 2011 at 8:28am

hey everybody!

thank you very much again for your help.

first: i am using midi mapping in live. thats why only the GUI objects work with the apc40. not sure if i can script when the apc is used in live and not “available” for max (is that the case?)

@ broc: the workaround with the numbox works great. my only little problem with this solution is that i have to pre-specify the maximum length possible in the numboxes beforehand, which can, in certain cases, differ greatly from the actual output number. this means that the dials will reach their top value long before the numboxes do, and i keep turning the knob on the apc causing the numbox to change value but without effect to the dials.

@lfjones: i had a quick look into your solution, it actually looks like exactly what i need, but i still need to check it out in action. will do so in a few hours, will keep you posted.

so far, thanks so much guys, you are great.

have a nice day,
-K

#215907
Nov 14, 2011 at 9:16am

Scale might be the trick. What about that ? Replace # with the CC number from the apc. If you don’t rely on a remote script but on midi mapping, it seems like a simple way to do it.

– Pasted Max Patch, click to expand. –

`

#215908
Nov 14, 2011 at 10:29am

Scale is most definitely the way forwards, if you want your dials to display the correct values then use a live.dial set to be tranparent with the colour and have it feed and ordinary dial underneath the transparent live.dial in presentation mode….

I seriously wouldn’t bother trying to read the encoders through the control surface for the APC40, there are so many things that flush them back to standard configuration that you have to have workaround after workaround….

The Device Control Encoders can be easily mapped if you lock your control surface to the device and choose between the 8 banks but the Track Control Encoders are a nightmare!!

Cheers
D

#215909
Nov 14, 2011 at 10:37am

Alright,

scale really seems to be the perfect solution, as i can have the live.dial directly controlled, which is a more ‘idiomatic’ way for me as a live user or possible other live users. Wanting to readjust the range of the dial was a presumption that i didn’t question enough, i guess :)
I have to get used to the idea of thinking everything through in many different ways on different levels without getting stuck on one way and then wrenching everything to fit. I am still quite new to this, so every comment of the above was of great help to get used to the program.

Thanks again. this program is so much fun, especially when i don’t have to learn it by myself :)

Cheers everybody,
-K

#215910

You must be logged in to reply to this topic.