I am trying to make a pair of abstractions for serial communication:
ascii2pd is done and working, but pd2ascii is difficult to implement because there is no efficient way to split a symbol into it's individual elements as in converting symbol bob into list b o b
I tried:
ascii library but it is not maintained anymore and has some bugs.
ascseq but it is scheduled so structures like the following are
impossible:
[AAAA<
|
[t b a]
|
|
[13< [ascseq 0]
| /
[print]
It will output "65,13,65,65,65" instead of the expected "65,65,65,65,13"
Anyone have any suggestions for try number 4?
Tom
Thomas Ouellet Fredericks wrote:
Anyone have any suggestions for try number 4?
zexy's [symbol2list] does break a symbol into a list of characters if your delimiter is the empty [symbol(. you then have to find a way to convert the characters into numbers (but you surely already have a solution for this)
mfg.ad.sr IOhannes
No way! Just wasted a day. Thanks. Zexy rocks.
Tom
----- Original Message ----- From: "IOhannes m zmoelnig" zmoelnig@iem.at To: "Thomas Ouellet Fredericks" iamonthebeach@gmail.com Cc: "PD List" pd-list@iem.at Sent: Monday, May 08, 2006 2:44 AM Subject: Re: [PD] splitting a symbol into individual characters & ascii
Thomas Ouellet Fredericks wrote:
Anyone have any suggestions for try number 4?
zexy's [symbol2list] does break a symbol into a list of characters if your delimiter is the empty [symbol(. you then have to find a way to convert the characters into numbers (but you surely already have a solution for this)
mfg.ad.sr IOhannes
moin Thomas, moin list,
you might try my [pd-string] externals -- [any2string] does what I think you're describing. The code is available either via CVS (in externals/moocow/pdstring) or from me:
http://www.ling.uni-potsdam.de/~moocow/projects/pd/#pdstring
marmosets,
Bryan
Thomas Ouellet Fredericks wrote:
I am trying to make a pair of abstractions for serial communication:
- pd2ascii: converts any message into ascii codes
- ascii2pd: converts ascii codes into any message
ascii2pd is done and working, but pd2ascii is difficult to implement because there is no efficient way to split a symbol into it's individual elements as in converting symbol bob into list b o b
I tried:
ascii library but it is not maintained anymore and has some bugs.
ascseq but it is scheduled so structures like the following are
impossible:
[AAAA< | [t b a] |
|
[13< [ascseq 0] | / [print]It will output "65,13,65,65,65" instead of the expected "65,65,65,65,13"
- Toxy but it suffers the same limitations as ascseq
Anyone have any suggestions for try number 4?
Tom
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
there is also Marc Lavallee's "ascii" which does any2ascii and ascii2any. makes floats and symbols, lists properly too, not just symbols.
Marc, I don't have time to put it into CVS...
I did get it to compile on OSX with a new flext, just follow Thomas's directions.
it should be in CVS now!
.b.
Bryan Jurish wrote:
moin Thomas, moin list,
you might try my [pd-string] externals -- [any2string] does what I think you're describing. The code is available either via CVS (in externals/moocow/pdstring) or from me:
http://www.ling.uni-potsdam.de/~moocow/projects/pd/#pdstring
marmosets,
Bryan
Thomas Ouellet Fredericks wrote:
I am trying to make a pair of abstractions for serial communication:
- pd2ascii: converts any message into ascii codes
- ascii2pd: converts ascii codes into any message
ascii2pd is done and working, but pd2ascii is difficult to implement because there is no efficient way to split a symbol into it's individual elements as in converting symbol bob into list b o b
I tried:
ascii library but it is not maintained anymore and has some bugs.
ascseq but it is scheduled so structures like the following are
impossible:
[AAAA< | [t b a] |
|
[13< [ascseq 0] | / [print]It will output "65,13,65,65,65" instead of the expected "65,65,65,65,13"
- Toxy but it suffers the same limitations as ascseq
Anyone have any suggestions for try number 4?
Tom
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list