i have run into a small problem with a new abstraction that i use to load files into tables.
the abstraction is called loadrun.pd , and inside this abstraction is a subpatch that makes a number of tables. at the moment, these tables are being sent to pd-loadrun.pd
but, i want to open several instances of this abstraction at once.
the problem is how to send stuff from a subpatch to the abstraction, without sending it to all other copies of the abstraction?
i think i read somewhere about a local send object , (maybe in zexy?) ....but i can't remember.
any hints?
Hallo, hard off hat gesagt: // hard off wrote:
i have run into a small problem with a new abstraction that i use to load files into tables.
the abstraction is called loadrun.pd , and inside this abstraction is a subpatch that makes a number of tables. at the moment, these tables are being sent to pd-loadrun.pd
but, i want to open several instances of this abstraction at once.
the problem is how to send stuff from a subpatch to the abstraction, without sending it to all other copies of the abstraction?
i think i read somewhere about a local send object , (maybe in zexy?)
Local sends won't help here, the problem is, that "pd-loadrun.pd" is and will stay a global receiver.
What you could do however is a little hackish and untested, but should work:
Inside of loadrun.pd you create a subpatch [pd $0-mytables], which will carry the tables later.
Inside loadrun.pd you then loadbang a [f $0] object and send this number to either an outlet or a to a global sender like "LOADRUN_DOLLAR_ZEROS"
Now for every loadrun.pd's "$0" you receive, you can make a new sender for the $0-mytables subpatch and send your messages to it with:
[r LOADRUN_DOLLAR_ZEROS] | [makefilename pd-%d-mytables] | [; $1 obj 10 10 a_table(
Ugly, but also somehow cool.
Of course it would be simpler to just put the dynamic messages stuff into loadrun.pd itself, then you wouldn't need to deal with the global sender LOADRUN_DOLLAR_ZEROS or an outlet, but it depends on what you want to do exactly.
You can also use this trick to address objects prepended with $0 inside loadrun.pd, for example a table called [table $0-file]: Just try to somehow get $0 outside of the abstraction to use it outside.
However it may be easier to use a table named with $1 like [table $1-file], and then use different arguments for every instance of the abstraction.
Frank Barknecht _ ______footils.org_ __goto10.org__
Could you put an inlet in the subpatch that takes a loadbang-$0 from the abstraction into a "set $1-" message to set its tabwrites and tabreads?
If you were only changing one abstraction at a time, you could put the subpatch outside of the abstraction and pack a route float with each update message to tell the subpatch which abstraction to send to. This is really useful if you're calculating audio in the subpatch, because now you only have one copy.
-Chuckk
On 4/12/06, hard off hard.off@gmail.com wrote:
i have run into a small problem with a new abstraction that i use to load files into tables.
the abstraction is called loadrun.pd , and inside this abstraction is a subpatch that makes a number of tables. at the moment, these tables are being sent to pd-loadrun.pd
but, i want to open several instances of this abstraction at once.
the problem is how to send stuff from a subpatch to the abstraction, without sending it to all other copies of the abstraction?
i think i read somewhere about a local send object , (maybe in zexy?) ....but i can't remember.
any hints?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- "It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters." -Friedrich Nietzsche, "Thus Spoke Zarathustra"
On 4/12/06, Chuckk Hubbard badmuthahubbard@gmail.com wrote:
Could you put an inlet in the subpatch that takes a loadbang-$0 from the abstraction into a "set $1-" message to set its tabwrites and tabreads?
If you were only changing one abstraction at a time, you could put the subpatch outside of the abstraction and pack a route float with each update message to tell the subpatch which abstraction to send to. This is really useful if you're calculating audio in the subpatch, because now you only have one copy.
-Chuckk
On 4/12/06, hard off hard.off@gmail.com wrote:
i have run into a small problem with a new abstraction that i use to load files into tables.
the abstraction is called loadrun.pd , and inside this abstraction is a subpatch that makes a number of tables. at the moment, these tables are being sent to pd-loadrun.pd
but, i want to open several instances of this abstraction at once.
the problem is how to send stuff from a subpatch to the abstraction, without sending it to all other copies of the abstraction?
i think i read somewhere about a local send object , (maybe in zexy?) ....but i can't remember.
any hints?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- "It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters." -Friedrich Nietzsche, "Thus Spoke Zarathustra"
-- "It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters." -Friedrich Nietzsche, "Thus Spoke Zarathustra"
Could you put an inlet in the subpatch that takes a loadbang-$0 from
the abstraction into a "set $1-" message to set its tabwrites and tabreads?<<
yeah, you don't even need to do that , you can put the $0 directly in the tabread / write ..ie [tabread4~ $0-blahblah]
all works well now. thanks for the help frank and chuckk