[PD] "Prerecord buffer" patch

Karl Nilsson karl.nilsson at btinternet.com
Mon Mar 1 16:46:49 CET 2004


Ahh yes - thank you. Naturally the next thing I did after sending this
message was figuring it out myself, but thanks. It was of course a lot
easier than I originally thought. Not sure why I thought I had to organise a
bunch of smaller buffers... Well got a patch working now that I am going to
expand on when I get home from work...

Thanks for the delayed stop message tip, I hadnt thoguht of that one yet.

Many thanks
Karl

-----Original Message-----
From: pd-list-admin at iem.at [mailto:pd-list-admin at iem.at] On Behalf Of
matthew jones
Sent: 01 March 2004 13:57
To: PD-List; Karl Nilsson
Subject: Re: [PD] "Prerecord buffer" patch

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 at btinternet.com>
To: <pd-list at 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 at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list
>


_______________________________________________
PD-list mailing list
PD-list at iem.at
http://iem.at/cgi-bin/mailman/listinfo/pd-list





More information about the Pd-list mailing list