Forums > MaxMSP

Creating a Patch That Bounces Audio Files


July 5, 2007 | 7:29 am

Let’s say one had four buffers playing simultaneously and wanted to bounce them to a single buffer, how would one go about doing that? I played around for 20min with the poke~, index~ and uzi objects. Here’s my failed attempt at bouncing only one buffer, perhaps you can spot my flaw.

#P window setfont "Sans Serif" 9.;
#P flonum 409 92 80 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 408 157 75 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 325 189 66 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 236 60 15 0;
#P window linecount 1;
#P newex 350 128 66 196617 mstosamps~;
#P newex 259 94 105 196617 info~ one;
#P user ezdac~ 217 353 261 386 0;
#P message 111 185 14 196617 0;
#P newex 130 183 29 196617 sig~;
#P flonum 130 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 130 205 65 196617 groove~ one;
#P message 458 202 14 196617 0;
#P newex 477 200 29 196617 sig~;
#P flonum 477 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 477 222 67 196617 groove~ two;
#P message 49 241 30 196617 read;
#P newex 236 204 29 196617 sig~;
#P newex 236 171 40 196617 uzi;
#P newex 330 236 106 196617 buffer~ two 30000 1;
#P newex 236 225 58 196617 index~ one;
#P newex 236 265 65 196617 poke~ two 1;
#P newex 48 270 104 196617 buffer~ one 30000 1;
#P connect 6 0 0 0;
#P connect 12 0 13 0;
#P fasten 14 0 11 0 116 205;
#P connect 13 0 11 0;
#P connect 7 0 15 0;
#P connect 11 0 15 0;
#P connect 18 0 4 0;
#P fasten 4 2 5 0 271 195 241 195;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 7 0 15 1;
#P connect 11 0 15 1;
#P fasten 18 0 16 0 241 81 264 81;
#P fasten 4 2 1 1 271 194 302 194 302 249 268 249;
#P connect 17 1 4 1;
#P fasten 4 2 19 0 271 194 305 194 305 183 330 183;
#P connect 16 6 17 0;
#P connect 17 1 20 0;
#P fasten 16 6 21 0 342 118 390 118 390 84 414 84;
#P connect 8 0 9 0;
#P fasten 10 0 7 0 463 221 482 221;
#P connect 9 0 7 0;
#P window clipboard copycount 22;

July 5, 2007 | 8:53 am

July 5, 2007 | 10:54 am

Do you mean taking what’s currently playing in all 4 buffers and putting that into a new one? If so, can’t you just use groove~ for all 4 (or however many you want), put the output signals all into a single pair of L / R gainfaders, then into a record~ for a new buffer?

Unless I’m misunderstanding…

It would be nice for some more copy/paste/merge options like one has in audio editors, but that’ll have to be built I guess. For bouncing, though, you can readily take any signal (or combination of signals) and record any length of these into a new buffer~.

–CJ

July 5, 2007 | 11:50 am

I guess for non-real time bouncing the easiest thing would be to use an
external like csound~:
Automatically save the buffers as sound-files (maybe with some generic name
into a temp folder), then send csound the name of these sound-files and have
an instrument with four players that bounces them into one file (with a
render to disk command). It would be quicker than playing through everything
in real-time in max/msp.
Peiman

On 05/07/07, Seejay James wrote:
>
>
> Do you mean taking what’s currently playing in all 4 buffers and putting
> that into a new one? If so, can’t you just use groove~ for all 4 (or however
> many you want), put the output signals all into a single pair of L / R
> gainfaders, then into a record~ for a new buffer?
>
> Unless I’m misunderstanding…
>
> It would be nice for some more copy/paste/merge options like one has in
> audio editors, but that’ll have to be built I guess. For bouncing, though,
> you can readily take any signal (or combination of signals) and record any
> length of these into a new buffer~.
>
> –CJ
>
>

July 5, 2007 | 2:35 pm

Quote: seejayjames wrote on Thu, 05 July 2007 04:54
—————————————————-
> Do you mean taking what’s currently playing in all 4 buffers and putting that into a new one? If so, can’t you just use groove~ for all 4 (or however many you want), put the output signals all into a single pair of L / R gainfaders, then into a record~ for a new buffer?
>
> Unless I’m misunderstanding…

well he can mix the 4 buffers to a fifth by connecting their outputs to any other MSP object … the bigger problem to copy between buffers in general + without third party externals.
i sometimes wish it would be easier then it curretly is.

the only solution i have used so far is doing it in realtime
play~ and record~. of course thats not neccessarily sample exact ;)

July 5, 2007 | 3:11 pm

I would have thought you could do it using peek~ and poke~ and adding
the numbers. I suppose the issues with that would be that you’d have
to "compress" the number stream, perhaps by using scale, and then
maybe normalise the buffer~once the transfer is done. I suppose
another issue, depending on how busy the patch is, might be keeping
the 4 number streams in sync.
Here’s a single buffer copier based on something that someone else
posted (thanks, whoever you were!). This shows one way of using peek~
to copy buffers, and should be modifiable.

David

