[PD] bang and zero?

Frank Barknecht fbar at footils.org
Tue Aug 1 13:18:04 CEST 2006


Hallo,
Oded Ben-Tal hat gesagt: // Oded Ben-Tal wrote:

> I noticed that sometimes a bang message gets converted to zero but not 
> always. for example if I send a bang to a number object it dosn't change 
> anything, but if I pass the bang through a pipe object first it changes 
> the number to zero. Does anyone know why?

[pipe] as default stores and delays float numbers. If you bang a
[pipe] object it will kind of see it as if you'd send a 0. Funny
things will happen if you send something different. 

You can make a pipe expect symbols by using it as [pipe s 0].  You
also can make pipe expect pointers, but unfortunatly you cannot make
it expect variable length lists AFAIK.

See attached example patch.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 0 0 916 372 10;
#X msg 481 77 bang;
#X obj 481 119 pipe s 100;
#X msg 563 76 symbol x;
#X msg 307 78 bang;
#X msg 389 77 symbol x;
#X obj 307 120 pipe f 100;
#X msg 350 77 12;
#X msg 524 76 12;
#X obj 307 147 print pipe_float;
#X obj 481 146 print pipe_symbol;
#X msg 55 81 bang;
#X msg 137 80 symbol x;
#X msg 98 80 12;
#X obj 55 123 pipe;
#X obj 55 150 print pipe_default_float;
#X msg 204 79 list 1 2 3;
#X msg 645 76 list 1 2 3;
#X msg 730 75 list a b c;
#X connect 0 0 1 0;
#X connect 1 0 9 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 6 0 5 0;
#X connect 7 0 1 0;
#X connect 10 0 13 0;
#X connect 11 0 13 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 15 0 13 0;
#X connect 16 0 1 0;
#X connect 17 0 1 0;


More information about the Pd-list mailing list