Using barcode scanner data for audio/MIDI
Mar 10 2023 | 7:46 pm
Hello everyone! Been a long time. Great to see how far Max has progressed!
I’m interested in using barcode scanners to generate audio/MIDI/etc and am wondering what others have found in this area. Seen a few interesting videos with a Japanese group doing this, but it seems like the scanners have been modified, which I’d like to avoid---just use what they naturally output and let Max do the rest.
From what I’ve read, most scanners send a numeric text string as keystrokes, so it should be pretty simple to get access via [key] or other text objects. That’s OK to get single strings of unique numbers to play back samples etc. But I’d like to make it more of an instrument versus a sample trigger. Specifically:
-- Long unique numbers aren’t needed. Rather, I’d like a smaller set of simpler numbers that I can translate to frequencies, instruments, or other parameters. So do the scanners output shorter numbers if they read fewer lines? Or maybe the full number is padded with zeroes, which would be easy to strip off.
-- If the scanners output shorter numbers/padded with zeroes when fewer bars are read, that means distance to the barcode would be one parameter of playing the instrument (and would be ideal). The result could be actualized in many different ways, like octave shift of the same note, etc. What I don’t know is how far away the scanners can reliably (or even somewhat reliably) read codes.
-- I need maybe up to 16 scanners at once, and they will be wireless. The idea is a collaborative space with hundreds of codes all over the walls that multiple people can play. Maybe I’ll have barcode T shirts too, heh. If it’s only keystrokes it will be impossible to parse which scanner sent which data. (While not absolutely critical, it would be much preferred to know---each scanner could use different timbres, octaves, scales, etc from the same codes, and they could always be set to “unison parameters” if desired.) It looks like some scanners can use serial ports---if so, the data would already be separated by port and I’d just use multiple [serial] objects. Any experience with this?
-- I’m thinking that most of the time the scanners would be on continuously so the data is a stream. What kind of rates are possible?
-- Am planning to use printouts for the barcodes. However, am wondering if the scanners can read barcodes on screens, and if so, how well. This would allow installation of some screens in the space with dynamic codes.
I realize that most answers will probably start with “Why don’t you get one and try it?!” Hehe. Absolutely…that’s the plan. But am curious if there’s any experience with all of this that could steer me in the right direction. Or away from wrong directions!