I think maybe problems of this form need at most three objects, and two if you could do [t 200 300 400 ...].
[inlet] | ________________ | | | | [200 300 400{ | | | | | [unpack 0 0 0] | | | | | | [pack 0 200 300 400] | | _________________| | [outlet]
the outlet of the [pack] is connected to [200 300 400{ message as well as the [outlet], in case the ascii didn't turn out well or was ambiguous.
No trigger is necessary in this scenario since the order of operations does not matter in this instance (though it might be better form/style to reset the [pack] in the subpatch before sending the output, and might be necessary if this were meant as an abstraction, where it could be used in recursive loops).
However, I think Michal Seta's solution is a lot more scalable -- attached is a patch that shows what I mean.
Matt
Date: Wed, 26 Nov 2008 10:52:09 +0100 From: Frank Barknecht fbar@footils.org Subject: Re: [PD] Pd exam 02: complete a longer list [was: Pd exam 01] To: pd-list@iem.at Message-ID: 20081126095208.GB18764@fliwatut.scifi Content-Type: text/plain; charset=us-ascii
Hallo, Michal Seta hat gesagt: // Michal Seta wrote:
Sorry, missed all the points on the first assignment. Here's my contribution.
I think, yours is a pretty cool, original and elegant solution!
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Yep ! it's good ! ;) I needn't my [unpack] before [pack], it's a mistake ! So here with a [t a b]. ++
Jack
Le 26 nov. 08 à 15:28, Matt Barber a écrit :
I think maybe problems of this form need at most three objects, and two if you could do [t 200 300 400 ...].
[inlet] | ________________ | | | | [200 300 400{ | | | | | [unpack 0 0 0] | | | | | | [pack 0 200 300 400] | | _________________| | [outlet]
the outlet of the [pack] is connected to [200 300 400{ message as well as the [outlet], in case the ascii didn't turn out well or was ambiguous.
No trigger is necessary in this scenario since the order of operations does not matter in this instance (though it might be better form/style to reset the [pack] in the subpatch before sending the output, and might be necessary if this were meant as an abstraction, where it could be used in recursive loops).
However, I think Michal Seta's solution is a lot more scalable -- attached is a patch that shows what I mean.
Matt
Date: Wed, 26 Nov 2008 10:52:09 +0100 From: Frank Barknecht fbar@footils.org Subject: Re: [PD] Pd exam 02: complete a longer list [was: Pd exam
01] To: pd-list@iem.at Message-ID: 20081126095208.GB18764@fliwatut.scifi Content-Type: text/plain; charset=us-asciiHallo, Michal Seta hat gesagt: // Michal Seta wrote:
Sorry, missed all the points on the first assignment. Here's my contribution.
I think, yours is a pretty cool, original and elegant solution!
Ciao
Frank Barknecht Do You RjDj.me? _
______footils.org__<Frank_test2a.pd>
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
On Wed, Nov 26, 2008 at 9:28 AM, Matt Barber brbrofsvl@gmail.com wrote:
However, I think Michal Seta's solution is a lot more scalable -- attached is a patch that shows what I mean.
I can't look at your example (I am at work and I do not use pd here, imagine that!) but my example will scale if the message [100 200 300 400( is replaced by some [receive]->[list] and this way any list length can serve to set any number of default values.