max v2;
#N vpatcher 9 64 1197 561;
#P origin -36 -119;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 65 458 48 196617 t clear b;
#P user ubumenu 24 139 100 196617 0 0 1 1;
#X setrgb 31 31 31 227 155 104 234 234 234 198 33 0 141 141 141 112
112 112;
#X add reset 2;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P hidden newex 375 -89 21 196617 t 1;
#P hidden newex 375 -112 32 196617 sel 0;
#P window setfont "Sans Serif" 14.;
#P user ubumenu 36 9 150 196622 0 0 1 1;
#X setrgb 31 31 31 187 187 187 234 234 234 190 190 190 141 141 141
112 112 112;
#X add Sample compiler;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont "Sans Serif" 9.;
#P comment 356 17 21 196617 (q);
#P hidden newex 551 713 46 196617 select 0;
#P hidden newex 562 -65 20 196617 t b;
#P hidden newex 542 -42 29 196617 gate;
#P hidden newex 516 -68 38 196617 active;
#P hidden newex 561 -88 44 196617 sel 113;
#P hidden newex 561 -112 40 196617 key;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 221 13 135 196620 0 0 1 1;
#X setrgb 31 31 31 255 114 59 234 234 234 4 4 4 141 141 141 112 112 112;
#X add PREVIEW SELECTION;
#X prefix_set 0 0
0;
#P window setfont "Sans Serif" 9.;
#P hidden newex 592 779 51 196617 zl slice 2;
#P hidden newex 449 681 32 196617 line~;
#P hidden newex 611 732 49 196617 zl rot -2;
#P hidden newex 609 710 51 196617 pack f f f;
#P hidden newex 609 686 62 196617 mousefilter;
#P hidden newex 591 758 30 196617 Llist;
#P hidden newex 609 661 30 196617 !- 0.;
#P hidden newex 449 705 76 196617 play~ transfer;
#P hidden newex 835 -41 50 196617 t 50. 1 1;
#P hidden flonum 762 -42 34 9 0. 0 1 3 0 0 0 221 221 221 222 222 222
0 0 0;
#P hidden message 707 -42 55 196617 vzoom $1;
#P flonum 563 15 44 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 328 -52 41 196617 grid $1;
#P user ubumenu 421 15 56 196617 0 1 1 0;
#X add ms;
#X add samples;
#X add phase;
#X add bpm;
#X prefix_set 0 0
0;
#P comment 393 17 28 196617 units;
#P hidden message 10 -48 46 196617 offset 0;
#P hidden newex 145 -72 63 196617 prepend unit;
#P hidden newex 26 -90 60 196617 select none;
#P user ubumenu 522 15 39 196617 0 1 1 0;
#X add none;
#X add grid;
#X add zero;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P comment 484 17 43 196617 snap to;
#P hidden newex 251 -27 29 196617 gate;
#P hidden newex 225 -51 38 196617 active;
#P hidden newex 270 -51 30 196617 – 49;
#P hidden newex 270 -73 60 196617 split 49 52;
#P hidden newex 270 -96 40 196617 key;
#P hidden newex 75 -70 65 196617 prepend snap;
#P comment 612 17 71 196617 view buffer …;
#P user ubumenu 682 15 84 196617 0 1 1 0;
#X add set transfer;
#X add set one;
#X add set two;
#X add set three;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P toggle 42 263 15 0;
#P window setfont "Sans Serif" 10.;
#P hidden newex 143 681 67 196618 route toggle;
#P user ubumenu 82 279 40 196618 1 0 1 1;
#X setrgb 0 0 0 91 225 255 234 234 234 4 4 4 255 25 25 112 112 112;
#X add loop;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P hidden newex 358 662 32 196618 float;
#P hidden newex 136 650 67 196618 route toggle;
#P user ubumenu 82 252 40 196618 1 0 1 1;
#X setrgb 0 0 0 97 255 59 234 234 234 4 4 4 255 25 25 112 112 112;
#X add play;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P user multiSlider 127 251 25 45 0. 1.28 1 2681 47 0 0 4 0 40 0;
#M frgb 1 16 231;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window setfont "Sans Serif" 9.;
#P message 25 279 49 196617 startloop;
#P hidden message 143 704 41 196617 loop $1;
#P hidden newex 223 685 27 196617 sig~;
#P window setfont "Sans Serif" 10.;
#P hidden newex 323 689 45 196618 t f 100;
#P hidden newex 323 712 36 196618 line~;
#P hidden newex 298 745 37 196618 *~ 0.;
#P hidden newex 374 689 45 196618 t f 100;
#P hidden newex 374 712 36 196618 line~;
#P hidden newex 349 745 37 196618 *~ 0.;
#P hidden newex 298 784 52 196618 dac~ 1 2;
#P hidden newex 222 704 93 196618 groove~ transfer;
#P hidden newex 970 524 32 196618 t b b;
#P hidden message 398 532 68 196618 filetype aiff;
#P window setfont "Sans Serif" 9.;
#N vpatcher 689 495 830 825;
#P window setfont "Sans Serif" 9.;
#P newex 46 172 27 196617 – 0;
#P newex 17 55 50 196617 tosymbol;
#N comlet parent folder path;
#P outlet 23 274 15 0;
#N comlet file path in;
#P inlet 17 32 15 0;
#P newex 17 121 41 196617 t l l 58;
#P newex 17 197 39 196617 zl slice;
#P newex 46 150 39 196617 zl sub;
#P newex 17 101 50 196617 thresh;
#P newex 17 77 50 196617 spell;
#P newex 24 246 27 196617 itoa;
#P connect 6 0 8 0;
#P connect 8 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P connect 0 0 7 0;
#P connect 4 1 0 0;
#P connect 5 1 3 0;
#P connect 3 0 9 0;
#P connect 9 0 4 1;
#P connect 5 2 3 1;
#P pop;
#P hidden newobj 1257 380 94 196617 p remove_toplevel;
#P hidden newex 1368 336 40 196617 r bgcol;
#P objectname receive[10];
#P hidden newex 1368 357 42 196617 bgcolor;
#P window setfont "Sans Serif" 10.;
#P hidden message 58 214 15 196618 1;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 24 66 100 196617 0 1 1 1;
#X setrgb 31 31 31 189 192 189 234 234 234 166 0 163 141 141 141 112
112 112;
#X add normalise off;
#X add normalise on load;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont "Sans Serif" 10.;
#P hidden newex 291 595 49 196618 gate 1 1;
#N vpatcher 10 59 417 476;
#P window setfont "Sans Serif" 10.;
#P message 55 219 35 196618 reset;
#P newex 174 244 74 196618 r bfrsegmess;
#P message 60 164 15 196618 0;
#P newex 93 125 30 196618 t b i;
#P newex 93 154 40 196618 accum;
#P newex 50 50 59 196618 delay 100;
#P message 66 87 34 196618 set 0;
#P message 50 245 35 196618 clear;
#P newex 93 219 46 196618 pack i i;
#P newex 93 245 70 196618 Ltocoll 0 30;
#P newex 93 192 42 196618 bucket;
#N coll bfrsegs 1;
#P newobj 93 274 77 196618 coll bfrsegs 1;
#P inlet 50 30 15 0;
#P inlet 93 105 15 0;
#P connect 1 0 8 0;
#P connect 8 0 6 0;
#P fasten 8 0 13 0 55 208 60 208;
#P fasten 8 0 11 0 55 136 65 136;
#P connect 8 0 7 0;
#P connect 0 0 10 0;
#P fasten 7 0 9 0 71 151 98 151;
#P connect 10 0 9 0;
#P connect 9 0 3 0;
#P fasten 11 0 3 0 65 186 98 186;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P fasten 13 0 4 0 60 240 98 240;
#P fasten 6 0 2 0 55 267 98 267;
#P connect 4 0 2 0;
#P fasten 12 0 2 0 179 268 98 268;
#P connect 10 1 9 1;
#P fasten 9 0 5 1 98 182 134 182;
#P fasten 11 0 4 1 65 216 158 216;
#P pop;
#P hidden newobj 558 589 85 196618 p store_to_coll;
#P hidden newex 1026 798 27 196618 +;
#P hidden newex 1026 827 57 196618 s bfr_end;
#P hidden newex 396 -24 34 196618 t 0. f;
#P hidden newex 452 614 70 196618 mstosamps~;
#P hidden newex 374 587 105 196618 info~ transfer;
#P hidden message 1057 639 34 196618 set 0;
#P hidden newex 914 738 27 196618 + 0;
#P hidden newex 1092 637 34 196618 t 0 0;
#P hidden newex 996 681 30 196618 t b i;
#P hidden newex 1011 713 42 196618 bucket;
#P hidden newex 996 744 40 196618 accum;
#P hidden newex 877 827 46 196618 pack f f;
#P hidden newex 877 852 90 196618 peek~ transfer2;
#P hidden newex 877 797 27 196618 + 0;
#P hidden newex 914 784 83 196618 peek~ transfer;
#P hidden newex 293 530 85 196618 r transbfrmess;
#P hidden newex 802 679 70 196618 sampstoms~;
#P hidden newex 877 621 32 196618 t b b;
#P hidden newex 837 652 27 196618 int;
#P hidden newex 968 497 48 196618 select 0;
#P hidden button 1408 363 15 0;
#P hidden newex 1432 336 15 196618 _;
#P hidden message 1408 405 115 196618 brgb 161 216 141;
#P hidden newex 1432 311 49 196618 r colors;
#P hidden newex 1257 467 73 196618 s bfrsegmess;
#P hidden newex 1335 467 84 196618 s transbfrmess;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P hidden newex 1321 406 50 196617 sprintf write %s.aif;
#P hidden newex 1257 406 50 196617 sprintf write %s.txt;
#P window linecount 1;
#P hidden newex 1257 354 107 196617 savedialog;
#P window setfont "Sans Serif" 10.;
#P hidden newex 877 592 48 196618 select 0;
#P hidden newex 947 563 70 196618 mstosamps~;
#P hidden newex 874 563 70 196618 mstosamps~;
#P hidden newex 880 652 27 196618 int;
#P hidden newex 880 679 53 196618 tl.uzi;
#N vpatcher 10 59 510 450;
#P window setfont "Sans Serif" 10.;
#P newex 219 134 27 196618 – 1;
#P newex 255 217 48 196618 select 1;
#P newex 255 250 59 196618 delay 250;
#P newex 255 279 139 196618 tap.buffer.norm~ transfer;
#P newex 52 129 70 196618 sampstoms~;
#P button 115 50 15 0;
#P newex 127 102 40 196618 t i i 0;
#P newex 145 55 58 196618 r bfr_end;
#P newex 128 79 27 196618 int;
#P message 50 164 46 196618 size $1;
#P newex 127 233 46 196618 pack f f;
#P newex 127 258 83 196618 peek~ transfer;
#N counter 0 440628;
#X flags 0 0;
#P newobj 127 158 102 196618 counter 0 440628;
#P newex 159 201 90 196618 peek~ transfer2;
#P newex 127 130 53 196618 tl.uzi;
#P inlet 115 30 15 0;
#P outlet 50 186 15 0;
#P fasten 12 1 7 0 117 156 55 156;
#P connect 7 0 0 0;
#P fasten 10 1 12 0 147 125 57 125;
#P connect 1 0 11 0;
#P connect 8 0 10 0;
#P connect 10 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 5 0;
#P fasten 11 0 8 0 120 73 133 73;
#P connect 9 0 8 1;
#P fasten 4 0 3 0 132 189 164 189;
#P fasten 3 0 6 1 164 229 168 229;
#P fasten 10 2 4 2 162 125 196 125 196 152 178 152;
#P fasten 8 0 16 0 133 99 224 99;
#P connect 16 0 4 4;
#P connect 15 0 14 0;
#P connect 14 0 13 0;
#P pop;
#P hidden newobj 173 601 80 196618 p size_n_copy;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 24 116 100 196620 0 0 1 1;
#X setrgb 31 31 31 229 227 117 234 234 234 198 33 0 141 141 141 112
112 112;
#X add copy selection;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont "Sans Serif" 10.;
#P hidden newex 958 596 27 196618 !-;
#P hidden newex 840 532 58 196618 unpack f f;
#P hidden newex 490 479 67 196618 mousefilter;
#P hidden newex 490 500 46 196618 pack f f;
#P user pictslider 143 41 19 76 0 0 0 0 wfknob.pct 1 wfmodes.pct 1
2146 0 0 196608 1. 1.;
#P window setfont "Sans Serif" 9.;
#N vpatcher 40 55 278 404;
#P window setfont "Sans Serif" 9.;
#P newex 96 202 27 196617 int;
#N coll ;
#T flags 1 0;
#T 0 mode select;
#T 1 mode loop;
#T 2 mode move;
#T 3 mode draw;
#P newobj 131 255 53 196617 coll;
#P button 75 117 15 0;
#N comlet waveform~ mode messages;
#P inlet 74 164 15 0;
#P newex 113 88 27 196617 < < 1;
#P newex 96 140 40 196617 change;
#P newex 96 164 45 196617 select 0;
#P newex 96 117 27 196617 |;
#P outlet 131 284 15 0;
#P newex 45 62 78 196617 modifiers 100;
#P connect 5 0 7 0;
#P connect 7 0 2 0;
#P connect 0 3 2 0;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P connect 6 0 9 0;
#P connect 3 0 9 0;
#P connect 0 4 5 0;
#P connect 5 0 2 1;
#P connect 3 1 8 0;
#P connect 9 0 8 0;
#P connect 8 0 1 0;
#P pop;
#P hidden newobj 162 -17 50 196617 p wfkeys;
#P window setfont "Sans Serif" 10.;
#P hidden message 821 13 75 196618 refer bfrsegs;
#P user jit.cellblock 985 43 1153 468 3 10 1 1 45 17 0 1 1 0 1 0 1 1
1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0
4 0 0 0;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 24 188 100 196620 0 0 1 1;
#X setrgb 31 31 31 255 124 107 234 234 234 29 0 198 141 141 141 112
112 112;
#X add save;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P hidden inlet 1159 177 15 0;
#P window setfont "Sans Serif" 10.;
#P hidden message 59 379 22 196618 20;
#P hidden message 79 526 46 196618 size $1;
#P hidden newex 79 496 51 196618 * 1000.;
#P window setfont "Sans Serif" 12.;
#P number 24 220 35 12 0 60 67 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P hidden comment 92 -104 132 196622 Sample compiler;
#P hidden button 28 465 15 0;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 24 37 100 196620 0 0 1 1;
#X setrgb 31 31 31 227 155 104 234 234 234 198 33 0 141 141 141 112
112 112;
#X add clear all;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P user ubumenu 24 163 100 196620 0 0 1 1;
#X setrgb 31 31 31 105 227 104 234 234 234 198 33 0 141 141 141 112
112 112;
#X add size and copy;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont "Sans Serif" 10.;
#P hidden newex 194 495 33 196618 t b 1;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 24 88 100 196620 0 0 1 1;
#X setrgb 31 31 31 229 227 117 234 234 234 198 33 0 141 141 141 112
112 112;
#X add load sound;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P window setfont "Sans Serif" 10.;
#P hidden newex 40 88 51 196618 loadbang;
#P window setfont "Sans Serif" 9.;
#P hidden newex 570 531 20 196617 t b;
#P window setfont "Sans Serif" 10.;
#P hidden message 41 497 35 196618 clear;
#P hidden message 1290 300 75 196618 set transfer2;
#P hidden message 911 16 68 196618 set transfer;
#P window setfont "Sans Serif" 9.;
#P user waveform~ 166 327 815 140 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 132 214 152;
#W rgb2 0 95 255;
#W rgb3 214 35 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P user waveform~ 166 40 815 284 3 9;
#W mode select;
#W snap grid;
#W mouseoutput continuous;
#W unit samples;
#W grid 50.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 80.96 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 hidden newex 36 560 150 196618 buffer~ transfer2 20000. 1;
#P hidden message 196 525 71 196618 read 0 -1 1;
#P hidden newex 258 562 136 196618 buffer~ transfer 1000. 1;
#P window linecount 2;
#P comment 62 215 79 196618 intital buffer size (seconds);
#P user panel 1 1 1177 489;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window linecount 1;
#P hidden newex 291 618 139 196618 tap.buffer.norm~ transfer;
#P hidden fasten 72 0 71 0 63 242 29 242;
#P hidden fasten 22 0 19 0 64 405 29 405;
#P hidden fasten 105 1 106 0 541 32 631 32 631 -95 31 -95;
#P hidden fasten 16 0 17 0 29 254 33 254;
#P lcolor 16;
#P hidden fasten 10 0 5 0 46 550 41 550;
#P lcolor 16;
#P hidden fasten 136 0 5 0 70 539 41 539;
#P hidden fasten 21 0 5 0 84 550 41 550;
#P hidden connect 12 0 10 0;
#P hidden connect 17 0 10 0;
#P hidden fasten 12 0 72 0 45 194 63 194;
#P hidden fasten 12 0 22 0 45 356 64 356;
#P hidden fasten 135 0 136 0 29 367 70 367;
#P hidden connect 106 1 98 0;
#P hidden fasten 19 0 20 0 29 434 84 434;
#P hidden connect 20 0 21 0;
#P hidden fasten 90 2 91 0 117 454 206 454 206 587 155 587 155 636
141 636;
#P hidden fasten 93 2 94 0 117 481 206 481 206 614 135 614 135 679
148 679;
#P connect 94 0 87 0;
#P hidden fasten 110 1 107 0 449 -12 536 -12 536 -76 150 -76;
#P hidden fasten 103 0 28 1 256 -5 157 -5;
#P hidden connect 28 1 27 0;
#P hidden fasten 96 1 6 0 724 37 171 37;
#P hidden connect 27 0 6 0;
#P hidden fasten 8 0 6 0 916 37 171 37;
#P hidden fasten 98 0 6 0 80 -31 171 -31;
#P hidden connect 108 0 6 0;
#P hidden fasten 107 0 6 0 150 -39 171 -39;
#P hidden fasten 111 0 6 0 333 -8 171 -8;
#P hidden fasten 9 0 7 0 1295 344 171 344;
#P hidden fasten 15 0 34 0 29 363 141 363 141 538 178 538;
#P hidden fasten 13 0 14 0 29 298 141 298 141 489 199 489;
#P hidden connect 14 0 4 0;
#P hidden fasten 128 0 124 0 547 -4 526 -4 526 -21 226 -21;
#P hidden connect 86 0 78 0;
#P hidden fasten 87 0 78 0 148 734 213 734 213 703 227 703;
#P hidden connect 88 0 78 0;
#P hidden fasten 91 0 86 0 141 678 228 678;
#P hidden fasten 134 0 103 0 380 -25 256 -25;
#P hidden fasten 102 0 103 0 230 -31 256 -31;
#P hidden fasten 10 0 3 0 46 550 263 550;
#P lcolor 16;
#P hidden fasten 34 0 3 0 178 627 256 627 256 550 263 550;
#P hidden fasten 4 0 3 0 201 550 263 550;
#P hidden fasten 53 0 3 0 298 557 263 557;
#P hidden fasten 76 0 3 0 403 555 263 555;
#P hidden connect 99 0 100 0;
#P hidden connect 100 0 101 0;
#P hidden connect 101 0 103 1;
#P hidden fasten 71 0 70 0 29 271 141 271 141 588 296 588;
#P hidden connect 70 0 0 0;
#P hidden fasten 116 0 83 0 454 738 303 738;
#P hidden fasten 78 0 83 0 227 738 303 738;
#P hidden connect 83 0 79 0;
#P hidden connect 95 0 79 0;
#P hidden fasten 92 0 85 0 363 685 328 685;
#P hidden connect 85 0 84 0;
#P hidden connect 84 0 83 1;
#P hidden fasten 112 0 111 0 568 -39 400 -39 400 -68 333 -68;
#P hidden fasten 3 1 70 1 389 584 335 584;
#P hidden fasten 80 0 79 1 354 774 345 774;
#P hidden fasten 78 0 80 0 227 738 354 738;
#P hidden fasten 116 0 80 0 454 738 354 738;
#P hidden fasten 89 0 92 0 132 485 265 485 265 648 363 648;
#P hidden connect 3 1 64 0;
#P hidden fasten 92 0 82 0 363 685 379 685;
#P hidden connect 82 0 81 0;
#P hidden fasten 132 0 133 0 41 -60 202 -60 202 -88 380 -88;
#P hidden connect 133 0 134 0;
#P hidden connect 81 0 80 1;
#P hidden fasten 65 1 66 0 517 648 141 648 141 154 401 154;
#P hidden fasten 77 1 76 0 997 555 945 555 945 522 403 522;
#P hidden fasten 115 2 110 0 880 -5 426 -5;
#P hidden connect 123 0 122 0;
#P hidden connect 123 1 122 0;
#P hidden connect 122 0 116 0;
#P hidden connect 64 6 65 0;
#P hidden fasten 6 2 30 0 493 474 495 474;
#P hidden connect 30 0 29 0;
#P hidden fasten 115 1 105 0 860 -5 527 -5;
#P hidden fasten 6 3 29 1 654 474 558 474 558 499 531 499;
#P hidden fasten 127 0 128 0 521 -47 547 -47;
#P hidden fasten 134 0 128 0 380 -58 547 -58;
#P hidden fasten 124 0 130 0 226 217 1139 217 1139 660 556 660;
#P hidden connect 11 0 69 0;
#P hidden connect 125 0 126 0;
#P hidden connect 129 0 128 1;
#P hidden connect 126 0 129 0;
#P hidden fasten 115 0 112 0 840 -5 568 -5;
#P hidden connect 66 0 6 2;
#P hidden fasten 10 0 11 0 46 521 575 521;
#P lcolor 16;
#P hidden fasten 136 1 11 0 108 487 117 487 117 519 575 519;
#P hidden fasten 130 0 118 0 556 748 596 748;
#P hidden connect 118 0 123 0;
#P hidden fasten 6 2 117 0 493 660 614 660;
#P hidden connect 117 0 119 0;
#P hidden connect 119 0 120 0;
#P hidden connect 120 0 121 0;
#P hidden connect 121 0 118 1;
#P hidden fasten 6 3 117 1 654 660 634 660;
#P hidden fasten 6 2 120 1 493 618 634 618;
#P hidden fasten 52 1 69 1 867 712 745 712 745 569 638 569;
#P hidden fasten 6 3 120 2 654 529 654 529;
#P hidden connect 114 0 113 0;
#P hidden fasten 66 1 6 3 425 1 774 1;
#P hidden fasten 50 0 52 0 842 675 807 675;
#P hidden fasten 12 0 26 0 45 183 826 183;
#P hidden fasten 12 0 115 0 45 130 840 130;
#P hidden fasten 51 0 50 0 882 642 842 642;
#P hidden fasten 29 0 31 0 495 522 845 522;
#P hidden fasten 32 0 50 1 963 618 859 618;
#P hidden fasten 31 0 37 0 845 560 879 560;
#P hidden fasten 33 0 39 0 29 328 141 328 141 522 823 522 823 586 882
586;
#P hidden connect 39 0 51 0;
#P hidden fasten 35 2 55 0 913 705 882 705;
#P hidden fasten 55 0 57 0 882 830 882 830;
#P hidden connect 57 0 56 0;
#P hidden fasten 51 1 36 0 904 644 885 644;
#P hidden connect 36 0 35 0;
#P hidden fasten 58 0 55 1 1001 774 899 774;
#P hidden fasten 32 0 36 1 963 650 902 650;
#P hidden fasten 11 0 8 0 575 555 1112 555 1112 196 916 196;
#P hidden fasten 3 1 8 0 389 584 354 584 354 522 1112 522 1112 196
916 196;
#P hidden fasten 54 0 57 1 919 823 918 823;
#P hidden fasten 35 2 62 0 913 718 919 718;
#P hidden connect 62 0 54 0;
#P hidden fasten 37 1 62 1 939 591 944 591 944 732 936 732;
#P hidden fasten 31 1 38 0 893 560 952 560;
#P hidden fasten 37 1 32 0 939 591 963 591;
#P hidden fasten 24 0 49 0 29 396 141 396 141 489 973 489;
#P hidden connect 49 0 77 0;
#P hidden fasten 38 1 32 1 1012 591 980 591;
#P hidden connect 26 0 25 0;
#P hidden fasten 36 0 60 0 885 675 1001 675;
#P hidden connect 60 0 58 0;
#P hidden fasten 63 0 58 0 1062 738 1001 738;
#P hidden fasten 60 1 59 0 1021 706 1016 706;
#P hidden fasten 61 0 59 0 1097 706 1016 706;
#P hidden fasten 61 1 59 0 1121 706 1016 706;
#P hidden connect 59 0 58 1;
#P hidden fasten 58 0 68 0 1001 780 1031 780;
#P hidden connect 68 0 67 0;
#P hidden fasten 60 1 68 1 1021 706 1048 706;
#P hidden fasten 11 0 63 0 575 555 1062 555;
#P hidden fasten 11 0 61 0 575 555 1097 555;
#P hidden fasten 77 0 40 0 975 550 1139 550 1139 348 1262 348;
#P hidden connect 40 0 75 0;
#P hidden connect 75 0 41 0;
#P hidden fasten 41 0 44 0 1262 457 1262 457;
#P hidden fasten 11 0 9 0 575 555 1112 555 1112 300 1295 300;
#P hidden fasten 75 0 42 0 1262 401 1326 401;
#P hidden fasten 42 0 43 0 1326 457 1340 457;
#P hidden connect 74 0 73 0;
#P hidden connect 47 0 48 0;
#P hidden connect 47 0 46 0;
#P hidden connect 48 0 46 0;
#P hidden connect 45 0 47 0;
#P pop;

