buffer~ time

Apr 29, 2008 at 10:36pm

buffer~ time

i am trying to create a simple over dub tape recorder. but i dont want the recording time of the buffer set before recording but have the recording period give the buffer size.
any way to do this and get around the buffer size argument.
it can make things a lot simpler.

Apr 29, 2008 at 11:46pm

Feb 16, 2009 at 1:10am

there must be a better way to do this! puredata can create arrays(tables) on the fly without problems, whereas each buffer(array) is resized to match the recording time!

how does max handle reading tables as audio by the way? (i just switched over to max!)

Feb 16, 2009 at 1:54am

if you know the recording time ahead of time, you can resize a buffer~ on the fly using the or messages(see Ref Docs for buffer~). as for tables(like wave-tables), cycle~, wave~, and buffer~ are a good start. see help files for those.

not sure what you mean by on-the-fly, but in case it helps there is also this example on changing buffer~’s contents and reading from it, although it doesn’t resize the buffer~ you could do the same general thing and implement the size/sizeinsamps messaging:

(in the same general folder for Max4 as well)

one thing to watch for is that every time you resize a buffer~ it clears its contents.

hope it helps.

Feb 16, 2009 at 2:01am

ah, you stated you want the buffer size determined by the recording period. nevermind what i said… in that case, it’s true: recording with sfrecord~ and reloading into using the ‘replace’ message with buffer~ should be fast enough.

(search for “endless resampling” on these forums if you want actual overdub functionality into a buffer~)


You must be logged in to reply to this topic.