[PD] Any way to convert numeric symbols to floats?

Luke Iannini (pd) lukexipd at gmail.com
Fri Feb 23 11:40:43 CET 2007


I know this probably falls into the category of string discussion, but
I'm interested if there are any solutions to this currently
employable:

I have a symbol that I'm splitting up in order to extract numerical
content from the text.  I'm using zexy's s2l for this, then routing
the float data back into l2s to assemble a value.  But l2s only spits
out a symbol, and I can't seem to find any object to reinterpret the
symbol as a float.

Even using list trim to remove the symbol selector leaves me with a
numeric message that pd still refuses to interpret as such.  [float]
won't take it, nor will [t f], and [list] just turns it back into a
symbol.  I've attached a patch demonstating this issue.

The only solution I can think of is to make a decimal interpreter to
assemble my number rather than l2s (since s2l spits out the list as
floats just fine), but that seems a bit silly.

I look forward to the discussion : ).

Luke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CantConvertSymboltoFloat.pd
Type: application/octet-stream
Size: 883 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070223/219183e2/attachment.obj>


More information about the Pd-list mailing list