Quantized values in function object?

oivindi's icon

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.?

Tim Lloyd's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

oivindi's icon

Thanks for the tip!

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

Roman Thilenius's icon

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

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

.

oivindi's icon

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.