Forums > MaxMSP

Sizing Buffer~

May 22, 2009 | 7:30 am

Perhaps I just don’t understand the size message but for some reason I can’t change the size of my buffers without clearing the sound file from the buffer. I’ve tried sending the message to an empty buffer but I still get the original size when I query it with info~. Any clarification would be appreciated.


May 22, 2009 | 11:15 am

I’ve set up the empty buffer scenario you mention and it works fine at this end (‘size 500′ into buffer~, bang to info~ reports 500, and ‘size 1000′ reports 1000).

Do you have a patch we can check out?


May 22, 2009 | 5:47 pm

I’m sorry, I wasn’t clear. I’m trying to resize the buffer~ that has a soundfile loaded. When I do this, the file is cleared. How do I resize the buffer~ without clearing the sound file?


May 22, 2009 | 5:57 pm

You could reload the file with ‘read’ after sending the ‘size’ message using comma formatting. What exactly are you trying to do with this process?


May 23, 2009 | 3:32 pm

If you load your file using the message "replace" you don’t need the message "size", it changes the buffer’s size according the size of the sound file.
Hoping that helps.
regards


May 24, 2009 | 7:31 am
Sub Avian Flow wrote on Fri, 22 May 2009 19:47
I’m sorry, I wasn’t clear. I’m trying to resize the buffer~ that has a soundfile loaded. When I do this, the file is cleared. How do I resize the buffer~ without clearing the sound file?

You can use the crop message of the waveform~ object which basically does all the copying necessary to do this. Another option is with mxj bufop… You actually have to recopy the sound into a buffer of the correct size…

Stefan


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