Hi all,
I need to create a message as follows (a gem pix_image open command)
open ../../db/0/10
Where 0 and 10 are numbers generated by math objects, its a hierarhcy of Images I'm mapping to an equation.
Its a lot like makefilename, but I need to do two subsitutions.
Best solution would be something like printf which replaces a placeholder with incoming data:
pack 0 10 | foo "open ../../db/%s/%s"
fine if it can only do strings... I looked in the pdb without luck, any suggestions?
Thanks Ben
Marc
Le dim 24/11/2002 à 22:24, bbogart@ryerson.ca a écrit :
Hi all,
I need to create a message as follows (a gem pix_image open command)
open ../../db/0/10
Where 0 and 10 are numbers generated by math objects, its a hierarhcy of Images I'm mapping to an equation.
Its a lot like makefilename, but I need to do two subsitutions.
Best solution would be something like printf which replaces a placeholder with incoming data:
pack 0 10 | foo "open ../../db/%s/%s"
fine if it can only do strings... I looked in the pdb without luck, any suggestions?
Thanks Ben
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
Best solution would be something like printf which replaces a placeholder with incoming data:
pack 0 10 | foo "open ../../db/%s/%s" fine if it can only do strings... I looked in the pdb without luck, any suggestions?
I would like to have a full regex engine but haven't spent any time on a regex external yet. (Though i found out how to abuse the pd scheduler as state engine for regex backtracking.)
Hi, you could also use the python external for this, although it might be a waste of resources if you need solely this functionality.
greetings, Thomas
On 24 Nov, bbogart@ryerson.ca wrote:
pack 0 10 | foo "open ../../db/%s/%s"
Yes i got one. I have a parameter substitution engine which can replace tokens inside a list by any symbol:
0 1 [expand] 2
0: input. should contain tokens: &1, &2, ... 1: replacement list. first element is for &1, ... 2: output list.
It was developed under linux but uses only std c++, and std libc (besides flext 0.3.3) and should compile under other systems as well.
I needed this for a generative environment (mixer array builder, patch matrix builder, etc), which reads pd patch files as macros.
I will continue developing, so if you have any remarks or find any bugs, tell me. I also will put it for download somewhere some time next week.
I would like to have a full regex engine but haven't spent any time on a regex external yet. (Though i found out how to abuse the pd scheduler as state engine for regex backtracking.)
Greeting
hi Ben,
it seems like your 'foo' is called 'sprintf', a standard max object (no need for a 'pack', btw). It is in the cyclone.
Krzysztof
bbogart@ryerson.ca wrote: ...
Best solution would be something like printf which replaces a placeholder with incoming data:
pack 0 10 | foo "open ../../db/%s/%s"
hi list
I'm trying to read a filename from a textfile list.
I got the filename in pd but if I like to get this filename in a messagebox with $1, pd got an error:
error: $1: argument number out of range
trying to get the filename in makesymbol or makefilename:
error: makesymbol: no method for 'filename.blah'
maybe someone can tell me, why this doesn't work and what would be a working solution.
thanx a lot philipp
part of my patch that does not work:
| __________ |textfile|
| ___________ |symbol $1(
| ______________________ |makefilename path/%s{
Hi to all, I was aking myself: is there on line a real PD tutorial for dummies? I mean, something like: "now, let's play a sound file"... thanks to all
-a-
-----Messaggio originale----- Da: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]Per conto di Miller Puckette Inviato: martedi 24 giugno 2003 8.59 A: f:o Cc: pd-list@iem.kug.ac.at Oggetto: Re: [PD] error while reading filename from textfile
Try making the message box (that says "symbol $1") into an object box, just "symbol". This converts the selector of the message coming from textfile into a message with one symbol argument, which is what makefilename needs.
cheers Miller
On Sun, Jun 22, 2003 at 01:41:20AM +0200, f:o wrote:
hi list
I'm trying to read a filename from a textfile list.
I got the filename in pd but if I like to get this filename in a
messagebox
with $1, pd got an error:
error: $1: argument number out of range
trying to get the filename in makesymbol or makefilename:
error: makesymbol: no method for 'filename.blah'
maybe someone can tell me, why this doesn't work and what would be a working solution.
thanx a lot philipp
part of my patch that does not work:
|bang(
| __________ |textfile|
| ___________ |symbol $1(
| ______________________ |makefilename path/%s{
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Try making the message box (that says "symbol $1") into an object box, just "symbol". This converts the selector of the message coming from textfile into a message with one symbol argument, which is what makefilename needs.
cheers Miller
On Sun, Jun 22, 2003 at 01:41:20AM +0200, f:o wrote:
hi list
I'm trying to read a filename from a textfile list.
I got the filename in pd but if I like to get this filename in a messagebox with $1, pd got an error:
error: $1: argument number out of range
trying to get the filename in makesymbol or makefilename:
error: makesymbol: no method for 'filename.blah'
maybe someone can tell me, why this doesn't work and what would be a working solution.
thanx a lot philipp
part of my patch that does not work:
|bang(
| __________ |textfile|
| ___________ |symbol $1(
| ______________________ |makefilename path/%s{
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
i guess one of the problems with tutorials is that they are useful when you can predict the kinds of things that a user will want to do with a program. but with pd, beyond the first few steps, the possible things people might want to do become two numerable to try and pin down with a series of howtos.
not saying a tutorial shouldn't exist, just predicting that it would be unsatisfyingly short.
the help patches, read in order, have a tutorial-like feel at times, without quite so much of the "for dummies" condescension.
pix.
On Mon, 23 Jun 2003 11:11:29 +0200 "Andrea Valle" marta_andrea@libero.it wrote:
Hi to all, I was aking myself: is there on line a real PD tutorial for dummies? I mean, something like: "now, let's play a sound file"... thanks to all
-a-
-----Messaggio originale----- Da: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]Per conto di Miller Puckette Inviato: martedi 24 giugno 2003 8.59 A: f:o Cc: pd-list@iem.kug.ac.at Oggetto: Re: [PD] error while reading filename from textfile
Try making the message box (that says "symbol $1") into an object box, just "symbol". This converts the selector of the message coming from textfile into a message with one symbol argument, which is what makefilename needs.
cheers Miller
On Sun, Jun 22, 2003 at 01:41:20AM +0200, f:o wrote:
hi list
I'm trying to read a filename from a textfile list.
I got the filename in pd but if I like to get this filename in a
messagebox
with $1, pd got an error:
error: $1: argument number out of range
trying to get the filename in makesymbol or makefilename:
error: makesymbol: no method for 'filename.blah'
maybe someone can tell me, why this doesn't work and what would be a working solution.
thanx a lot philipp
part of my patch that does not work:
|bang(
| __________ |textfile|
| ___________ |symbol $1(
| ______________________ |makefilename path/%s{
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hello all,
I agree with pix that PD tutorials are very difficult to write primarily because the possibilities are rather endless. Predicting the needs of a new user beyond a few basic PD structures is nearly impossible.
I've tried a slightly different approach with the PDDP reference files -- I believe that if a LOT of information is available for each object (with working examples of the object in various contexts) a user can glean the required information and begin to use PD's objects in a meaningful way.
Yes, I am shamelessly advertising the PDDP reference files which are available (always) at http://www.davesabine.com/media/puredata.asp
In each of these object reference files, I've tried to include a subpatch called "more info" which offers tutorials, examples, explanations, discussion...etc.
I hope this helps.
Happy programming, Dave S
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at] On Behalf Of Andrea Valle Sent: June 23, 2003 3:11 AM To: msp@ucsd.edu; f:o Cc: pd-list@iem.kug.ac.at Subject: [PD] tutorial
Hi to all, I was aking myself: is there on line a real PD tutorial for dummies? I mean, something like: "now, let's play a sound file"... thanks to all
-a-
I'm currently making the switch from Max/MSP to Pure Data, so I don't really know exactly what I'm talking about just yet... but I think it would be quite possible to go over each command/bang/whatever and show a couple ways that it's used, a couple standard applications, a couple weird ones.
__ matthew wyeth r. http://amphibio.us
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]On Behalf Of David Sabine Sent: Tuesday, June 24, 2003 3:10 AM To: 'Andrea Valle' Cc: pd-list@iem.kug.ac.at Subject: RE: [PD] tutorial
Hello all,
I agree with pix that PD tutorials are very difficult to write primarily because the possibilities are rather endless. Predicting the needs of a new user beyond a few basic PD structures is nearly impossible.
I've tried a slightly different approach with the PDDP reference files -- I believe that if a LOT of information is available for each object (with working examples of the object in various contexts) a user can glean the required information and begin to use PD's objects in a meaningful way.
Yes, I am shamelessly advertising the PDDP reference files which are available (always) at http://www.davesabine.com/media/puredata.asp
In each of these object reference files, I've tried to include a subpatch called "more info" which offers tutorials, examples, explanations, discussion...etc.
I hope this helps.
Happy programming, Dave S
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at] On Behalf Of Andrea Valle Sent: June 23, 2003 3:11 AM To: msp@ucsd.edu; f:o Cc: pd-list@iem.kug.ac.at Subject: [PD] tutorial
Hi to all, I was aking myself: is there on line a real PD tutorial for dummies? I mean, something like: "now, let's play a sound file"... thanks to all
-a-
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.489 / Virus Database: 288 - Release Date: 6/10/2003
Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.489 / Virus Database: 288 - Release Date: 6/10/2003
i guess one of the problems with tutorials is that they are useful
when
you can predict the kinds of things that a user will want to do with a program. but with pd, beyond the first few steps, the possible things people might want to do become two numerable to try and pin down with
a
series of howtos.
For things like this what I've number of people do is lay down a roadmap and provide point-to-point tutorials, building this into a wiki or other such system so people can fill in relevant parts of the roadmap collaboratively
A new user can simply pick a roadmap that suits what they want to achieve.
-----Original Message----- From: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at] On Behalf Of pix Sent: 24 June 2003 10:06 To: pd-list@iem.at Subject: Re: [PD] tutorial
i guess one of the problems with tutorials is that they are useful when you can predict the kinds of things that a user will want to do with a program. but with pd, beyond the first few steps, the possible things people might want to do become two numerable to try and pin down with a series of howtos.
not saying a tutorial shouldn't exist, just predicting that it would be unsatisfyingly short.
the help patches, read in order, have a tutorial-like feel at times, without quite so much of the "for dummies" condescension.
pix.
On Mon, 23 Jun 2003 11:11:29 +0200 "Andrea Valle" marta_andrea@libero.it wrote:
Hi to all, I was aking myself: is there on line a real PD tutorial for dummies? I mean, something like: "now, let's play a sound file"... thanks to all
-a-
-----Messaggio originale----- Da: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]Per conto di Miller Puckette Inviato: martedi 24 giugno 2003 8.59 A: f:o Cc: pd-list@iem.kug.ac.at Oggetto: Re: [PD] error while reading filename from textfile
Try making the message box (that says "symbol $1") into an object box, just "symbol". This converts the selector of the message coming from textfile into a message with one symbol argument, which is what makefilename needs.
cheers Miller
On Sun, Jun 22, 2003 at 01:41:20AM +0200, f:o wrote:
hi list
I'm trying to read a filename from a textfile list.
I got the filename in pd but if I like to get this filename in a
messagebox
with $1, pd got an error:
error: $1: argument number out of range
trying to get the filename in makesymbol or makefilename:
error: makesymbol: no method for 'filename.blah'
maybe someone can tell me, why this doesn't work and what would be
a
working solution.
thanx a lot philipp
part of my patch that does not work:
|bang(
| __________ |textfile|
| ___________ |symbol $1(
| ______________________ |makefilename path/%s{
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list