silly problem with record~, buffer~, and groove~

Jun 27, 2006 at 11:15pm

silly problem with record~, buffer~, and groove~

Sorry if this is fairly rudimentary but I’m a bit stuck. I am using record~ to grab a few seconds of live input and stick it in a buffer~ for loop playback. It seems that record~ doesn’t work unless I give the corresponding buffer~ a size argument. For example: [buffer~ foo 2000]. My goal is to playback the buffer~ as a loop using groove~, but I want the loop start and end points to correspond with when record~ was manually started and stopped. As it stands groove~ loops the full 2000ms of the buffer~ determined by the argument I supplied as opposed to simply looping the recorded material.
Am I overlooking something basic about these objects, or is there a trick I need to employ to do what I want? (At the moment I am not supplying any arguments or commands to groove~ other than playback speed and startloop.) Thanks!

-Jesse

#26592
Jun 27, 2006 at 11:57pm

give your buffer~ a certain size, lets say 2000ms and just start a timer when you start recording and use its result for the end looppoint of your groove~ when you stop the recording …
there are many other ways , but i am in a rush right now…
ciao

#79744
Jun 28, 2006 at 12:01am

Quote: karl-otto von wrote on Tue, 27 June 2006 17:57
—————————————————-
> give your buffer~ a certain size, lets say 2000ms and just start a timer when you start recording and use its result for the end looppoint of your groove~ when you stop the recording …
> there are many other ways , but i am in a rush right now…
> ciao
—————————————————-

Great idea, thanks! I thought maybe I had missed a functionality of one of the three objects involved, but it looks like I haven’t.

#79745
Jun 28, 2006 at 12:07am

#79746
Jun 28, 2006 at 11:34am

Seejay James wrote:
> Anyone with a solution for this, please let me (us) know—this would
> be great to resolve so we can get some real-time sampling going!

There is a crop message to waveform~ which resizes without erasing, but
as its a UI object it might be expensive on the CPU.

The opter approach is to copy the part you want to keep to another
buffer~…

(I am real-time sampling all the time already… ;-)

Stefan


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

#79747
Jun 28, 2006 at 12:01pm

This is a simplified example of the solution I’m using. Seems to be similar to what you’re doing seejayjames. What wasn’t working for you?

#P user ezdac~ 390 256 434 289 0;
#P user ezadc~ 49 109 93 142 0;
#P button 280 137 15 0;
#P button 261 136 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 269 68 14 196617 0;
#P message 223 66 14 196617 1;
#P newex 259 156 35 196617 timer;
#P user number~ 54 236 93 251 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 186 67 196617 record~ test;
#P toggle 461 106 15 0;
#P message 461 134 43 196617 loop $1;
#P message 378 61 29 196617 stop;
#P newex 387 133 38 196617 sig~ 1;
#P message 355 40 51 196617 startloop;
#P newex 364 177 68 196617 groove~ test;
#P newex 258 387 92 196617 buffer~ test 7000;
#P window linecount 2;
#P comment 211 40 43 196617 start record;
#P comment 265 40 40 196617 stop record;
#P connect 12 0 9 0;
#P connect 16 0 9 0;
#P connect 13 0 9 0;
#P connect 9 0 10 0;
#P connect 14 0 11 0;
#P connect 12 0 14 0;
#P connect 13 0 15 0;
#P connect 15 0 11 1;
#P connect 6 0 3 0;
#P connect 4 0 3 0;
#P connect 5 0 3 0;
#P connect 7 0 3 0;
#P connect 3 0 17 0;
#P connect 11 0 3 2;
#P connect 8 0 7 0;
#P window clipboard copycount 18;

#79748
Jun 28, 2006 at 12:02pm

Oh, nevermind. I see, you’re concerned that the buffer~ is wasting space it’s not using. Gotcha.

-j

#79749
Jun 29, 2006 at 10:20pm

Thanks Stefan, will look into it. Really would like to create a Max version of a “loop pedal”… because of course Max has a lot more capabilities than a lil’ piece of hardware. In fact, using a simple MIDI footswitch or series of them, in conjuntion with buffers~, could make for a really cool live looping machine.

Any tidbits regarding your implementation of the real-time sampling would be great!

-CJ

#79750

You must be logged in to reply to this topic.