XML Feeds

.

[maxmsp] buffer ignores number of channels?

David Stevens davidestevens at mac.com
Tue Apr 1 12:56:53 MDT 2008


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;

>


More information about the maxmsp mailing list