buffer in abstraction
I made an abstraction which contains both a buffer and a waveform. I set the buffername through an input (set name)
Im having some crashing-problems when I have a waveform in the working patch with the same name as the buffer/waveform in the abstraction. The crash happens when I open the abstraction from the patch
I dont have very much memory (256). Is this the problem or is it a problem with having buffer/waveform with identical names in both abstraction and patch at the same time
(using max 4.5)
Don't use the same name, this is likely the cause. Use an argument in the abstraction like #1_buffer_name instead, or just give it a number like
sprintf set 1_buffer_name
where buffer_name is the name in the main patch.
I almost get it
Shouldnt it be the exact name if you want thew content of the buffers to be identical?
The prosessing of the buffer is done in the abstraction and then I fetch the content in the main patch. Is this possible?
I am currently working on a similar setup, with a buffer in an abstraction and a waveform in the main patch.
Within the abstraction, the buffer gets an instantiated name: #0sample
The abstraction also sends this name out an outlet by means of a message box with the same argument: [ loadbang ]--[ #0sample ]--[ outlet ]
In the main patcher, the outlet of the abstraction is connected to the following: [ outlet]--[ prepend set ]--[ waveform~ ]
So on startup, the waveform is set to the buffer inside the abstraction.
Note: I am on Max 5 though, and with plenty of RAM (4 GB).
you have not explained what your goal is, shoudl two instances of the same
abstraction share the buffers or not?
for abstractions i would always prefer to use an #1 argument, then the
handling of the abstraction follows the scheme of buffer~and simialr audio
objects.
an additional inlet is useful, too.
-110