[PD] convert symbol to int

federico xaero at inwind.it
Sun Jun 12 16:40:12 CEST 2005


> pd -lib gridflow
>
> and put this external in your ~/.gridflow_startup :
>
> GridFlow::FObject.subclass("atof",1,1) {
>   def _0_symbol s
>     m = /[-+0-9\.eE]+/ .match s.to_s
>     send_out 0, Float(m[1])
>   end
> }
>
> This is a [atof] external which will extract the first numeric string
> in a symbol message and output the corresponding float.
>
> note: I didn't test the above code, so if someone tells me it doesn't
> work, I'll correct the typos. (my computer just blew up so I don't
> have access to PureData at the moment)

whooops..
i read too late your post, and my hand was faster than me to write this
external:
atoi (any-to-int) http://xaero.ath.cx/cms/?53

however i saw interesting features in gridflow, and when i got a moment
i will install it..





More information about the Pd-list mailing list