[PD] escape characters in messages

Frank Barknecht barknech at ph-cip.uni-koeln.de
Sat Oct 12 16:43:16 CEST 2002


Hi,
Johannes Taelman hat gesagt: // Johannes Taelman wrote:

> Hi,
> 
> Is there an escape character sequence to make special characters (',' and
> ';') in messages literal?

No, there isn't unfortunatly.  

> I need something like
> 
> +*--,
> |3   \
> +*---+
>  |
> +*-----------
> | add2 $1\, (
> +*-----------
>  |
> +*------------
> | 0, 1, 2, 3 (
> +*------------

You could send this into a textfile object like shown in the attached
patch. 

> I found one (maybe) related comment in m_binbuf.c :
> 
> /* add a binbuf to another one for saving.  Semicolons and commas go to
> symbols ";", "'",; the symbol ";" goes to "\;", etc. */
> 
> Is this only for internal housekeeping?

This is actually for saving of patches. If you open a pd-patch in a
text editor, you'll see a backslash before messages with a ";", like 
#X msg 300 205 \; pd dsp 1;

> Another possibility to achieve this would be an 'add1' method, that adds
> the ',', just like 'add' adds a ';'.
> 
> Other solutions?

There are several external objects operating on lists like sprinkler,
prepend and such. 

ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 133 211 textfile;
#X msg 68 175 print;
#X msg 133 91 add \$1;
#X floatatom 133 68 5 0 0;
#X obj 133 243 print tf;
#X msg 241 67 bang;
#X msg 240 35 rewind;
#X obj 241 135 until;
#X msg 241 106 3;
#X text 270 105 output next 3 elements;
#X text 280 65 output next element;
#X msg 80 66 clear;
#X text 120 42 add numbers;
#X msg 300 205 \; pd dsp 1;
#X connect 0 0 4 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 8 0 7 0;
#X connect 11 0 0 0;


More information about the Pd-list mailing list