Code on gitlab.
This work requires a microphone.
Please find a quiet place. It gets darker when it is silent, but then brighter when there is sound. Embrace your dark face or make some noise.
This is a mini-game with a glitch aesthetic inspired webcam output controlled by chance and pseudo-randomness of real-time input from a microphone. Due to the different rate of processing the image and the rate at which values from the sound input are calculated, different parts of the output will be processed with different values, hence producing the glitch-effect. There are three methods of output. The method of manipulating the output changes if the sound level goes over a certain threshold. (You could just press the spacebar, but that wouldn’t be fun).
In the first mode, the image from the webcam is reduced to 1-bit channel image. Using the RMS values calculated from the microphone input, the threshold level is changed.
In the second and third mode, the image is split into horizontal bars which individually translate in the x-axis according to the history of latest RMS values and FFT values. In the last mode, the hues of the individual pixels are manipulated according to FFT values as well.
>> Code on gitlab.