Skip to content

Generate music by imitating tone matrix frequency distribution using algorithm approach

License

Notifications You must be signed in to change notification settings

realsanjeev/Music-Generation-Using-Algorithmic-Approch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music Generation Using an Algorithmic Approach

The aim of this project is to generate music by mimicking the frequency distribution of a tone matrix through an algorithmic method.

Getting Started

  1. Create a Virtual Environment

    For Linux and macOS:

    python3 -m venv venv
    source venv/bin/activate

    For Windows:

    python -m venv venv
    .\venv\Scripts\activate
  2. Install Packages from requirements.txt

    pip install -r requirements.txt

Exploring Music Generation with Music21 and Image Processing

Music21 is essential for processing music in symbolic form. In this project, we will create a MIDI file using the Music21 library. The notebook music_generation_tone_matrix.ipynb showcases the use of music21, and you can find the MIDI output generated by the tone matrix algorithm in notebooks/music_tone_matrix.mid.

Another notebook, construct_music_from_images.ipynb, generates music based on color intensity, taking into account all the pixels in the image. We first convert the image to hsv color channels and use these channels as a reference to determine the corresponding frequencies. We also utilize pedalboard to process the generated music, enhancing its variety. The output sample from this notebook, after processing, can be found at ./notebooks/processed_song_and_harmony_combined.wav, and the MIDI file we generated is available at ./notebooks/freq_to_midi_processed.mid.

References

About

Generate music by imitating tone matrix frequency distribution using algorithm approach

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published