Forums > MaxMSP

buffer~ with variable length

December 7, 2009 | 2:58 pm

I making a patch, where a part of it is loading samples from the hard drive to the buffer~. This is supposed to work for stereo samples of a variable length, so the buffer~ changes length, according to the samples being loaded in.

I’ve red the tutorials and searched the forums – but can’t find a solution to exactly this one. How do I do that?

I really need this to get on – so help would be really, really appreciated! :-)

Here is the important part of my patch:

– Pasted Max Patch, click to expand. –

December 7, 2009 | 3:15 pm

Use "replace" instead of the "read" message. It automatically resizes the [buffer~] to fit the length of the new file. Have a look in the [buffer~] object reference for more details.


December 8, 2009 | 1:25 pm

Thank you so very, very much! Just what I needed! :-) Thanx!

December 8, 2009 | 2:05 pm

By the way – is there a way to get length info of a file loaded into the [buffer~]?

I really need this as well to get my patch up and running! :-)

December 8, 2009 | 3:14 pm

The help files that are available for every Max object have a pull-down See Also menu in the lower right that lists objects that are similar or work with the object whose help file you’re looking at. You’ll notice that the buffer~ help file’s pull-down includes the object called info~ that you might find useful. This is often a good place to check for answers to your questions, as well as a way to discover Max objects you may not know about.

December 8, 2009 | 4:45 pm

You’re right Gregory. So I wonder why poke~ disappeared from the buffer~‘s See Also: section…


December 8, 2009 | 8:41 pm

interesting question. I think it should return, and I’m in a position to fix it. :-)

December 16, 2009 | 1:20 pm

Thank you very very much!

I’ll take a closer look around next time :-)

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