Forums > MaxMSP

Looping record

February 29, 2008 | 7:09 am

I’ve encountered a strange problem with a looping record and playback patch where the buffer seems to erase itself when you stop and then re-start the DAC. The simple patch below demonstrates my problem.

Is there a way to avoid this? I’d like to be able to record into a buffer like this, turn off the DAC, and then turn it back on and continue to hear my loop.

Thanks in advance,
Dan

max v2;
#N vpatcher 293 100 1046 489;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 282 221 248 196617 Now , turn off the DAC and then turn it back on. You will hear the loop continue to playback , but it will be erasing as it plays and the buffer will soon be empty. What is going on?;
#P window linecount 1;
#P comment 282 177 248 196617 Loop will playback , everything working as expected.;
#P window linecount 2;
#P comment 282 136 248 196617 Click the 1 at any time to start recording (beware feedback if using a mic);
#P window setfont "Sans Serif" 18.;
#P window linecount 1;
#P message 544 135 23 196626 1;
#P window setfont "Sans Serif" 9.;
#P user number~ 103 90 142 105 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user ezdac~ 213 223 257 256 0;
#P user ezadc~ 600 116 644 149 0;
#P newex 64 56 78 196617 phasor~ 0.25;
#P newex 594 210 88 196617 record~ record 2;
#P objectname 1196Record;
#P window setfont "Sans Serif" 12.;
#P newex 64 165 160 196620 wave~ record 0. 4000. 2;
#P window setfont "Sans Serif" 9.;
#P newex 327 328 113 196617 buffer~ record 4000 2;
#P comment 325 350 121 196617 a 4 second stereo buffer;
#P window linecount 2;
#P comment 94 133 122 196617 phasor~ drives wave~ object for playback;
#P comment 282 90 248 196617 Turn on DAC and the phasor~ starts looping playback through the empty buffer.;
#P connect 6 0 4 0;
#P connect 6 0 9 0;
#P connect 4 0 8 0;
#P connect 4 1 8 1;
#P connect 10 0 5 0;
#P connect 7 0 5 0;
#P connect 7 1 5 1;
#P pop;


February 29, 2008 | 9:27 am


February 29, 2008 | 9:40 am


February 29, 2008 | 1:29 pm

Yeah, something strange is happening… For me, it was looping as normal the first few times i turned on and off, but then the looping section within buffer kept shrinking. It was looping smaller sections each time i turn dac off and on. Don’t know…


February 29, 2008 | 2:32 pm


February 29, 2008 | 5:23 pm

OK… so it’s happening for at least one other person then. Does anyone have any idea what’s going on?

It seems to me like the recording is re-started everytime you turn on the DAC, overriding whatever is currently in the buffer. Is this a bug or a "feature"? Is there a workaround?

/dan

Quote: laotze wrote on Fri, 29 February 2008 06:29
—————————————————-
> Yeah, something strange is happening… For me, it was looping as normal the first few times i turned on and off, but then the looping section within buffer kept shrinking. It was looping smaller sections each time i turn dac off and on. Don’t know…
—————————————————-


March 1, 2008 | 7:59 am

Dan schrieb:
> Is there a way to avoid this? I’d like to be able to record into a
> buffer like this, turn off the DAC, and then turn it back on and
> continue to hear my loop.

look at append mode and loop mode, both explained in the help…
Switching audio on/off is like sending a new 1…

Stefan


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


March 1, 2008 | 12:44 pm

This should help – just adding a bit more control of the 1(record on) ie turn that setting off (0) once recorded and whilst toggling audio

#P user multiSlider 132 133 107 13 0. 1. 1 2936 47 0 0 2 0 0 0;
#M frgb 47 219 45;
#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 window linecount 1;
#P newex 616 342 32 196617 sel 1;
#P user multiSlider 564 382 107 13 0. 1. 1 2936 47 0 0 2 0 0 0;
#M frgb 219 45 49;
#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 user number~ 575 312 614 327 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 635 95 15 14;
#P button 590 50 21 0;
#P message 610 130 14 196617 0;
#B color 6;
#P newex 590 97 30 196617 t b b;
#P toggle 575 189 15 0;
#P noclick;
#P toggle 610 168 15 0;
#P noclick;
#P newex 575 222 36 196617 adc~;
#P newex 64 281 31 196617 dac~;
#P window linecount 4;
#P comment 282 240 248 196617 Now , turn off the DAC and then turn it back on. You will hear the loop continue to playback , but it will be erasing as it plays and the buffer will soon be empty. What is going on?;
#P window linecount 1;
#P comment 282 196 248 196617 Loop will playback , everything working as expected.;
#P window linecount 2;
#P comment 282 155 248 196617 Click the 1 at any time to start recording (beware feedback if using a mic);
#P user number~ 103 109 142 124 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 newex 64 75 78 196617 phasor~ 0.25;
#P newex 575 286 88 196617 record~ record 2;
#P objectname 1196Record;
#P window setfont "Sans Serif" 12.;
#P newex 64 184 160 196620 wave~ record 0. 4000. 2;
#P window setfont "Sans Serif" 9.;
#P newex 327 347 113 196617 buffer~ record 4000 2;
#P comment 325 369 121 196617 a 4 second stereo buffer;
#P window linecount 2;
#P comment 94 152 122 196617 phasor~ drives wave~ object for playback;
#P comment 282 109 248 196617 Turn on DAC and the phasor~ starts looping playback through the empty buffer.;
#P window linecount 1;
#P comment 655 95 40 196617 record;
#B color 14;
#P comment 611 51 74 196617 audio toggler;
#P connect 9 1 24 0;
#P connect 8 0 6 0;
#P connect 6 0 13 0;
#P fasten 6 1 13 1 219 243 90 243;
#P fasten 8 0 9 0 69 100 108 100;
#P fasten 21 1 22 0 609 365 569 365;
#P connect 7 0 21 0;
#P fasten 17 0 16 0 595 151 580 151;
#P connect 16 0 14 0;
#P fasten 15 0 7 0 615 268 580 268;
#P connect 14 0 7 0;
#P fasten 19 0 17 0 595 80 595 80;
#P connect 14 1 7 1;
#P fasten 23 0 18 0 621 374 669 374 669 123 615 123;
#P lcolor 7;
#P connect 17 1 18 0;
#P fasten 20 0 15 0 640 155 615 155;
#P connect 18 0 15 0;
#P fasten 21 1 23 0 609 337 621 337;
#P window clipboard copycount 25;

cheers


March 2, 2008 | 1:03 pm

Stefan Tiedje schrieb:
> Dan schrieb:
>> Is there a way to avoid this? I’d like to be able to record into a
>> buffer like this, turn off the DAC, and then turn it back on and
>> continue to hear my loop.
>
> look at append mode and loop mode, both explained in the help…
> Switching audio on/off is like sending a new 1…

Another note to your problem: Never use the audio on/off toggle as
performance control. There are always other ways to achieve what you
want to do…
Better do it clean from ground up…

Good luck


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


March 2, 2008 | 10:37 pm

Thanks for the help, Stefan and avantronica…. i’ve got it working now.

best,
/dan


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