[PD] bytes to string

Roman Haefeli reduzent at gmail.com
Wed Jul 3 17:22:18 CEST 2013

On Wed, 2013-07-03 at 16:36 +0200, Charles Goyard wrote:
> Hi list,
> apologizes, this looks like a FAQ, but I can't find anything in the
> archives (wrong keywords ?) for this.
> I just want to turn the bytes from comport output into a list.
> From a serial monitor, my program outputs:
> "1.23 456 789\n"
> I get it correctly into pd and it seems to work. But it looks ugly and
> I feel it could be better done.

I don't see how it could be improved much. Why is it ugly?

The only smallish improvement I see is the way you convert a stream into
lists. The recursive [list prepend] approach gets more and more
inefficient the longer the list gets. You could use a message box
instead and add your bytes with [add2 $1(. And on termination  (sel 10)
send a 'bang, set' to output the finished list and empty the message


More information about the Pd-list mailing list