The goal of this project is to generate music by imitating the frequency distribution of a tone matrix using an algorithmic approach.
The following libraries are required to run this project: opencv
, numpy
, music21
and matplotlib
.
To install the opencv
package in your environment, run the following command:
pip intall opencv-python
If you are running the code in a Github codebase, you may need to install the opencv-python-headless
package instead.
OpenCV is used to load an image and resize it to 16x16 pixels to perform further calculations in image.
To install the numpy
package in your environment, run the following command:
pip intall numpy
Numpy is used to do calculation and operation in matrix.
Music21 is a key component when processing music in symbolic representation. In this project, we will be creating a MIDI file using the Music21 library.