itoa doesn't understand "symbol"
Hi all,
I'm facing a really annoying error message that keeps getting sent from itoa as I am using it to parse serial input in the following <attached> patch. I was trying to figure out if a ggate could be used to solve this issue, but it seems like that [zl group 1000] is the culprit and the issue happens when I am not sending the message I expect.
Any advice is appreciated, thanks for reading.
If simple combo: serial out -> sel 113 10 -> zl group -> itoa -> fromsymbol
does not work, than messages sent to serial object are not correct.
In the posted patch there are things to get rid of :
1- metro banging sel 13 10 makes no sense
2- that ggate makes no sense
3- fromsymbol @separator , makes no sense - what for is comma ?
And what is that misterious error message getting sent from itoa ?
#1 I thought the sel 13 10 was used to select the terminal characters for the serialized data?
#2 agreed, removed the ggate
#3 the comma is used to parse, a 3-number tuple as the input is being sent as 3 numbers that I am tracking on my hardware.
10 and 13 represent Line Feed and Carriage Return .
If You send data from for example arduino,
println would send 10 as end of line.
That is used to output collected data from zl group.
If all that is received are 3 numbers, then output of
zl group is a plain list, without commas.
With separator set to "," You just iter the list
(forward item by item) to unpack.
Then unpack outputs all it receives only to first outlet.
That is why separator , is a mistake.
-------------------
But if You for whatever reason send commas between 3 numbers over serial,
than You need to filter commas out before converting
to ascii and making a list.
for example inserting sel 44 or route 44 or zl filter 44 between zl group
and itoa, or even better adding 44 to sel 13 10 == sel 13 10 44
Than commas will not reach zl group.
-------------------
Tuples are used in Python as sequence of numbers, similar to lists.
Are You sending that to max ?
If You still have troubles getting serial data correctly in Max,
then post exactly what is being sent and from where
or what device, software etc.