Hi list, Is it possible to specify arguments for a pd-file when you open it?
-Jonathan
On Wed, 21 Jul 2010, Jonathan Wilkes wrote:
Hi list, Is it possible to specify arguments for a pd-file when you open it?
no.
or: just if you instantiate it as an abstraction.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Basically yes, sort of. matju's got it on the money. If you use $1, $2 etc. to mark the position of your arguments within a patch, save it, then save an empty patch in the same location (or else put the location of your first patch in your paths) then you can make an object with the name of your patch, which operates as an abstraction, essentially an object containing your patch. Which will take a list of arguments, the first of which will effectively replace $1 within it, the second, $2 and so on. So, yes, but you have to open the patch from within PD. Hope that's helpful for you.
Date: Wed, 21 Jul 2010 18:11:16 -0400 From: matju@artengine.ca To: jancsika@yahoo.com CC: pd-list@iem.at Subject: Re: [PD] Args for a patch
On Wed, 21 Jul 2010, Jonathan Wilkes wrote:
Hi list, Is it possible to specify arguments for a pd-file when you open it?
no.
or: just if you instantiate it as an abstraction.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
http://clk.atdmt.com/UKM/go/197222280/direct/01/ Do you have a story that started on Hotmail? Tell us now
Yes, I use that technique sometimes when developing abstractions. I just wanted to know if it was possible to give arguments to a file when you open it from pd. The place I could see this being useful is in conjunction with pddplink-- for example, to open a patch named "glossary" with an argument that is the name of the term you want to look up. -Jonathan
--- On Thu, 7/22/10, Andrew Faraday jbturgid@hotmail.com wrote:
From: Andrew Faraday jbturgid@hotmail.com Subject: RE: [PD] Args for a patch To: matju@artengine.ca, jancsika@yahoo.com Cc: pd-list@iem.at Date: Thursday, July 22, 2010, 12:23 AM
Basically yes, sort of. matju's got it on the money. If you use $1, $2 etc. to mark the position of your arguments within a patch, save it, then save an empty patch in the same location (or else put the location of your first patch in your paths) then you can make an object with the name of your patch, which operates as an abstraction, essentially an object containing your patch. Which will take a list of arguments, the first of which will effectively replace $1 within it, the second, $2 and so on.
So, yes, but you have to open the patch from within PD.
Hope that's helpful for you.
Date: Wed, 21 Jul 2010 18:11:16 -0400 From: matju@artengine.ca To: jancsika@yahoo.com CC: pd-list@iem.at Subject: Re: [PD] Args for a patch
On Wed, 21 Jul 2010, Jonathan Wilkes wrote:
Hi list, Is it possible to specify arguments for a pd-file when you open it?
no.
or: just if you instantiate it as an abstraction.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Get a new e-mail account with Hotmail - Free. Sign-up now.
I recently fantasized about such functionality when I needed to run a patch on 5 different computers where some things needed to be setup differently depending on which computer they were running and I solved that with a simple shell script which used pdsend to provide the arguments to the patch.
./MiS
On Wed, Jul 21, 2010 at 6:23 PM, Andrew Faraday jbturgid@hotmail.com wrote:
Basically yes, sort of. matju's got it on the money. If you use $1, $2 etc. to mark the position of your arguments within a patch, save it, then save an empty patch in the same location (or else put the location of your first patch in your paths) then you can make an object with the name of your patch, which operates as an abstraction, essentially an object containing your patch. Which will take a list of arguments, the first of which will effectively replace $1 within it, the second, $2 and so on. So, yes, but you have to open the patch from within PD. Hope that's helpful for you.
Date: Wed, 21 Jul 2010 18:11:16 -0400 From: matju@artengine.ca To: jancsika@yahoo.com CC: pd-list@iem.at Subject: Re: [PD] Args for a patch
On Wed, 21 Jul 2010, Jonathan Wilkes wrote:
Hi list, Is it possible to specify arguments for a pd-file when you open it?
no.
or: just if you instantiate it as an abstraction.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Get a new e-mail account with Hotmail - Free. Sign-up now. _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Wed, Jul 21, 2010 at 06:46:23PM -0400, Michal Seta wrote:
I recently fantasized about such functionality when I needed to run a patch on 5 different computers where some things needed to be setup differently depending on which computer they were running and I solved that with a simple shell script which used pdsend to provide the arguments to the patch.
Maybe $ pd -send "send stuff here" could be used as well?
Frank