Programmatically set number of channels in buffer~

Jun 14, 2011 at 12:56pm

Programmatically set number of channels in buffer~

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

#57599
Jun 14, 2011 at 1:20pm

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. –
#206420
Jun 14, 2011 at 1:20pm

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. –
#206470
Jun 14, 2011 at 1:23pm

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. –
#206421
Jun 14, 2011 at 1:23pm

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. –
#206471
Jun 14, 2011 at 2:12pm

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.

#206422
Jun 14, 2011 at 2:12pm

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.

#206472
Jun 16, 2011 at 9:30am

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?

#206423
Jun 16, 2011 at 9:30am

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?

#206473
Jun 22, 2011 at 3:18pm

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

#206424
Jun 22, 2011 at 3:18pm

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

#206474
Jun 23, 2011 at 5:36pm

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

Cheers,
Tim

#206425
Jun 23, 2011 at 5:36pm

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

Cheers,
Tim

#206475
Jun 23, 2011 at 5:40pm

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

#206426
Jun 23, 2011 at 5:40pm

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

#206476

You must be logged in to reply to this topic.