Forums > MaxMSP

buffer info mono or stereo

June 6, 2007 | 5:15 pm

hello,
how can i get an info from a buffer about the number of channels of the latest uploaded audio file.
im using a stereo play~ object. when im loading a mono file to the buffer only the first channel of play~ is playing , and i want to automatically send the output also to the second channel.
info~ doesn’t give number of channels information
any suggestion?
tnx,
/. g


June 6, 2007 | 5:57 pm

On 6 juin 07, at 19:15, giori Politi wrote:

> how can i get an info from a buffer about the number of channels of
> the latest uploaded audio file.
> im using a stereo play~ object. when im loading a mono file to the
> buffer only the first channel of play~ is playing , and i want to
> automatically send the output also to the second channel.
> info~ doesn’t give number of channels information

you can use sfinfo~, or even better send the getChannels message to
"mxj buf.Op".

ej


November 22, 2010 | 5:37 pm

Is there a way to copy 1 channel of a buffer to the other channel of the same buffer with buf.Op?

I’m currently working with stereo buffers and playback, so I would like to duplicate the mono channel, prefereably without any uzi’ing. I had a little go with ‘copyFrom buffer 1′ and ‘copyInto buffer 2′ but I don’t think you can reference channels like that?


November 23, 2010 | 12:53 pm

bamp


November 23, 2010 | 4:59 pm

how about something like this ?

– Pasted Max Patch, click to expand. –

November 23, 2010 | 5:22 pm

I’m using that method at the moment, but its in a poly so thats 16 selectorz~ that I don’t really need. I guess it’ll do for now.


November 27, 2010 | 7:33 pm

Are two *~ cheap enough? If play~ could do it on its own it would cost the same I guess:

– Pasted Max Patch, click to expand. –

November 27, 2010 | 10:32 pm

A single multiplication would do it as well of course:

– Pasted Max Patch, click to expand. –

December 13, 2010 | 10:08 pm

Thanks Stefan, I ended up using the single multiplication solution


November 28, 2012 | 7:11 pm

Hello old thread,

Looks like I have the same problem.

Can I copy a mono buffer in to a separate stereo buffer with mxj buf.Op?

Is it a case of something I’ve missed in the helpfile, or will some extra Java be needed?


May 23, 2013 | 3:31 am

Anyone?

I have two buffers, the playback buffer should always be stereo, and the source buffer can be mono or stereo.

I have the condition: if source buffer is mono, copy source buffer to both playback buffer channels.

I don’t understand how to do this with mxj buf.OP. When I use the "copyFrom" and the source buffer is mono, it appears to be copied to both channels (see attached). Peek~ appears to show that the mono sample has been copied to both channels (also attached). However when I come to play the audio, it is only coming from one channel.

Peek~ and Poke~ are too slow, and beachball when used with uzi, so they are out of the proverbial window. I also can’t afford more signal objects at the processing stage.

Attachments:
  1. Screen-Shot-2013-05-23-at-11.10.17
  2. Screen-Shot-2013-05-23-at-11.19.47

May 24, 2013 | 12:43 pm

Hello Mike! At first i want you to know you are not alone…
If you use max 5 the code below should do the job…
But with max 6 the buffer~ is unfortunately VERY buggy..
So the same code doesn t work in max 6 and sometimes even crashes max.
At least you can copy a mono buffer to stereo and convert the mono file to stereo.
I have contact with cycling 74 and they told me that they know about it
and they work to find a solution (but is not easy for some reasons).

<code>

– Pasted Max Patch, click to expand. –

</code>


May 24, 2013 | 1:15 pm

That looks great!

I’m working on Max 5 so this won’t be a problem.

Thanks a lot :D


November 11, 2013 | 2:50 pm

as for the Max 6 users ,its a cute discovery that the [polybuffer] once set to 2 channels will open mono files automatically in both channels . this is very very helpful !


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