buffer info mono or stereo

Jun 6, 2007 at 5:15pm

buffer info mono or stereo

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

#32298
Jun 6, 2007 at 5:57pm

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

#106003
Nov 22, 2010 at 5:37pm

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?

#106004
Nov 23, 2010 at 12:53pm

bamp

#106005
Nov 23, 2010 at 4:59pm

how about something like this ?

– Pasted Max Patch, click to expand. –
#106006
Nov 23, 2010 at 5:22pm

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.

#106007
Nov 27, 2010 at 7:33pm

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. –
#106008
Nov 27, 2010 at 10:32pm

A single multiplication would do it as well of course:

– Pasted Max Patch, click to expand. –
#106009
Dec 13, 2010 at 10:08pm

Thanks Stefan, I ended up using the single multiplication solution

#106010
Nov 28, 2012 at 7:11pm

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?

#106011
May 23, 2013 at 3:31am

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
#250406
May 24, 2013 at 12:43pm

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>

#250625
May 24, 2013 at 1:15pm

That looks great!

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

Thanks a lot :D

#250628
Nov 11, 2013 at 2:50pm

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 !

#270839

You must be logged in to reply to this topic.