Quantized values in function object?

Nov 21, 2009 at 11:40am

Quantized values in function object?

Let’s say I have function object set to contain values from “-12 to 12″.

Is there any way that I can make sure changes that are drawn in functions are “quantized” to ints? Since functions uses float values?

So that the points drawn are only “1″, “-4″, “5″ etc.?

#46560
Nov 21, 2009 at 12:57pm

This kind of works. Or you can have a look at ej.function.js which has a snap to grid feature built in.

http://www.e–j.com/?page_id=42

– Pasted Max Patch, click to expand. –
#167542
Nov 21, 2009 at 4:37pm

Thanks for the tip!

ej.function.js looks great, amazing the things it can do in addition to quantize.

#167543
Nov 21, 2009 at 4:45pm

it should be enough to just round the output to int, no?

edit: (i should try to read posts before i answer)

.

#167544
Nov 21, 2009 at 4:57pm

That’s the solution I was going for when I got hint of es.function, I’m just struggling to reflect the int change back into the (drawn) function curve. I’m not an expert on this, but I think I’ll (try to) finish it for the sake of it.

Then I’ll go on to es.function. Wink

#167545

You must be logged in to reply to this topic.