Forums > MaxMSP

use #0 in an abstraction for tables


Dec 08 2010 | 7:39 pm

Hello,
Can we use 0 in an abstraction for tables? To me, it does not work, all the tables one them even values…
Thank you

Dec 08 2010 | 8:32 pm

It seems to work. As long as you make sure to make a symbol using the #0. Try this: [table #0t]
_
johan

Dec 08 2010 | 8:34 pm

thank you
i’m going to try,

Dec 08 2010 | 9:45 pm

I do not understand it does not work,
Here are examples:


-- Pasted Max Patch, click to expand. --

abstraction :


-- Pasted Max Patch, click to expand. --

Dec 08 2010 | 10:29 pm

It appears as if you are using a #1 arg, but not giving your bpatchers any arguments. If you don’t want to specify an argument and want a random one, use #0 instead of #1-#9.

-Ben

Dec 08 2010 | 10:34 pm

it is not enough to know that it is #0, you must also be able to remeber that when typing it. :)

Dec 08 2010 | 11:12 pm

I believe that I do not understand all the subtilitées concerning the abstractions particullary in the use of the #
With #0, it me good attribute a random number, but the contents of tables remain identical.
(sorry for bad english)

Dec 09 2010 | 1:17 pm

smells rather buggy over here (5.1.6)…

[table #0t] from different patchers all refer to the same table. When double clicking to it’s content, the window’s name is always #0t !

Also, the name attribute is not working.
Try changing it in the inspector…won’t do…

Dec 09 2010 | 4:54 pm

It works here. Be careful you seem to have 2 table objects:


-- Pasted Max Patch, click to expand. --

Dec 09 2010 | 10:38 pm

ahh ok, i’ve found the feature ;)

I always had the original patch with [table #0t] open.
So there actually was a table with the name #0t.

Funnilly, the tables inside the instances of the abstractions [table 1002-t], [table 1003-t]…all refer to [table #0t].

If I open the mother-patch, containing the abstractions, _first_ and then the original abstraction patch, this is not the case!

Dec 09 2010 | 11:51 pm

I tried the operation of mudang, despair! always the same table for 3 abstractions,
Thank you for your help!

Dec 10 2010 | 12:46 am

how about using #1t and being sure you give each abstraction an argument? that should work…

Dec 10 2010 | 7:21 am

Well, I used #1 with arguments, tables are correctly named in the patch a mother, when I open them, they are not more than one


-- Pasted Max Patch, click to expand. --

Dec 10 2010 | 11:09 am

Let’s recap a bit…

"table #1something": the #1 part will be replaced by whatever the argument of the abstraction/bpatcher is.
"table #0something": the #0 will be replaced by an unique number (each abstraction/bpatcher instance will have a different number)

Note that in order to work properly the #n needs to be the first thing of a symbol.

Hope this clarify.

Dec 10 2010 | 11:25 am

Thank you emmanuel, I am going to try to put on my small brain and to understand! (I hope)

Dec 10 2010 | 6:48 pm

use the #1 at the beginning of the table name, and use no spaces. you had "table ifo #1" which won’t work for these two reasons. for the #1 to work (in the context of things like send and receive as well) it must be at the beginning of the symbol. If you have a space in the table argument, it won’t be part of the name—it would treat it as another argument. So change to "table #1ifo" or whatever you want to call it.

But there’s more to it, as I discovered… I made a main patch with "table #1ifo", then made another patch with two bpatchers, so one with argument 1 and one with argument 2. Didn’t work because the main table in the master patch was still open. Closed that one, still didn’t work… but saved and closed the bpatch-holding patch, re-opened, then voila—the tables were correctly instantiated this time, named "1ifo" and "2ifo", with uniquely-controllable contents.

So… the main thing is to close the patches you’re working with before you test with different tables. If they get created while the master one is still open, they’ll always reflect that one, regardless of the arguments you give, so it seems…probably the case for coll and other objects too, not sure…

Dec 11 2010 | 1:30 am

named colls behave properly with #0_ in load, the load order is not a problem
from what i can tell. with table it is a bit confusing.

Dec 11 2010 | 12:42 pm

Thank you for all these advices, I can now separate the contents of tables, this forum is really indispensable for me!
My last discovery: tables aren’t saved with the patch, in the reopening, the data disappeared (I filled well "save data with patcher" in the inspector)

Dec 11 2010 | 1:05 pm

When you want to save the table contents with the parent patcher you need to load the abstraction into a [bpatcher] and check "Embed patcher in parent".

Dec 11 2010 | 3:05 pm

That’s it, everything works marvelously!!!
I thank the " guru forum ",
thanks to all
Michel

Viewing 20 posts - 1 through 20 (of 20 total)

Forums > MaxMSP