Re: [PD] detect character in a symbol?

2010-08-10 Thread João Pais

I've looked into this. I see two problems:

- this would be for the famous patch that I'm sending around. Since it's  
for non-pd users, I should limit myself to pd-ext objects - or I would  
have to ship gridflow with it, which might not be legal (don't know), but  
anyway isn't practical.


- I couldn't understand how to go from x/y (x and y being any natural  
numbers) to any other string format that I could use with [sel]. as I  
understood, string replace doesn't take spaces or expressions like a  as  
parameter. In the cases I'm thinking of, the character to be detected is  
always in the middle. For now I'm using charaters / and :, like 7/8 or  
1:13.


Joao


On Sat, 7 Aug 2010, João Pais wrote:


a quick question: I wanted to detect a character in a symbol, in order
to route that symbol in a different way. Afaik, there is no object that
does that, so the only way would be to decompose the symbol in ascii
values, and then detect it.


you can use [gf/string_replace] to replace one character by any other and
then you use [sel] to see whether you get a different symbol.

  _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801



--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-10 Thread João Pais
Hmm, I couldn't find this. Basically I want a way to detect the difference  
between symbols like 4/8 and 4:8. for now, maybe other characters will  
come in later.




-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/07/2010 11:30 PM, João Pais wrote:

Hi,

a quick question: I wanted to detect a character in a symbol, in order  
to
route that symbol in a different way. Afaik, there is no object that  
does

that,


[routeOSC] can basically do that, since it supports wildcard matching.
the only limitation is, that the message's selector has to start with a
/, but that can quite easily be done in vanilla Pd.

fgamsdr
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxfBUEACgkQkX2Xpv6ydvSPPQCfW6aYBkbPAy59rDTIJjKo24Uc
EiMAn27sf5Crq3znFwkNbn4wXSQAFuIA
=UvpT
-END PGP SIGNATURE-



--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-10 Thread Jack
Don't know if it is what you are looking for.
++

Jack



Le mardi 10 août 2010 à 11:07 +0100, João Pais a écrit :
 I've looked into this. I see two problems:
 
 - this would be for the famous patch that I'm sending around. Since it's  
 for non-pd users, I should limit myself to pd-ext objects - or I would  
 have to ship gridflow with it, which might not be legal (don't know), but  
 anyway isn't practical.
 
 - I couldn't understand how to go from x/y (x and y being any natural  
 numbers) to any other string format that I could use with [sel]. as I  
 understood, string replace doesn't take spaces or expressions like a  as  
 parameter. In the cases I'm thinking of, the character to be detected is  
 always in the middle. For now I'm using charaters / and :, like 7/8 or  
 1:13.
 
 Joao
 
  On Sat, 7 Aug 2010, João Pais wrote:
 
  a quick question: I wanted to detect a character in a symbol, in order
  to route that symbol in a different way. Afaik, there is no object that
  does that, so the only way would be to decompose the symbol in ascii
  values, and then detect it.
 
  you can use [gf/string_replace] to replace one character by any other and
  then you use [sel] to see whether you get a different symbol.
 
_ _ __ ___ _  _ _ ...
  | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
 
 



testDiff.pd
Description: application/extension-pd
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-10 Thread Mathieu Bouchard

On Tue, 10 Aug 2010, João Pais wrote:

- I couldn't understand how to go from x/y (x and y being any natural 
numbers) to any other string format that I could use with [sel]. as I 
understood, string replace doesn't take spaces or expressions like a  
as parameter. In the cases I'm thinking of, the character to be detected 
is always in the middle. For now I'm using charaters / and :, like 7/8 
or 1:13.