July 5, 2007 | 3:59 pm

July 5, 2007 | 4:21 pm

Nicholas Esterer schrieb:
> Let’s say one had four buffers playing simultaneously and wanted to
> bounce them to a single buffer, how would one go about doing that? I
> played around for 20min with the poke~, index~ and uzi objects.
> Here’s my failed attempt at bouncing only one buffer, perhaps you can
> spot my flaw.

Just take your four groove~s, play them and record~ them mixed into a
fifth buffer~, after you’ve done that you can bounce it back, or simply
assign it…

Out of the audio domain its also possible with peek~:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 168 358 59 196617 prepend set;
#P user umenu 65 358 100 196647 1 64 374 1;
#X add one;
#X add two;
#X add three;
#X add four;
#X add five;
#P hidden newex 271 243 67 196617 prepend read;
#P hidden newex 271 219 67 196617 prepend read;
#P hidden newex 271 195 67 196617 prepend read;
#P hidden newex 271 171 67 196617 prepend read;
#P user ubumenu 212 243 103 196617 0 1 1 0;
#X add anton.aif;
#X add cello-f2.aif;
#X add cherokee.aif;
#X add drumLoop.aif;
#X add jongly.aif;
#X add rainstick.aif;
#X add sho0630.aif;
#X add Symcluster.aif;
#X add vibes-a1.aif;
#X prefix_set 0 1 ./examples/sounds/ 0;
#P user ubumenu 212 219 103 196617 0 1 1 0;
#X add anton.aif;
#X add cello-f2.aif;
#X add cherokee.aif;
#X add drumLoop.aif;
#X add jongly.aif;
#X add rainstick.aif;
#X add sho0630.aif;
#X add Symcluster.aif;
#X add vibes-a1.aif;
#X prefix_set 0 1 ./examples/sounds/ 0;
#P user ubumenu 212 195 103 196617 0 1 1 0;
#X add anton.aif;
#X add cello-f2.aif;
#X add cherokee.aif;
#X add drumLoop.aif;
#X add jongly.aif;
#X add rainstick.aif;
#X add sho0630.aif;
#X add Symcluster.aif;
#X add vibes-a1.aif;
#X prefix_set 0 1 ./examples/sounds/ 0;
#P user ubumenu 212 171 103 196617 0 1 1 0;
#X add anton.aif;
#X add cello-f2.aif;
#X add cherokee.aif;
#X add drumLoop.aif;
#X add jongly.aif;
#X add rainstick.aif;
#X add sho0630.aif;
#X add Symcluster.aif;
#X add vibes-a1.aif;
#X prefix_set 0 1 ./examples/sounds/ 0;
#P user waveform~ 65 381 264 70 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 newex 339 267 114 196617 buffer~ five 10000 1;
#P newex 63 312 64 196617 peek~ five;
#P newex 90 292 28 196617 + 0.;
#P newex 108 251 28 196617 + 0.;
#P newex 90 272 64 196617 peek~ four;
#P newex 108 231 64 196617 peek~ three;
#P newex 126 191 64 196617 peek~ two;
#P newex 126 211 26 196617 + 0.;
#P newex 142 170 64 196617 peek~ one;
#P newex 339 243 114 196617 buffer~ four 10000 1;
#P newex 339 219 114 196617 buffer~ three 10000 1;
#P flonum 214 103 80 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 198 133 75 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 60 41 15 0;
#P newex 142 102 66 196617 mstosamps~;
#P newex 70 72 94 196617 info~ one;
#P newex 60 152 40 196617 uzi;
#P newex 339 195 114 196617 buffer~ two 10000 1;
#P newex 339 171 114 196617 buffer~ one 10000 1;
#P hidden connect 27 0 9 0;
#P hidden connect 26 0 8 0;
#P hidden connect 25 0 1 0;
#P hidden connect 24 0 0 0;
#P hidden connect 23 1 27 0;
#P hidden connect 22 1 26 0;
#P hidden connect 21 1 25 0;
#P hidden connect 20 1 24 0;
#P connect 12 0 11 0;
#P connect 10 0 11 1;
#P connect 13 0 15 0;
#P connect 11 0 15 1;
#P connect 14 0 16 0;
#P connect 15 0 16 1;
#P connect 16 0 17 1;
#P hidden fasten 29 0 19 0 173 377 70 377;
#P hidden connect 28 1 29 0;
#P connect 2 2 10 0;
#P connect 2 2 12 0;
#P connect 2 2 13 0;
#P connect 2 2 14 0;
#P connect 2 2 17 0;
#P fasten 3 6 7 0 147 96 219 96;
#P connect 3 6 4 0;
#P connect 4 1 6 0;
#P connect 4 1 2 1;
#P fasten 5 0 3 0 65 62 75 62;
#P connect 5 0 2 0;
#P window clipboard copycount 30;


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

