Not quite getting something about using [buffer~]
Hi all,
I'm trying to make a fairly simple recorder that can be fed the (generated) name of a [buffer~] and record in it, then create a new one, and on and on...But it doesn't seem to be keeping track of itself very well.
I am under the understanding that a sound is written into a [buffer~] object, given a name, and is then accessible anywhere in the patcher (or sub patcher) by setting any [buffer~] object to the name of an existing one. BUT-- Does the sound recorded in a buffer go away if there is no longer a [buffer~] with that name somewhere in the patcher? I guess I thought that, once created, they existed in memory (until the patcher is closed, I guess), regardless of what named [buffer~] objects happened to be in the patch at the moment...?
This seems to become much tougher if that's not the case, because I had in mind they could be dynamically generated (rather than a pre-made number with pre-made names). I did a little trying with it, sending the name of a newly-recorded [buffer~] to [thispatcher] and trying to script the creation of a new [buffer~] object for it. But the naming seems like a problem, since I can't figure out how to get the specific name into the new [buffer~] object, without scripting a msg and patch cords, and etc. headaches.
Am I barking-up a wrong tree here? Is it really tough to deal with several dynamically-created and variably-named [buffer~]'s?
Hope this makes enough sense-- I was trying to frame the question somehow without having to post the patch, thinking it might cut to basic problem of the matter easier. Anyway, thanks a lot...
-Brian
nope. it will go away. you will have to keep one buffer object for each sample somewhere in your patcher(s).
the only thing what remains in the computer memory is the name (and, i think, location) of a named buffer after its deletion, but that doesnt help you much here.
you may have noticed that buffer contents even vanish when changing the buffer´s size. same problem.
secondly, i am also trying to give you half an answer to the lower half of your post:
why the heck do you really need certain names for buffers? i dont think you need them. "mycoolsample-01", "mycoolsample-02" should be fine.
to display names of imported files, or to export files by typing their names into a textfield and things like that you do not need to use the same name for the buffers. your patch only has to remembe who´s who.
-110
...or I could just use [polybuffer~], which I've been trying to re-create for some time now, without knowing it already existed. Don't know how I missed it until just now!