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 box. Roman _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list