buffer ignores number of channels?

Mar 27, 2008 at 6:58am

buffer ignores number of channels?

In the patch below, if I first load a stereo file, and then examine
the buffer (double click), I _see a stereo file.
If I then load a mono file, I see a mono file.
But if I then load a stereo file again, it’s only loading one channel.
Same thing if I use the read message to open a stereo file – only one
channel loads.

Is there a way to force the buffer to load the right number of channels?

thanks

David

max v2;
#N vpatcher 22 53 1153 609;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 125 239 30 196617 read;
#P newex 60 187 37 196617 zl rev;
#P newex 60 217 68 196617 prepend read;
#P window setfont “Sans Serif” 10.;
#P message 60 85 32 196618 open;
#P newex 60 149 74 196618 pack i -1 0 s;
#P newex 60 118 79 196618 sfinfo~;
#P window setfont “Sans Serif” 9.;
#P newex 60 271 107 196617 buffer~ test 1000. 2;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 0 0;
#P connect 6 0 0 0;
#P connect 1 5 2 3;
#P pop;

#36548
Apr 1, 2008 at 12:43pm

David Stevens schrieb:
> Is there a way to force the buffer to load the right number of channels?

look at the replace message…


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#125510
Apr 1, 2008 at 6:56pm

On 1 Apr 2008, at 13:43, Stefan Tiedje wrote:
>
> David Stevens schrieb:
>> Is there a way to force the buffer to load the right number of
>> channels?
>
> look at the replace message…
>
> —

That’s what I started with. I changed to [read] with the thought that
it would behave better. Anyway, I just tried again with replace, and
buffer is still remaining as one channel after loading in a mono file
and then loading a stereo file.
Let me be clear -
start with 2 channel buffer – load in mono file – buffer becomes
single channel
load in stereo file – buffer remains single channel (at least as
tested by double clicking on the buffer~ object to open the viewing
window.
Here’s the patch I’m testing with…

max v2;
#N vpatcher 11 59 627 527;
#P window setfont “Sans Serif” 10.;
#P window linecount 8;
#P message 9 23 355 196618 1a. Load stereo file 1b. double click
buffer~ to see channels 2a. Load mono file. 2b. double click buffer~.
You see a single track 3a. Load a stereo file 3b. double click
buffer~. Only a sibgle track is displayed (and loaded?);
#P window linecount 1;
#P message 186 310 133 196618 read forest1a 0 -1 2;
#P newex 185 287 66 196618 prepend set;
#P newex 49 257 73 196618 prepend read;
#P message 49 144 32 196618 open;
#P newex 49 227 39 196618 zl rev;
#P newex 49 198 74 196618 pack i -1 0 s;
#P newex 49 169 79 196618 sfinfo~;
#P newex 403 100 51 196618 loadbang;
#P message 404 155 66 196618 name test 2;
#P message 403 126 66 196618 name test 1;
#P window setfont “Sans Serif” 9.;
#P user waveform~ 142 196 202 45 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P user waveform~ 143 149 202 45 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P window setfont “Sans Serif” 10.;
#P newex 49 288 110 196618 buffer~ test 5000 2;
#P connect 9 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 10 0;
#P connect 10 0 0 0;
#P connect 6 5 7 3;
#P fasten 4 0 2 0 409 195 147 195;
#P fasten 3 0 1 0 408 146 148 146;
#P fasten 10 0 11 0 54 283 190 283;
#P connect 11 0 12 0;
#P connect 1 5 2 4;
#P connect 5 0 3 0;
#P connect 5 0 4 0;
#P pop;

>

#125511
Jun 15, 2008 at 5:32pm

Hello,

When using read messages giving size & number of channels to read (as documented in buffer~.help), buffer seems to have a bug indeed (Max 4.6.3 or Max 5, OSX.5.3 Intel).

Solution is to use a replace message with no argument.
But you can only open all channels…

Nicolas

max v2;
#N vpatcher 5 104 363 417;
#P window setfont “Sans Serif” 9.;
#P newex 18 223 81 196617 prepend replace;
#P window setfont “Sans Serif” 18.;
#P comment 95 119 98 196626 Drop Zone;
#P window setfont “Sans Serif” 9.;
#P newex 18 25 93 196617 loadmess border 1;
#P newex 18 256 44 196617 buffer~;
#P user dropfile 18 49 290 208 1;
#P connect 2 0 0 0;
#P connect 0 0 4 0;
#P connect 4 0 1 0;
#P pop;

Quote: david stevens wrote on Tue, 01 April 2008 20:56
—————————————————-
> start with 2 channel buffer – load in mono file – buffer becomes single channel – load in stereo file – buffer remains single channel

#125512

You must be logged in to reply to this topic.