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.
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.
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~)