A web app to create music from images.
Pix2Beats is a Streamlit web app that allows you to create music from images.
The idea is that images are made of pixels, and pixels can be represented as numbers. Therefore, we can use these numeric values to obtain waveforms and, consequently, music.
Then, Pix2Beats applies a series of transformations to this signal (eg, apply effects, add harmonies, etc.) to obtain a more pleasant sound. This latter step, which is much common in music production, is carried out by leveraging Spotify's pedalboard API
You can use the app by clicking on the Streamlit badge above. Alternatively, you can run the app locally by cloning this repository and running the following commands:
pip install -r requirements.txt
streamlit run ui.py
Some ideas and code are adapted from this very nice article by V. Murcia, as well as from this interactive crash course from the Streamlit team. Background image by Will Porada on Unsplash.