Forums > Dev

Programmatically set number of channels in buffer~

June 14, 2011 | 12:56 pm

Is there any way to set the number of channels in a buffer~ object from another object – either a max method or another (safe) method is fine. I am resizing the buffer~ at the same time.

Thanks

Alex


June 14, 2011 | 1:20 pm

Unlike what the reference says… (which is already fixed), the size message can be also use to change the number of channels (1, 2 or 4):

– Pasted Max Patch, click to expand. –

June 14, 2011 | 1:20 pm

Unlike what the reference says… (which is already fixed), the size message can be also use to change the number of channels (1, 2 or 4):

– Pasted Max Patch, click to expand. –

June 14, 2011 | 1:23 pm

Hi EJ. Thanks. I should have said I’m interested in resizing the buffer in samples. This sort of seems to work, but seems like the display doesn’t catch up properly..

– Pasted Max Patch, click to expand. –

June 14, 2011 | 1:23 pm

Hi EJ. Thanks. I should have said I’m interested in resizing the buffer in samples. This sort of seems to work, but seems like the display doesn’t catch up properly..

– Pasted Max Patch, click to expand. –

June 14, 2011 | 2:12 pm

RIght. I can confirm the issue. the sizeinsamps doesn’t refresh the buffer window. size works fine though in the meantime. It has been fixed for the next incremental.


June 14, 2011 | 2:12 pm

RIght. I can confirm the issue. the sizeinsamps doesn’t refresh the buffer window. size works fine though in the meantime. It has been fixed for the next incremental.


June 16, 2011 | 9:30 am

nice coincidence: I am also busy with a c external today which changes the content and number of channels of buffers (in a seperate thread)

it works fine, changes and loads the channels correctly, though the waveform~ which appears when you doubleclick the buffer~ is not correctly updated:
-if it was 1 channel and now is 2 channels it will only display the left channel
-if it was 2 channels and now is 1 channel it will display the left channel twice

I do see that it responds on my ‘dirty’ message that I send to the maxobject and I properly set the b_oldnchans, is there something else I should do to ensure a proper waveform~ update?


June 16, 2011 | 9:30 am

nice coincidence: I am also busy with a c external today which changes the content and number of channels of buffers (in a seperate thread)

it works fine, changes and loads the channels correctly, though the waveform~ which appears when you doubleclick the buffer~ is not correctly updated:
-if it was 1 channel and now is 2 channels it will only display the left channel
-if it was 2 channels and now is 1 channel it will display the left channel twice

I do see that it responds on my ‘dirty’ message that I send to the maxobject and I properly set the b_oldnchans, is there something else I should do to ensure a proper waveform~ update?


June 22, 2011 | 3:18 pm

EJ, did you also correct the reference for sizeinsamps?

BTW, when I try to create a size message thru the contextual menu of buffer~ leftmost inlet, I get a sendbox size $1 $2 message!

p


June 22, 2011 | 3:18 pm

EJ, did you also correct the reference for sizeinsamps?

BTW, when I try to create a size message thru the contextual menu of buffer~ leftmost inlet, I get a sendbox size $1 $2 message!

p


June 23, 2011 | 5:36 pm

Thanks for the report, Patrick. I’ve fixed the size/sendbox thing for a future version of Max.

Cheers,
Tim


June 23, 2011 | 5:36 pm

Thanks for the report, Patrick. I’ve fixed the size/sendbox thing for a future version of Max.

Cheers,
Tim


June 23, 2011 | 5:40 pm

so?… how do you properly change and update the channels?


June 23, 2011 | 5:40 pm

so?… how do you properly change and update the channels?


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