July 6, 2007 | 8:37 pm

Here’s another take on a patch that bounces audio files:

max v2;
#N vpatcher 100 100 846 662;
#P window setfont "Sans Serif" 9.;
#P user number~ 391 403 430 418 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 439 332 14 196617 0;
#P button 125 87 15 0;
#P message 381 331 14 196617 1;
#P message 329 404 35 196617 write;
#P newex 329 430 110 196617 buffer~ bounce 30000;
#P newex 365 368 88 196617 record~ bounce 2;
#P flonum 409 92 80 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 408 157 75 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 325 189 66 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 236 60 15 0;
#P newex 350 128 66 196617 mstosamps~;
#P newex 259 94 105 196617 info~ one;
#P user ezdac~ 211 408 255 441 0;
#P message 111 185 14 196617 0;
#P newex 130 183 29 196617 sig~;
#P flonum 130 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 130 205 65 196617 groove~ one;
#P message 458 202 14 196617 0;
#P newex 477 200 29 196617 sig~;
#P flonum 477 177 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 477 222 67 196617 groove~ two;
#P message 49 241 30 196617 read;
#P newex 236 204 29 196617 sig~;
#P newex 236 171 40 196617 uzi;
#P newex 330 236 106 196617 buffer~ two 30000 1;
#P newex 236 225 58 196617 index~ one;
#P newex 236 265 65 196617 poke~ two 1;
#P newex 48 270 104 196617 buffer~ one 30000 1;
#P window linecount 6;
#P comment 24 28 100 196617 once both buffers have sounds loaded , click here to playback buffers and record into buffer~ bounce;
#P connect 7 0 1 0;
#P connect 27 0 15 0;
#P connect 13 0 14 0;
#P connect 14 0 12 0;
#P fasten 15 0 12 0 116 205;
#P connect 12 0 16 0;
#P connect 19 0 5 0;
#P fasten 5 2 6 0 271 195 241 195;
#P connect 6 0 3 0;
#P connect 3 0 2 0;
#P connect 8 0 16 1;
#P fasten 19 0 17 0 241 81 264 81;
#P fasten 5 2 2 1 271 194 302 194 302 249 268 249;
#P connect 18 1 5 1;
#P fasten 5 2 20 0 271 194 305 194 305 183 330 183;
#P connect 25 0 24 0;
#P connect 17 6 18 0;
#P connect 28 0 23 0;
#P connect 26 0 23 0;
#P connect 12 0 23 0;
#P connect 27 0 26 0;
#P connect 8 0 23 1;
#P connect 23 0 29 0;
#P connect 18 1 21 0;
#P fasten 17 6 22 0 342 118 390 118 390 84 414 84;
#P connect 27 0 11 0;
#P connect 9 0 10 0;
#P connect 10 0 8 0;
#P fasten 11 0 8 0 463 221 482 221;
#P pop;

