record~ object as a continuous FIFO buffer?

GGM's icon

I'm trying to create a patcher that, for example, makes a continuous capture of the last 5-seconds of audio and only writes the contents of the buffer when triggered.

One bad option for this is to use a buffer~ and the "loop" attribute of the record~ object. However this is not quite useful, since I don't want my captured 5-second file to include the loop return.

Another option that doesn't quite work is to use the "loop" attribute for the sfrecord~ object. This also results in the loop break point showing up in the middle of my recording.

Using a longer buffer, and/or overlapping multiple buffers would reduce the probability of this happening, but I'm assuming that there's a smarter way.

Suggestions?

Source Audio's icon

stutter~ object does exactly that

Roman Thilenius's icon

tapout~ (does not meet the minimum length of 15 characters.)

Hans Leeuw's icon

supervp.ring~ from IRCAM has this implementation in its help file:
https://forum.ircam.fr/projects/detail/supervp-for-max/

GGM's icon

@source: thanks! This works perfectly. It appears that the stutter~ throughput is off by 1 sample, but this is a minor issue for me.

@roman: unfortunately, this won't work for me because of the interpolation in the tapin~ / tapout~ (I need a bit-matched copy) but an equivalent with delay~ could have been an option.

@Hans: thanks for the link! I won't need it, but it might be a useful set of objects in the future.