Forums > MaxMSP

weird behaviour with scale object/incoming data

January 21, 2013 | 4:05 pm

Hello

I am getting out-of-bound results when using the scale object. I take data from the net and they have to be scaled but for some reason the result is out of the limits. I am copying here the scale part (the whole patch is for too big and requires installing some Java objects)

When doing a forced update of the data (a forced bang). I get a good result. Something weird happening?

– Pasted Max Patch, click to expand. –

January 21, 2013 | 6:21 pm

you’re setting a high and a low. If you’re getting data that’s outside the bounds that means the price hits a year low or a year high, right?

What I’d do is feed it through, compare it to the year high and year low, and then update this before scaling – that way it will adjust properly.

Alternatively, just clip using zmap instead of scale?


January 22, 2013 | 3:50 pm

It seems that when I update the data, the dayprice comes in but the yearlow and yearhigh are delayed. As such, the dayprice is compared to the wring limites and gets out of bounds. I have tested with the pack object to see how fast the data come in but they always come in late and hence I get wrong results. Using pipe I cannot solve this so as it seems. Any suggestions?


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