sample-accurate play/record synchronization
Hi Everyone,
Does anyone know how I can synchronize the playback of one buffer and
recording into another buffer at precisely the same time (sample)? With the
patcher below, I can sample-accurately synchronize the _playback_ of two
buffers, since groove~ can be controlled at audio rate. However, neither
record~ nor sfrecord~ can be controlled at audio rate, as far as I
understand. I know there are workarounds- also demonstrated in the patch
below is a method where the recording is started beforehand, and a
single-sample click is placed in one channel of the recorded data at exactly
the moment the playback starts so that the played and recorded data could be
aligned later. However, I would like to know if there is an easier way of
doing it...?
Thanks,
Aengus.
--
____________________
www.am-process.org
On 01 May 2007, at 13:17, Aengus Martin wrote:
> Hi Everyone,
>
> Does anyone know how I can synchronize the playback of one buffer
> and recording into another buffer at precisely the same time (sample)?
take a look at [poke~]
Hi,
I confronted this issue some years ago when (bored out of my mind over a holiday) I reverse-engineered the DL4 pedal's loop sampler mode from the pdf manual. There's a master count~ feeding both index~ for playback and a poke~ for recording. Upon looking at it now, It appears that I have a 1 vector (1024 samples) delay on the master count~ for the recorder. I can't think of why that is now, but I supppose it made sense at the time. The button-logic is extremely sloppy and I apologize for that, but I never thought this patch would see the light of day.
If anyone has a DL4, I'd be interested to know how close this comes - I've never played with one, only seen others perform with it.
Bill
here it is, enjoy:
oh yeah, you'll need this abstraction. call it [phasorbang]
On 01 May 2007, at 15:19, Aengus Martin wrote:
> Thanks for that Volker, it _should_ be exactly what I need.
>
> However, I have a problem: In the patch below I use a count~ object
> to start the poke~ writing to a buffer and to simultaneously start
> the groove~ object playing. To make things simple, I loaded a 10-
> sample wav file (all sample values = 0.5) into the playback buffer
> to see if it was reproduced in the record buffer. When I write the
> recorded buffer to a file and read it in Soundforge (or MATLab),
> there are only 9-nonzero samples- the first one is a zero, when as
> far as I understand it, the first 10-samples should be identical to
> my input wav file. Can anyone explain this?
hm, i wouldn't use groove in the first place. the point is, that that
the message to start play back, is a max message, i.e. not sample
accurate. try using an object, where you have complete control over
the playback position (as a signal).
take a look at [index~] e.g.
volker.
I posted this patch to the forums a little while back, but here it is
again. Very simple looping over-dub recorder/player with sample
accurate sync, using poke~ and index~.
Andrew B.
Hi Andrew,
I like your patch, it's been really helpful as i've been working on this kind of thing recently and had not thought of poke~ instead of record~
I was wondering if you could explain the useage of the trunc~ object?
cheers,
john.
Ok worked it out - shouldn't be reading this at 2am!
night night...
j.
On 02 May 2007, at 02:13, Aengus Martin wrote:
> Well ok, using a bang, the start time of this is not precise, but
> in my case I do not need it to be, I just need the playback and
> record to be absolutely in synch. Surely in the patch I posted
> should do that- since really what starts everything is the count~
> object which is running at audio rate?
no, not really.
in your patch [count~] controls the "playback-speed" of [groove~],
not the playback position. you start the playback by a max message
("startloop" nothing else possible with groove~).
actually the [count~] --> [>=~ 1] combo doesn't make sense to me. you
could have just used a [sig~ 1] to garantee normal playback speed.
you really need to control the recording pointer of the recording
object and the playback pointer of the playback object from the same
signal source to sync them sample accurately. that's why i suggested
to use [index~] instead of [groove~].
take a look at the example andrew posted. it's all in there i believe.
vb.
i'm having this same problem using groove and record and waveform as well. for some reason, when hitting record everything slows down by just a little bit. is it possible to use groove, record, and waveform all together? i copied exactly what was going on in the record part of the waveform help file (which works) but for some reason this doesnt work for me. any way to fix this? spacebar to turn on the dac and record is labeled...