You said you wanted to detect, not split. Replacing a character by a space 
does not split a symbol in several elements (but it does if you know how 
to take advantage of pd's traditional bugs). Otherwise use [s2l] or [l2s].


- this would be for the famous patch that I'm sending around. Since 
it's for non-pd users, I should limit myself to pd-ext objects


If it's for non-pd users, you should limit yourself to non-pd objects. I 
mean, if they end up using your patch, they will be some kind of pd user, 
albeit one that we don't see so often so far.


or I would have to ship gridflow with it, which might not be legal 
(don't know),


ah, thanks for the feedback. (??)

 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-10 Thread João Pais

- this would be for the famous patch that I'm sending around. Since
it's for non-pd users, I should limit myself to pd-ext objects


If it's for non-pd users, you should limit yourself to non-pd objects. I
mean, if they end up using your patch, they will be some kind of pd user,
albeit one that we don't see so often so far.


well, technically they're using pd, even if they don't even know about it.  
they'll know even less when the java (processing) gui is done, and pd runs  
in -nogui mode.
anyway these are people that don't know about Pd and don't really want to,  
they have other priorities.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-10 Thread João Pais
thanks. it wasn't really exactly what I wanted, but it inspired me to find  
the solution, using the s2l-symbol trick.



Don't know if it is what you are looking for.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-08 Thread Mathieu Bouchard

On Sat, 7 Aug 2010, João Pais wrote:

a quick question: I wanted to detect a character in a symbol, in order 
to route that symbol in a different way. Afaik, there is no object that 
does that, so the only way would be to decompose the symbol in ascii 
values, and then detect it.


you can use [gf/string_replace] to replace one character by any other and 
then you use [sel] to see whether you get a different symbol.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-08 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/07/2010 11:30 PM, João Pais wrote:
 Hi,
 
 a quick question: I wanted to detect a character in a symbol, in order to
 route that symbol in a different way. Afaik, there is no object that does
 that, 

[routeOSC] can basically do that, since it supports wildcard matching.
the only limitation is, that the message's selector has to start with a
/, but that can quite easily be done in vanilla Pd.

fgamsdr
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxfBUEACgkQkX2Xpv6ydvSPPQCfW6aYBkbPAy59rDTIJjKo24Uc
EiMAn27sf5Crq3znFwkNbn4wXSQAFuIA
=UvpT
-END PGP SIGNATURE-

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] detect character in a symbol?

2010-08-07 Thread João Pais

Hi,

a quick question: I wanted to detect a character in a symbol, in order to
route that symbol in a different way. Afaik, there is no object that does
that, so the only way would be to decompose the symbol in ascii values,
and then detect it.

Btw, this would also be used to decompose the original symbol into several
parts (e.g. 123as78 - 123 as 78). As before, the only way I imagine it
would be doable in Pd would be through ascii decomposition.

Any better ideas?

Thanks,

João

--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jm...@gmx.net | skype: jmmmpjmmmp

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-07 Thread patko
Hi,

- João Pais jmmmp...@googlemail.com a écrit :

 Hi,
 
 a quick question: I wanted to detect a character in a symbol, in order
 to
 route that symbol in a different way. Afaik, there is no object that
 does
 that, 

 have you tried [any2string] ?



so the only way would be to decompose the symbol in ascii
 values,
 and then detect it.
 
 Btw, this would also be used to decompose the original symbol into
 several
 parts (e.g. 123as78 - 123 as 78). As before, the only way I imagine
 it
 would be doable in Pd would be through ascii decomposition.
 
 Any better ideas?
 
 Thanks,
 
 João
 
 -- 
 Friedenstr. 58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162 6843570
 Studio +49 30 69509190
 jm...@gmx.net | skype: jmmmpjmmmp
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

-- 
Patrice Colet 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] detect character in a symbol?

2010-08-07 Thread João Pais

a quick question: I wanted to detect a character in a symbol, in order
to
route that symbol in a different way. Afaik, there is no object that
does
that,


 have you tried [any2string] ?


ah, yes, I didn't say it. I mean, I know how to do it in the way I  
described. I wanted to know if there's another way that I'm not aware of.


joao

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list