July 7, 2007 | 12:35 am

Would faster-than-realtime bouncing to a buffer be useful in MaxMSP, as opposed to the realtime bouncing that has been discussed above? The faster-than-realtime bouncing capability of some commercial mixing programs seems vastly superior to the realtime-only bouncing limitation of certain other mixing programs, where your hour long mix takes an hour to bounce down even if you only wanted to tweak a few seconds of it.

But how useful would faster-than-realtime bouncing be in the MaxMSP world? I’m not suggesting it wouldn’t be useful, just curious what people think.

Eric

July 7, 2007 | 1:31 am

i’m looking to bounce the samples contained in the buffers almost instantaneously, without waiting for them to play through in real time

July 7, 2007 | 1:34 am

My plan is to create a patch that manipulates samples and allows one to cut bits of many samples and combine them into a single hybrid. To ease the process of manipulating these new hybrids, it would be simpler to bounce them to new files, and manipulate these files from scratch.

July 8, 2007 | 4:15 pm

I just added overdub capabilities to my buffet~ object, which should do everything you described. I’ve attached a copy in case you’d like to try it.

Eric

—————————————————-
> My plan is to create a patch that manipulates samples and allows one to cut bits of many samples and combine them into a single hybrid. To ease the process of manipulating these new hybrids, it would be simpler to bounce them to new files, and manipulate these files from scratch.
—————————————————-


