Forums > MaxMSP

Create a Look Up Table and retrieve values quickly.

March 14, 2012 | 12:02 pm

I’m confused so I apologize if anything I’m about to say is unclear.

I want to create a lookup table where the x axis represents time and I wish the resolution to be quite high, say sample rate. In total the maximum size would be 8 minutes.

The y values are determined by a function regarding some incoming values. So typically I would wish to write the same y value over a range of 5 seconds. Then a new y value over the next n seconds and so on.

If I use a buffer to do this then do I have to write the values in real time? So writing the buffer could take 8 minutes? Or is there a way of connecting the dots (two points) when writing to a buffer

What I essentially want to do is the equivalent of creating a (dynamic) number of split objects with (dynamic) values. If the incoming value is within range it triggers a preset value. I guess I could do this with javascript but I want the retrieval to be as quick as possible so not sure if going through 50 split objects is a good idea.

Like I said I’m in a bit of a tangle so any help would be great!


March 14, 2012 | 2:09 pm

It would be possible to write values into a buffer~ using peek~, typically using an uzi. This is not very efficient however. Do you want to read out values in the signal domain? The function object could be used for a non signal version, probably zigzag~ would be easiest for signal domain.

– Pasted Max Patch, click to expand. –

March 14, 2012 | 2:29 pm

Function is absolutely perfect for my needs.

I haven’t come across it before.

Thanks you just made my day a lot better!


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