hi list, i wonder if it's possible to write an abstraction that has a variable number of inlets or outlets, given as argument.
i've tried it with messages like
;pd-[argument file name] inlet 10 10
and so on, but then you always get asked if you want to discard changes, cause of course you shouldn't save these changes in the abstraction.
impossible?
greets, mirko
one possibility is to use python. another possibility would be to use some weird dynamic patching. it is not possible without tricks. but in general it is possible. and it also depends on how you want to connect the abstraction. another way to deal with multilength lists is to use send and receive and list abstractions... marius.
Mirko Maier wrote:
hi list, i wonder if it's possible to write an abstraction that has a variable number of inlets or outlets, given as argument.
i've tried it with messages like
;pd-[argument file name] inlet 10 10
and so on, but then you always get asked if you want to discard changes, cause of course you shouldn't save these changes in the abstraction.
impossible?
greets, mirko
On Sat, Oct 06, 2007 at 03:01:29PM -0400, marius schebella wrote:
one possibility is to use python. another possibility would be to use some weird dynamic patching. it is not possible without tricks. but in general it is possible. and it also depends on how you want to connect the abstraction. another way to deal with multilength lists is to use send and receive and list abstractions... marius.
Mirko Maier wrote:
hi list, i wonder if it's possible to write an abstraction that has a variable number of inlets or outlets, given as argument.
i've tried it with messages like
;pd-[argument file name] inlet 10 10
and so on, but then you always get asked if you want to discard changes, cause of course you shouldn't save these changes in the abstraction.
impossible?
may be you could create 1-inlet -->> 1-outlet minimal abstraction for what you want to do with each signal individualy, and use a subpatch wich would have each one of those for each of it's inlets. so you just create a subpatch with a set of arguments which will give a number of inlets .. actually you need an abstraction which will create [pd subpatch] and make as many copies of your abs inside that with inlets and outlets for each of them. so basicly you need to set that up .. i'd like to have something similar .. i was actually think of this before ..but didn't have something that would need it too much.
but that you can do only if you doing the same thing with each of the inlets, not doing any operations with one inlet onto another ..like modulation of one over the other or similar ..
but this is probaly better to do via some external , so one can get more do something even more sofisticated .. like send a message 'chain 6 vcf~' which will create 6 [vcf~]s connected one after another ..
that would be grate to have .. it would probably be best to do via Tk/Tcl
i was actualy wondering how to send Tcl commands in pd ?
it is implemented in DesireData. but i haven't tried it there .. may be will try to use tkcons now .. i'll post if any success.
Hi Mirko, The attached nsend and nreceive patches do what you're looking for, I think? It is annoying to do since one has to count the objects in their patch, but it certainly works and is quite reliable. You do have to use [initbang] rather than [loadbang], or else the inlets/outlets will not exist in time for the parent patch to connect to them.
Cheers Luke
On 10/6/07, ilya .d ild0012@londonmet.ac.uk wrote:
On Sat, Oct 06, 2007 at 03:01:29PM -0400, marius schebella wrote:
one possibility is to use python. another possibility would be to use some weird dynamic patching. it is not possible without tricks. but in general it is possible. and it also depends on how you want to connect the abstraction. another way to deal with multilength lists is to use send and receive and list abstractions... marius.
Mirko Maier wrote:
hi list, i wonder if it's possible to write an abstraction that has a variable
number of inlets or outlets, given as argument.
i've tried it with messages like
;pd-[argument file name] inlet 10 10
and so on, but then you always get asked if you want to discard
changes, cause of course you shouldn't save these changes in the abstraction.
impossible?
may be you could create 1-inlet -->> 1-outlet minimal abstraction for what you want to do with each signal individualy, and use a subpatch wich would have each one of those for each of it's inlets. so you just create a subpatch with a set of arguments which will give a number of inlets .. actually you need an abstraction which will create [pd subpatch] and make as many copies of your abs inside that with inlets and outlets for each of them. so basicly you need to set that up .. i'd like to have something similar .. i was actually think of this before ..but didn't have something that would need it too much.
but that you can do only if you doing the same thing with each of the inlets, not doing any operations with one inlet onto another ..like modulation of one over the other or similar ..
but this is probaly better to do via some external , so one can get more do something even more sofisticated .. like send a message 'chain 6 vcf~' which will create 6 [vcf~]s connected one after another ..
that would be grate to have .. it would probably be best to do via Tk/Tcl
i was actualy wondering how to send Tcl commands in pd ?
it is implemented in DesireData. but i haven't tried it there .. may be will try to use tkcons now .. i'll post if any success.
-- cheers,. ilya .d
greets, mirko
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info
/listinfo/pd-list
Companies Act 2006 : http://www.londonmet.ac.uk/companyinfo
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info /listinfo/pd-list
Quoting "ilya .d" ild0012@londonmet.ac.uk:
but this is probaly better to do via some external , so one can get more do something even more sofisticated .. like send a message 'chain 6 vcf~' which will create 6 [vcf~]s connected one after another ..
that would be grate to have .. it would probably be best to do via Tk/Tcl
?? why not do it in Pd ??
i used to do that a lot.
nowadays i think, that most of the issues one tries to solve with
dynamic patching can be solved otherwise. (with the added benefit of
staying consistent among several save cycles)
i was actualy wondering how to send Tcl commands in pd ?
you can use [tot] for that.
however, by freaking in tcl/tk way you would be manipulating only the
graphical representation of the patch rather than the patch (this is:
draw a rectangle with some text instead of create an object)
mf,asdr IOhannes
This message was sent using IMP, the Internet Messaging Program.
the classical challenge with dynamic inlets is the max/msp object [pak]. it is a pack object, which triggers on every inlet. for example pak 3 would have 3 inlets.
[0\ [0\ [0
| | |
[pak 3 ___]
|
[print]
any solutions for that with dynamic patching (please don't forget that I want to have several instances of that object in a patch...)??? marius.
zmoelnig@iem.at wrote:
Quoting "ilya .d" ild0012@londonmet.ac.uk:
but this is probaly better to do via some external , so one can get more do something even more sofisticated .. like send a message 'chain 6 vcf~' which will create 6 [vcf~]s connected one after another ..
that would be grate to have .. it would probably be best to do via Tk/Tcl
?? why not do it in Pd ?? i used to do that a lot. nowadays i think, that most of the issues one tries to solve with
dynamic patching can be solved otherwise. (with the added benefit of
staying consistent among several save cycles)i was actualy wondering how to send Tcl commands in pd ?
you can use [tot] for that. however, by freaking in tcl/tk way you would be manipulating only the
graphical representation of the patch rather than the patch (this is:
draw a rectangle with some text instead of create an object)mf,asdr IOhannes
This message was sent using IMP, the Internet Messaging Program.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sun, 7 Oct 2007, marius schebella wrote:
[0\ [0\ [0
| | | [pak 3 ___] | [print]any solutions for that with dynamic patching (please don't forget that I want to have several instances of that object in a patch...)???
Without dynamic patching,
[#pack 3 f] | [#export_list]
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
Hallo, marius schebella hat gesagt: // marius schebella wrote:
one possibility is to use python.
IIRC dynamically changing the xlet number is not possible with pyext.
another possibility would be to use some weird dynamic patching.
Weird in that you'd need [namecanvas] and it's basically not useable, because connections made to dynamically created xlets in the parent patch don't survive saving. See attached patch.
Better use something with [route] like the demux-idiom:
[list prepend 0] | [route 0 1 2 3]
Frank Barknecht _ ______footils.org__
Frank Barknecht wrote:
Hallo, marius schebella hat gesagt: // marius schebella wrote:
one possibility is to use python.
IIRC dynamically changing the xlet number is not possible with pyext.
how dynamically do you want it? just rename the object from [pak 3] to [pak 4] and you have 4 inlets instead of 3. maybe you were thinking about another example? marius.
Hallo, marius schebella hat gesagt: // marius schebella wrote:
Frank Barknecht wrote:
Hallo, marius schebella hat gesagt: // marius schebella wrote:
one possibility is to use python.
IIRC dynamically changing the xlet number is not possible with pyext.
how dynamically do you want it? just rename the object from [pak 3] to [pak 4] and you have 4 inlets instead of 3. maybe you were thinking about another example?
Yes, that's of course possible, but it doesn't work with "reload" alone or through a message. With python or pdlua or C changing xlets on reload is trivial.
Frank Barknecht _ ______footils.org__
On 10/7/07, Frank Barknecht fbar@footils.org wrote:
Weird in that you'd need [namecanvas] and it's basically not useable, because connections made to dynamically created xlets in the parent patch don't survive saving. See attached patch.
Frank, please see [nsend/nreceive] that I posted above? Using [initbang], connections survive saving just fine. I attached a modification of your example.
Luke
Hallo, Luke Iannini (pd) hat gesagt: // Luke Iannini (pd) wrote:
On 10/7/07, Frank Barknecht fbar@footils.org wrote:
Weird in that you'd need [namecanvas] and it's basically not useable, because connections made to dynamically created xlets in the parent patch don't survive saving. See attached patch.
Frank, please see [nsend/nreceive] that I posted above? Using [initbang], connections survive saving just fine. I attached a modification of your example.
Yes, with [initbang] it works, though standard MSP-Pd doesn't have initbang. Pd-extended uses a patch from the patch-tracker, that so far is not included in Miller-Vanilla-Pd. Hopefully it gets into MSP-Pd as well, together with a closebang, as both can be useful.
Frank Barknecht _ ______footils.org__
On Sat, 6 Oct 2007, Mirko Maier wrote:
i wonder if it's possible to write an abstraction that has a variable number of inlets or outlets, given as argument. i've tried it with messages like ;pd-[argument file name] inlet 10 10 and so on, but then you always get asked if you want to discard changes, cause of course you shouldn't save these changes in the abstraction. impossible?
afaik, you'd need [initbang], but that object class has not yet been introduced in the main pd, so the best you could do is decide of a maximum number of inlets or outlets, create that many, and use [loadbang] to delete any extraneous inlets or outlets. If you try to create inlets using [loadbang], they will be created too late when you reload the patch, such that every patch that has connections to such objects will load with "connection failed" errors that result in missing wires.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada