same buffer~ in multiple abstractions

ulodin's icon

Hi all,

i'd want to try to playing a patch of mine in a larger patch. I've modified inlets and outlets so that i can use it like an abstraction. In the (now) abstraction, a play~ object reads a buffer~, that obviously, has its name, the same of the play~ object.

The problem seems to be that in case of creating multiple copies of the abstraction, i cannot place different audio files in a buffer that has a unique name, even if it's part of an abstraction.

What's a clever way to deal with it?
How can i read different files starting with copies of a single abstraction?

Hope my request could be clear...

thanks!!

yas's icon

you need to put "#0" in the buffer name, eg. [buffer~ #0johnny], this will give each abstraction's buffer a unique number.

alternatively, if you put #1, you can give each abstraction a different argument that will go into its buffer's name.

hope that's clear.

ulodin's icon

Hi yas, it's simply amazing. Now i can't try that, but i'll do as soon as possible.

fantastic...

thanks!

ulodin's icon

Hi yas,

i'm in front of my project.
I've tried to add "#0" into the buffer~ but it seems to not work.

I have to say that the entire abstraction is made by a unique buffer~ that is read by 16 poly~ instances with play~ in.

Do i have to add "#0" to buffer~, info~ and play~? (play~ is in the subpatch)

I've tried to add "#0" everywhere, but it still seems to not work...

I wrong something...

BTW, these are the patches:

POLY

Max Patch
Copy patch and select New From Clipboard in Max.

SUBPATCH:

Max Patch
Copy patch and select New From Clipboard in Max.

(sorry for mess, i'm still working on it)

bye!

Tj Shredder's icon

You have to prepend a name with #0 at least #0_ should do it, but I prefer meaningfull names...

ulodin's icon

Hi stef,

sorry but i think to not understand. Should i prepend the name to all objects? Buffer, info and play?
I didn't know it was possible to prepend a name too...
I'll try it!

Thanks!

ulodin's icon

Here i am..

yes, #0 seems to work; but it does the job properly only in the main patch: buffer~ and info~ take the same name, but the play~ in the subpatch takes the same number of its buffer~ plus 1 (eg. 2097buffer~ and 2098play~).

the way is the right one; now i only have to figure out how give the same name to the buffer~ (in the main patch) and to the play~ (in the sub).

can i take the name of the buffer~ and prepend it to the play~ in some way?

can i do it only manually?

thanks again

Camilo Leal's icon

Hi,

I was having a similar issue, and I have two buffers in my abstraction.

The solution is simple, and I found it in the Max website.

What you have to do is name your buffer #0_name (by name I mean any name)
if you have record or play objects, you have to name them the same (meaning #0_name)

If you have another buffer in the same abstraction, you have to call it different, let's say, #0_name1, and so on for the related objects.

When you open the abstraction, it is going to name all the #0 with the same number. That is the reason why, if you have another buffer you need to name it differently!!!

You don't need to prepend anything, just name all the related objects the same, meaning #0_name.

Hope it helps