Forums > MaxMSP

System for automatically resizing buffer~ following read

Jun 24 2011 | 1:53 pm

Hi all,

I’m building a sample player which is going to be part of a generative soundscape mixer. Now, if you do not define a size for buffer~ then load a file into it (using the read message) it automatically sets the buffer to the size of the file. This is great, but if you then load another sound of a different length the buffer size does not change.

Is there a simple way of having buffer~ adapt it’s size to whatever sound you load into it?

I’ve checked out the system used in X-player, but it seems very complicated and I don’t quite understand it.

Any thoughts appreciated.

Jun 24 2011 | 2:00 pm

The obvious answer is to use the (replace) message to [buffer~] instead of (read) – if this is not what you need, this forum is filled with threads on related topics, so have a search……

and this just popped up recently too:


Jun 24 2011 | 2:09 pm

Hi Brendan,

Thats just the ticket. Guess I should have read the reference before posting this…

Many thanks,


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

Forums > MaxMSP