weird behaviour with scale object/incoming data

Thinksamuel's icon

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)

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

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

Wetterberg's icon

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?

Thinksamuel's icon

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?