Re: [PD] ADSR variations [was: Re: Patch-off]
On Sun, 22 Mar 2009, Frank Barknecht wrote: Hallo Jonathan, Consequently, the behavior of [list $1 $2 etc.] is exactly the same as [list append $1 $2 etc.] in this case. I would prefer the more verbose form [list append $1 $2 ...] just for clarity. It's not for clarity that you should want append to be there, it's so that $1 can be a symbol if need appears for it. Otherwise, it just takes you a minute to learn that [list] with a float $1 is a shortcut of [list append] and it's not much harder to remember than any other shortcuts, especially if you already know that [list] is a shortcut of [list append]. _ _ __ ___ _ _ _ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Hallo, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: Actually [list $1 $2 $3 $4 $5] seems to work in this context, but I guess that's because the first arg isn't a symbol. Is that why you're saying [list append] is needed? The [list] object will behave differently depending on its first argument: You get to choose between [list prepend], [list append], [list split] etc. The following arguments have different meanings depending on the first argument. E.g. [list split 3] will split a list at position 3, while [list prepend 3] will add a 3 in front of your incoming list. If you create [list] without any argument it will be the same as [list append], but if you'd use [list $1] then the value of $1 will decide, which kind of list operation you get. So if $1 is split you get a splitter, if it's append then you get a [list append]. So [list $1 $2 $3 $4 $5] is *not* the same as [list append $1 $2 $3 $4 $5]! Try it by sending something into both and print the result. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Hi Frank, I understand what you describe. But when the 1st creation argument is a float, [list $1] and [list append $1] print the exact same result as far as I can see. (Shaky comp sci terminology to follow...) Looking at list_new in x_list.c, if the first creation argument of [list $1 $2 etc.] is a not a symbol, the object is deemed a [list append] and the args are left alone. For [list append $1 $2 etc.] however, after append is matched, the argument count is decremented and the 2nd arg becomes the 1st. Consequently, the behavior of [list $1 $2 etc.] is exactly the same as [list append $1 $2 etc.] in this case. -Jonathan --- On Sun, 3/22/09, Frank Barknecht f...@footils.org wrote: From: Frank Barknecht f...@footils.org Subject: Re: [PD] ADSR variations [was: Re: Patch-off] To: pd-list@iem.at Date: Sunday, March 22, 2009, 12:27 PM Hallo, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: Actually [list $1 $2 $3 $4 $5] seems to work in this context, but I guess that's because the first arg isn't a symbol. Is that why you're saying [list append] is needed? The [list] object will behave differently depending on its first argument: You get to choose between [list prepend], [list append], [list split] etc. The following arguments have different meanings depending on the first argument. E.g. [list split 3] will split a list at position 3, while [list prepend 3] will add a 3 in front of your incoming list. If you create [list] without any argument it will be the same as [list append], but if you'd use [list $1] then the value of $1 will decide, which kind of list operation you get. So if $1 is split you get a splitter, if it's append then you get a [list append]. So [list $1 $2 $3 $4 $5] is *not* the same as [list append $1 $2 $3 $4 $5]! Try it by sending something into both and print the result. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Hallo Jonathan, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: I understand what you describe. But when the 1st creation argument is a float, [list $1] and [list append $1] print the exact same result as far as I can see. (Shaky comp sci terminology to follow...) Looking at list_new in x_list.c, if the first creation argument of [list $1 $2 etc.] is a not a symbol, the object is deemed a [list append] and the args are left alone. For [list append $1 $2 etc.] however, after append is matched, the argument count is decremented and the 2nd arg becomes the 1st. Consequently, the behavior of [list $1 $2 etc.] is exactly the same as [list append $1 $2 etc.] in this case. Ah, indeed you're right! Thanks for pointing me to this, I was falsely assuming otherwise (and should have checked myself before tellling others to check it, sorry. :( I would prefer the more verbose form [list append $1 $2 ...] just for clarity. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] ADSR variations [was: Re: Patch-off]
Hallo, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: Ok, I'd like to propose a patch-off. What's the cleanest, clearest way to present adsr.pd from the audio tutorials? I choose this patch because there are lots of crossed wires, plus one has to leave space for the explanatory comments of the patch. Here are two versions I could think of. Nice idea. I wrote up two alternative aproaches to ADSRing in Pd here: http://footils.org/cms/weblog/2009/mar/21/adsr-envelopes-pd/ My patch-off is this: http://footils.org/pkg/adsr-variations.pd (For a strange reason my Iceweaselfirefox doesn't show the images for that article. My iPhone does, so they must be there. Can you see the images?) Ciao -- Frank BarknechtDo You RjDj.me? _ __footils.org__ ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote: (For a strange reason my Iceweaselfirefox doesn't show the images for that article. My iPhone does, so they must be there. Can you see the images?) Never mind: Ad(sr)-blocking gone wrong... Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Nice. As a side note, the ADSR variations patch of Frank's show very clearly how to use [vline~] correctly: $1=lvl, $2=attack time, $3=decay time, $4=sustain level. Go to $1 over $2 msec, go to $4 over $3 msec Could use that in the vline~ help patch! ~Kyle On Sat, Mar 21, 2009 at 5:01 AM, Frank Barknecht f...@footils.org wrote: Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote: (For a strange reason my Iceweaselfirefox doesn't show the images for that article. My iPhone does, so they must be there. Can you see the images?) Never mind: Ad(sr)-blocking gone wrong... Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -- - - - -- http://perhapsidid.wordpress.com http://myspace.com/kyleklipowicz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
I agree. I also like the use of list in that patch to store parameters. So if you wanted to set parameters with creation arguments, would it just be a matter of using $1...$5 in the [list]s and (un)[pack]? -Jonathan --- On Sat, 3/21/09, Kyle Klipowicz kylek...@gmail.com wrote: From: Kyle Klipowicz kylek...@gmail.com Subject: Re: [PD] ADSR variations [was: Re: Patch-off] To: pd-list@iem.at Date: Saturday, March 21, 2009, 4:08 PM Nice. As a side note, the ADSR variations patch of Frank's show very clearly how to use [vline~] correctly: $1=lvl, $2=attack time, $3=decay time, $4=sustain level. Go to $1 over $2 msec, go to $4 over $3 msec Could use that in the vline~ help patch! ~Kyle On Sat, Mar 21, 2009 at 5:01 AM, Frank Barknecht f...@footils.org wrote: Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote: (For a strange reason my Iceweaselfirefox doesn't show the images for that article. My iPhone does, so they must be there. Can you see the images?) Never mind: Ad(sr)-blocking gone wrong... Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -- - - - -- http://perhapsidid.wordpress.com http://myspace.com/kyleklipowicz ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
Hallo, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: I agree. I also like the use of list in that patch to store parameters. So if you wanted to set parameters with creation arguments, would it just be a matter of using $1...$5 in the [list]s and (un)[pack]? Yes, almost. [list] is a shortcut for [list append] so you need to use: [list append $1 $2 $3 $4 $5] or so. Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] ADSR variations [was: Re: Patch-off]
--- On Sun, 3/22/09, Frank Barknecht f...@footils.org wrote: From: Frank Barknecht f...@footils.org Subject: Re: [PD] ADSR variations [was: Re: Patch-off] To: pd-list@iem.at Date: Sunday, March 22, 2009, 2:37 AM Hallo, Jonathan Wilkes hat gesagt: // Jonathan Wilkes wrote: I agree. I also like the use of list in that patch to store parameters. So if you wanted to set parameters with creation arguments, would it just be a matter of using $1...$5 in the [list]s and (un)[pack]? Yes, almost. [list] is a shortcut for [list append] so you need to use: [list append $1 $2 $3 $4 $5] or so. Actually [list $1 $2 $3 $4 $5] seems to work in this context, but I guess that's because the first arg isn't a symbol. Is that why you're saying [list append] is needed? -Jonathan Ciao -- Frank ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list