W13-Fianl-Code of Christmas
There's one thing that you cannot avoid at all if you live in China. Codes. Barcodes and QR codes. They are just everywhere you go. You even stopped noticing them. Scanning a code to do something is like second nature for people living here. The tiny little code contains so much information. It can be your bank information. It can be your subway pass or the membership to the ice cream shop that decided to open next to your gym. However, the sound of scanning is always the same. Beep.
Beyond the information that lives inside each code, the code itself can have its sound as well. So I thought of making a sketch that can read a barcode and playing some tunes according to it.
The sketch will read the middle row of pixels of the scan and then base on the pixel's brightness to create an array of 1s and 0s. Zero illustrates the black bars, and one represents the white spaces. Then the sketch will display the barcode by reading the array.
For the sound part, I am not a musician nor having any musical talent. I used an oscillator to create a melody out of the barcode reading. Initially, I was planning to shift the note when it was black and pause the tune when it was white. The tune was rather dull, even worse than the simple beep.
Inspired by the holiday spirit, I thought of using a bell sound for each tune. Instead of the shifting notes randomly. I had the note to go up by one if it is black, and vice versa.
Right now, it has a holiday and Christmas vibe, but I think the tune is too long and could be more enjoyable. If possible, I would love to collaborate with someone with more music knowledge to enhance this experience.
Here is a short video of my friend trying the sketch: