Prepend Audio to Audio File / Recording

Hey there,

I’m building a “precapture” audio system that is constantly listening to the previous 10 seconds of audio, then prepends this clip to a realtime capture when a button is pressed… The previous 10sec + the realtime recording is then saved as an audio file.

I can easily conceive how to achieve this by piping the audio signal through a series of Trail/Delay CHOPS, then eventually mixing them to a moviefileout, but this will always take at least 10 seconds for the trail/delay to ‘catch up’ into the recording CHOP. Is there any technique I can use to get this previous 10 seconds a bit more instantly?

tysm

If the audio file is loaded into a File In CHOP (not Audio File In CHOP!) the entire file is loaded at once.
You can then use a lookup CHOP to playback through this audio for an effective way to do time-warping with audio.

Thanks for the direction ben!

If I use a Trail CHOP with a 4 second window length, then record it to an AudioFileOut CHOP, the audio recording is 20 seconds long. Can anyone shed some light on why this is?

You’ll want to skip a Trail CHOP before Audio File Out. The Audio File Out writes all the samples in its input to the file, so feeding it with 4 seconds of data per frame is incorrect. Take the signal from immediately before the Trail CHOP and it should be the correct length.