Text to ASCII code
I'm working on a patch that takes a upc bar code that triggers 12 integers that will be hooked up to a coll object to generate musical phrases. I've decided to use the ASCII code to split the barcode into the 12 digits I need for the rest of the patch. I originally inquired about this a few months back. Here's a link to that conversation. https://cycling74.com/forums/index.php?t=msg&goto=126809#msg_126809
The problem with all the proposed solutions is the message box. I need to use the Text Edit object to do what I want to do.
Here is what I have so far.
For some reason neither bang nor enter works with the upc code the same way that it does when the barcode is scanned in. Here is what I get when I scan the barcode.
print: 13 13 13 13 13 13 13 13 13 13 13 13
print: 8 8 8 8 8 8 8 8 8 8 8 8
print: 48 48 48 48 48 48 48 48 48 48 48 48
print: 55 55 55 55 55 55 55 55 55 55 55 55
print: 55 55 55 55 55 55 55 55 55 55 55 55
print: 51 51 51 51 51 51 51 51 51 51 51 51
print: 50 50 50 50 50 50 50 50 50 50 50 50
print: 54 54 54 54 54 54 54 54 54 54 54 54
print: 54 54 54 54 54 54 54 54 54 54 54 54
print: 49 49 49 49 49 49 49 49 49 49 49 49
print: 57 57 57 57 57 57 57 57 57 57 57 57
print: 50 50 50 50 50 50 50 50 50 50 50 50
print: 53 53 53 53 53 53 53 53 53 53 53 53
print: 52 52 52 52 52 52 52 52 52 52 52 52
print: 13 13 13 13 13 13 13 13 13 13 13 13
UPC bar code only encode numeric characters. Code 128 is capable of encoding all ASCII characters. To encode the text to a bar code using a font, a barcode font encoder is needed to format the characters to text string for a barcode font.
UPC barcodes can be printed at various densities to accommodate a variety of printing and scanning processes. The significant dimensional parameter is called x-dimension, the ideal width of single module element.