buffer~ with variable length

Mr. M's icon

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! :-)

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

-----
Here is the important part of my patch:

Luke Hall's icon

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.

lh

Mr. M's icon

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

Mr. M's icon

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! :-)

Gregory Taylor's icon

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.

pdelges's icon

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

p

Gregory Taylor's icon

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

Mr. M's icon

Thank you very very much!

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