grg
July 8, 2007 | 7:06 pm

Am 08.07.2007 um 18:15 schrieb Eric Lyon:

> I just added overdub capabilities to my buffet~ object, which should
> do everything you described. I’ve attached a copy in case you’d like
> to try it.

Lovely addition to el.buffet~!
btw the setbuf message is also very useful but heavily underdocumented
;)

cheers, g.

July 8, 2007 | 8:55 pm

Thanks! I should document "setbuf" one of these days. I view it as a convenience message, and generally recommend using a separate buffet~ object for each buffer~ you want to alter. If you’re hooked on "setbuf" (and I’ve found some good uses of it myself) just be sure not to use it to switch buffers during a buffet~ operation or you could shortly be restarting Max ;)

Eric

—————————————————-
>
> Am 08.07.2007 um 18:15 schrieb Eric Lyon:
>
> > I just added overdub capabilities to my buffet~ object, which should
> > do everything you described. I’ve attached a copy in case you’d like
> > to try it.
>
> Lovely addition to el.buffet~!
> btw the setbuf message is also very useful but heavily underdocumented
> ;)
>
> cheers, g.
>
>
—————————————————-

January 19, 2008 | 7:33 pm

That is sort of what I am trying to do, but faster than real-time. We start with 4 buffers and overdub them into 1 in some amount of processing time that is much less than the time it would take to play them. I don’t think MSP allows for that kind of thing, because it runs at the sampling rate of your sound card. If you think otherwise, I am open to suggestions. I am also wondering if one can do the same sort of thing with ffts, for example converting audio files to Cartesian Coordinate pairs, faster than real time.

January 21, 2008 | 8:42 am

Nicholas Esterer schrieb:
> That is sort of what I am trying to do, but faster than real-time.

Are you answering to a thread from last year? Please at least quote
something…. Or better create a new one after more than half a year…

> We start with 4 buffers and overdub them into 1 in some amount of
> processing time that is much less than the time it would take to play
> them. I don’t think MSP allows for that kind of thing, because it
> runs at the sampling rate of your sound card.

It does allow for it, that’s what the non-realtime driver is for. To get
scheduler timing correct, you need to check scheduler in audio-interrupt
though…

But beware, if you bounce to sfrecord~ or read with sfplay~, you’ll end
up being slower than realtime. This is a syncread problem or somthing I
never understood but a filesystem thingy. If you load and bounce into
buffer~s, you’ll be faster (if your memory is big enough to hold all
data…)

Stefan


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

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

Forums > MaxMSP