Forums > MaxMSP

how get range the range of an object?

February 9, 2009 | 3:42 pm

hi,
how could I get the range of an object?
for example the min and max of a float-box I’ve set

thx,
johann


February 9, 2009 | 4:07 pm


February 9, 2009 | 4:13 pm

As far as i know, not possible once you entered the minimum or maximum into a [flonum]. You can of course make something to store these someplace else. May get annoying when you have a lot of gui elements though:

– Pasted Max Patch, click to expand. –

February 9, 2009 | 4:26 pm

big thx,
the bindto solution works fine, unfortunetally in my case I can’t create two pattr for each of my params (would be too much).
Perhaps someone has a simple little javascript, that reports the min and max of certain scripting-named-object?

greats,
johann


February 9, 2009 | 4:39 pm

No problem!

lh

– Pasted Max Patch, click to expand. –

// getrange.js

function getrange(objname)
{
myobj = this.patcher.getnamed(objname);
var min = myobj.getattr("minimum");
var max = myobj.getattr("maximum");
outlet(0, min, max);
}

// EOF


February 9, 2009 | 4:43 pm

great, that’s it!
big thx!


February 14, 2009 | 7:57 am


Viewing 7 posts - 1 through 7 (of 7 total)