use #0 in an abstraction for tables

Dec 8, 2010 at 7:39pm

use #0 in an abstraction for tables

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

#53818
Dec 8, 2010 at 8:32pm

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

#193697
Dec 8, 2010 at 8:34pm

thank you
i’m going to try,

#193698
Dec 8, 2010 at 9:45pm

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

– Pasted Max Patch, click to expand. –

abstraction :

– Pasted Max Patch, click to expand. –
#193699
Dec 8, 2010 at 10:29pm

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

#193700
Dec 8, 2010 at 10:34pm

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

#193701
Dec 8, 2010 at 11:12pm

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)

#193702
Dec 9, 2010 at 1:17pm

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…

#193703
Dec 9, 2010 at 4:54pm

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

– Pasted Max Patch, click to expand. –
#193704
Dec 9, 2010 at 10:38pm

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!

#193705
Dec 9, 2010 at 11:51pm

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

#193706
Dec 10, 2010 at 12:46am

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

#193707
Dec 10, 2010 at 7:21am

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. –
#193708
Dec 10, 2010 at 11:09am

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.

#193709
Dec 10, 2010 at 11:25am

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

#193710
Dec 10, 2010 at 6:48pm

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…

#193711
Dec 11, 2010 at 1:30am

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.

#193712
Dec 11, 2010 at 12:42pm

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)

#193713
Dec 11, 2010 at 1:05pm

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”.

#193714
Dec 11, 2010 at 3:05pm

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

#193715

You must be logged in to reply to this topic.