aha, I asked a similar question a number of months ago. you need to use delwrite~ and delread~
So if you want to continuously buffer the last 5 seconds of audio, send the audio to an object like:-
[delwrite~ buf1 5000]
and record from the
[delread~ buf1]
giving it the number 5000 (5 times 1000 miliseconds) to tell it to read what came in 5 seconds ago. the easiest way is then to delay the 'stop' message by the same amount (using a non-signal [delay 5000]), so that it continues to record up until the user stopped the recording, otherwise you will lose the last 5 secs.
wonderbra
Matt
-=-=-=-=-=-=-=-=-=-=-=-=- http://www.loopit.org/ -=-=-=-=-=-=-=-=-=-=-=-=- ----- Original Message ----- From: "Karl Nilsson" karl.nilsson@btinternet.com To: pd-list@iem.at Sent: Monday, March 01, 2004 1:50 PM Subject: [PD] "Prerecord buffer" patch
Hi,
This is my first post to the list so I suppose I am a newbie at many pd things although I have been involved with electronic music for some time.
I want to create a patch that kind of simulates the 'pre-record" function that is found on e.g. soundforge 7 and in protools, i.e. it continuously buffers a few seconds of the audio input so that when you start recording
it
includes this data into the file. I found a linux app that does pretty much this (http://www.hut.fi/~spniskan/quickrecord/) but I mainly us Windows, hence the need to do this patch. I presume I need to use many small buffers (say 100*0.1sec for a 10sec buffer) using arrays, but these then need to be organised so that new buffers are appended to the 'end' of the 10seconds
and
the oldest buffer deleted.
Can anyone provide any suggestions or pointers as to what objects to use
and
how to implements this. I am naturally not expecting anyone to do this
patch
for me just nudge me in the right direction....
Many thanks Karl
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list