Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
With simple naming of the patches such as numbers, works beautifully. However if the name is a word, I cannot open them. What kind of command should I send to this message to make it work?
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Thanks for any hints!
Best, Popesz
Hi,
On 26/11/2019 14:12, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
With simple naming of the patches such as numbers, works beautifully. However if the name is a word, I cannot open them. What kind of command should I send to this message to make it work?
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
try [symbol cat( or [list cat( instead of just [cat(
for more details read the fine manual, specifically about messages and selectors https://puredata.info/docs/manuals/pd/x2.htm#s3.1
Thanks, so simple, so powerful :) Works perfectly!
Popesz
On Tue, Nov 26, 2019 at 3:42 PM Claude Heiland-Allen claude@mathr.co.uk wrote:
Hi,
On 26/11/2019 14:12, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
With simple naming of the patches such as numbers, works beautifully. However if the name is a word, I cannot open them. What kind of command should I send to this message to make it work?
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
try [symbol cat( or [list cat( instead of just [cat(
for more details read the fine manual, specifically about messages and selectors https://puredata.info/docs/manuals/pd/x2.htm#s3.1
Claude
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
helo,
I don't understand why most people use send and receive object all the time exept when sending message to pd.
I think > [; pd open $1.pd /path-topatch;( is very confusing.
having : [open $1.pd /path-topatch;( | [send pd] is lot's more logic.
moreover, you can add a print and see what you are doing. In this situation, you would notice that $1 is not convertet to cat. (an error in pd log would also help to find the problem).
anyway, replace [cat< by [symbol cat< and it will work.
best Cyrille
Le 26/11/2019 à 15:12, Csaba Láng a écrit :
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
With simple naming of the patches such as numbers, works beautifully. However if the name is a word, I cannot open them. What kind of command should I send to this message to make it work?
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Thanks for any hints!
Best, Popesz
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
Read about Pd's message types: https://puredata.info/docs/manuals/pd/x2.htm#s3.1
Roman
list cat works, for some reason symbol does not. But what if I have a lot of patches to open, and not only cat :) how can I make it interchangeable? [list $1( what command should get to open any other namings?
On Tue, Nov 26, 2019 at 3:51 PM Roman Haefeli reduzent@gmail.com wrote:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
Read about Pd's message types: https://puredata.info/docs/manuals/pd/x2.htm#s3.1
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Do apoligize, both symbol and list works fine!
On Tue, Nov 26, 2019 at 3:58 PM Csaba Láng langcsaba@gmail.com wrote:
list cat works, for some reason symbol does not. But what if I have a lot of patches to open, and not only cat :) how can I make it interchangeable? [list $1( what command should get to open any other namings?
On Tue, Nov 26, 2019 at 3:51 PM Roman Haefeli reduzent@gmail.com wrote:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
Read about Pd's message types: https://puredata.info/docs/manuals/pd/x2.htm#s3.1
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Am 26. November 2019 15:49:07 MEZ schrieb Roman Haefeli reduzent@gmail.com:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
and if you have many, many files (msgboxes) you can convert (almost) any selector toa symbol with [symbol]:
[cat( | [symbol] | [; pd open $1.pd /path/to/(
mfg.hft.fsl IOhannes
Am 26. November 2019 15:49:07 MEZ schrieb Roman Haefeli reduzent@gmail.com:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
and if you have many, many files (msgboxes) you can convert (almost) any selector toa symbol with [symbol]:
jumping on this I must admit that I never understood when a selector such as "symbol" or "list" has to be provided explicitely, or to be trimmed off.
From https://puredata.info/docs/manuals/pd/x2.htm#s3.1 I understand that
the message [1( has an implicit selector of "float" and is equivalent to [float 1(
Also the message [1 2 3( has an implicit selector of "list" and is equivalent to [list 1 2 3(
It seems the selector is always a symbol (one or many characters without whitespace nor semicolons nor commas).
It seems symbols themselves have no selector(?) as [foo( seems to be the selector "foo" itself and is not the same as [symbol foo( at least not when printing to the console window.
Now is this why [cat( in the original poster's question did not have a selector "symbol" and one had to be added eg. with [symbol]. Was this because it was used in another message box or in a $1 substitution?
A message [stop( to a [delay] object does not require "stop" to be prefixed by a "symbol" selector.
Why does this still seem a mixup of symbols with and symbols without a "symbol" selector to me? Can this be clarified somehow?
Thanks to everyone, P
Just think like that: a message selector can't be a number (or pointer), that's why [1( automatically gets a "float" selector and [1 foo bar( automatically gets the "list" selector. Otherwise, the first item is the selector, so [foo bar( is a "foo" message, but [symbol foo( is a symbol message.
If you want to turn Pd lists into messages, you have to strip the "list" selector with [route list]. This obviously doesn't work if the next item is a number, so [list 1 2 3( -> [route list] passes the message unchanged, but [list foo 1 2( -> [route list] results in the message [foo 1 2( because "foo" is a valid selector.
A message [stop( to a [delay] object does not require "stop" to be prefixed by a "symbol" selector.
because [stop( is a "stop" message and [symbol stop( is a "symbol" message.
If you want to know the gritty details, you have to study the C code, I'm afraid...
Christof
Gesendet: Dienstag, 26. November 2019 um 16:59 Uhr Von: "Peter P." peterparker@fastmail.com An: pd-list@lists.iem.at Betreff: Re: [PD] opening patch from pd message
- IOhannes m zmölnig zmoelnig@iem.at [2019-11-26 16:03]:
Am 26. November 2019 15:49:07 MEZ schrieb Roman Haefeli reduzent@gmail.com:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
and if you have many, many files (msgboxes) you can convert (almost) any selector toa symbol with [symbol]:
jumping on this I must admit that I never understood when a selector such as "symbol" or "list" has to be provided explicitely, or to be trimmed off.
From https://puredata.info/docs/manuals/pd/x2.htm#s3.1 I understand that the message [1( has an implicit selector of "float" and is equivalent to [float 1(
Also the message [1 2 3( has an implicit selector of "list" and is equivalent to [list 1 2 3(
It seems the selector is always a symbol (one or many characters without whitespace nor semicolons nor commas).
It seems symbols themselves have no selector(?) as [foo( seems to be the selector "foo" itself and is not the same as [symbol foo( at least not when printing to the console window.
Now is this why [cat( in the original poster's question did not have a selector "symbol" and one had to be added eg. with [symbol]. Was this because it was used in another message box or in a $1 substitution?
A message [stop( to a [delay] object does not require "stop" to be prefixed by a "symbol" selector.
Why does this still seem a mixup of symbols with and symbols without a "symbol" selector to me? Can this be clarified somehow?
Thanks to everyone, P
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 11/26/19 4:59 PM, Peter P. wrote:
- IOhannes m zmölnig zmoelnig@iem.at [2019-11-26 16:03]:
Am 26. November 2019 15:49:07 MEZ schrieb Roman Haefeli reduzent@gmail.com:
On Tue, 2019-11-26 at 15:12 +0100, Csaba Láng wrote:
Dear list,
I want to open from a pd patch a pd patch withe the message:
[; pd open $1.pd /path-topatch;(
[...]
just to be clear, if I want to open cat.pd, a message [cat( will not make it happen.
Use [symbol cat(.
and if you have many, many files (msgboxes) you can convert (almost) any selector toa symbol with [symbol]:
jumping on this I must admit that I never understood when a selector such as "symbol" or "list" has to be provided explicitely, or to be trimmed off.
# anatomy of a message
i think it is pretty easy:
atoms (including none).
some special selectors need a fixed number of atoms, of a fixed type ("float" and "symbol" require exactly 1 atom of the resp. type; "bang" requires exactly 0 atoms); but these are special cases.
dollar-arguments in msgboxes (e.g. [open $1.wav() always refer to the atoms.
## implicit selectors
if you have a msgbox [foo bar 1(, then this is a message with the selector "foo" and two atoms, a symbol "bar" and a number "1".
if you have a msgbox [1(, then the 1st element would be "1" (a number). since messages must always start with a selector (a symbol), it cannot start with the number "1". and Pd implicitely adds a default selector to this message. since the msg only consists of a single number atom, the implicitely added selector is "float". if you have a msgbox [1 bar foo(, we also miss a (symbol) selector, but the "float" selector requires a single atom (and our message has 3 atoms, once we add a selector), so Pd adds a "list" selector.
# why do we need selectors?
so why are messages like they are in the first place? each object in Pd has a number of methods (functions that interact with the internal state of the object). objects and methods are something we know from object-oriented programming (C++, ...) in Pd, objects communicate via messages - and communication boils down to calling methods in other objects. so messages need some way to encode which method of the downstream object is being called: and this is what the selector does. e.g. an object might have a method for messages with the "foo"-selector and messages with the "bang" selector, but no messages with the "float" selector.
so if you want to stop a delay, you want to call the "stop" method of the [delay] object, thus sending a [stop( message (selector is "stop", no atoms).
mdsar IOhannes
[...]
# anatomy of a message
i think it is pretty easy:
- any message in pd-land consists of a single selector and any number of
atoms (including none).
- an atom can be a number, a symbol, a gpointer and "other things"
- a selector must always be a symbol.
some special selectors need a fixed number of atoms, of a fixed type ("float" and "symbol" require exactly 1 atom of the resp. type; "bang" requires exactly 0 atoms); but these are special cases.
Thank you for this nice writeup! It makes it all clearer (and could nicely augment the html docs even).
[...]
dollar-arguments in msgboxes (e.g. [open $1.wav() always refer to the atoms.
So a message [symbol cat( would work as cat would be the atom but [cat( not as it would be the selector with zero atomes?
Thanks again, P
On Tue, 2019-11-26 at 18:33 +0100, IOhannes m zmölnig wrote:
# anatomy of a message
i think it is pretty easy:
- any message in pd-land consists of a single selector and any number
of atoms (including none).
- an atom can be a number, a symbol, a gpointer and "other things"
- a selector must always be a symbol.
some special selectors need a fixed number of atoms, of a fixed type ("float" and "symbol" require exactly 1 atom of the resp. type; "bang" requires exactly 0 atoms); but these are special cases.
dollar-arguments in msgboxes (e.g. [open $1.wav() always refer to the atoms.
## implicit selectors
if you have a msgbox [foo bar 1(, then this is a message with the selector "foo" and two atoms, a symbol "bar" and a number "1".
if you have a msgbox [1(, then the 1st element would be "1" (a number). since messages must always start with a selector (a symbol), it cannot start with the number "1". and Pd implicitely adds a default selector to this message. since the msg only consists of a single number atom, the implicitely added selector is "float". if you have a msgbox [1 bar foo(, we also miss a (symbol) selector, but the "float" selector requires a single atom (and our message has 3 atoms, once we add a selector), so Pd adds a "list" selector.
# why do we need selectors?
so why are messages like they are in the first place? each object in Pd has a number of methods (functions that interact with the internal state of the object). objects and methods are something we know from object-oriented programming (C++, ...) in Pd, objects communicate via messages - and communication boils down to calling methods in other objects. so messages need some way to encode which method of the downstream object is being called: and this is what the selector does. e.g. an object might have a method for messages with the "foo"- selector and messages with the "bang" selector, but no messages with the "float" selector.
so if you want to stop a delay, you want to call the "stop" method of the [delay] object, thus sending a [stop( message (selector is "stop", no atoms).
This sums up the nature of Pd's message much more comprehensively than what can be found in Pd's own HTML documentation, I find at least.
Roman