In Max I was used to put (longish) text containing comma's, spaces, etc. in a message box and send it to the serial port. In Pd the message box splits the message on the comma and strips it off the output.
I have been looking around on how to accomplice this in Pd. Any ideas?
-
Sending strings containing comma's to serial port
-
@artelse In Pd 0.49 under Windows it can sort of be done by escaping the comma and the space.... like this........ escaped.zip
Unfortunately keycode 92 (backslash) is still sometimes dropped when the patch is saved..... even in comments. Prior to Pd 0.49 it could not even be typed.
The above patch will give the correct ascii list if your original text is preceded by "list" or "symbol" and the "comma" and "space" are escaped.
It might work, but inability to save the message probably means it's useless.
David.
-
Thanks for the reply, will check it out. Am on latest PurrData which is on Pd 0.48 still, so will try vanilla.
Edit: Installed Pd vanilla and indeed the second \ is not saved. Am I correct in concluding that sending text from a message box including comma's, spaces, etc. to the serial port is impossible with Pd? Does someone know if there is perhaps a text field external that can be used for this purpose?
-
@artelse Ahh! Purr Data might be different, but generally <space> <comma> and <semi-colon> have reserved purposes in Pd... and many other programs too....
David. -
@whale-av Actually in Purr Data, the escape character works with Pd 0.48.0. When I do the following it works as I want. Like so, a phoneme definition:
But on save the escape is lost -
@artelse Yes, same in Vanilla as I said above..... aarrgh.
Looking at the text file of a patch the \ becomes \ ........ the escape is escaped....
I will post again if I can think of a solution.
David. -
@artelse As you already disassemble the text into ASCII code, why not adding the commas manually? Like this:
-
@ingox Thanks for that solution or workaround! I still will file a bug report as loosing escape characters is clearly incorrect. BTW, just making a copy of a message box with the escape char looses it.
-
@artelse It is not just Pd.... as you see in my post above the same applies to this forum...
It should read "the backslash becomes backslash backslash ........." and the second is dropped.
More reading to be done on this subject.
David. -
@whale-av Ah, but I referred to Purr Data here where the first backslash also gets trashed.
-
the console prints: "parse-output: [:tuw <300 \, 10>]", i do not know if that helps. -
@Jona Another solution that works! Now when Purr Data fixes that discard bug, I seem to be set.