moin Alexandros,

On Fri, Dec 25, 2015 at 11:43 AM, Alexandros Drymonitis <[email protected]>
wrote:
>
> On Thu, Dec 24, 2015 at 9:54 PM, Bryan Jurish <[email protected]>
> wrote:
>
>> looks like you're creating an "any" message with the selector "float",
>> which iirc pd interprets as it does the output of a [float] object. without
>> further arguments (the float value), the float's value defaults to zero.
>>  if you really want the symbol "float", prefix it with the selector
>> "symbol" or "list".
>>
> This doesn't seem to fix it. Tried both prefixes but with the "list"
> prefix I still get a 0, and with the "symbol" prefix I get a bang...
>

where are you inserting the selectors?  i just tried here and i get "0" for
the "list" selector too, but "symbol" ought to work -- of course, it's a
problem if you might also be passing through "real" floats (i.e.
real-valued numbers like "42.247" or some such).

i'm not sure what context you're using this in, but i think you're running
into the fact that pd internally handles some selectors (notably "float"
and "symbol") differently from most others.  so passing a 'pure' symbol
"float" through [any2bytes] should be the same as passing the output of a
message box [float( through it, i.e. [list 102 108 111 97 116(.
 [bytes2any] should map that right back onto a simple [float( message, but
[print] is likely to output "0" for that.  if you need [float( alone to map
to [symbol float(, then my guess is that you'll need to handle that
specially.

marmosets,
  Bryan


-- 
Bryan Jurish                           "There is *always* one more bug."
[email protected]         -Lubarsky's Law of Cybernetic Entomology
#N canvas 563 120 470 526 10;
#X msg 82 47 symbol float;
#X obj 82 121 any2bytes;
#X obj 98 147 print a2b;
#X obj 82 178 bytes2any;
#X obj 97 203 print b2a;
#X msg 280 48 list symbol float;
#X msg 186 47 list float;
#X obj 280 117 print in;
#X msg 31 46 float;
#X connect 0 0 7 0;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 3 0;
#X connect 3 0 4 0;
#X connect 5 0 7 0;
#X connect 5 0 1 0;
#X connect 6 0 7 0;
#X connect 6 0 1 0;
#X connect 8 0 7 0;
#X connect 8 0 1 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to