This project is still under development.
The-Jam-Machine is a source of inspiration for beginner or more proficient musicians. Based on a GPT (Generative Pretrained-Transformer) architecture, and trained on the text transcriptions of about 5000 MIDI songs, it can generate harmonious MIDI sequences.
You can check the App on HuggingFace, with which you can generate 8 bars of downloadable MIDI music with up to 3 instruments playing in harmony.
Jean Simonnet: Github / Linkedin
Louis Demetz: Github / Linkedin
Halid Bayram: Github / Linkedin
This works for MacOS 12.6
The Jam-Machine requires Fluidsynth, a software synthetizer.
Make sure to install it on your system, and fopr this please check the github repo here.
E.g.: with Mac OS X and Homebrew, run brew install fluidsynth
git clone [email protected]:m41w4r3exe/the-jam-machine.git
pipenv was chosen to manage the dependencies.
Make sure that pipenv in install in your main python environment.
If not, run pip install pipenv
in your terminal.
Then, from the-jam-machine
root folder, run pipenv install --ignore-pipfile
to install the dependencies.
To activate the virtual environment, run pipenv shell
.
Run the test.py
script from the-jam-machine/source
to check that everything is working fine.
It test the encoding, generation, decoding and the consistency between the encoding and decoding, as well as the gradio app.\
It returns a lot of messages in the terminal including:\
Encoding successful
Generation successful
Decoding successful
Encoder-Decoder Consistency successful
Testing the gradio app requires to open the URL displayed in the terminal and manually test the app.
Then when closed by keyboard interuption (CTL+C), it returns Launching Gradio App failed
but it can be ignored.
From the-jam-machine/source
, run gradio playground.py
and then open the URL displayed in your terminal. You will be able to generate 8 bars of MIDI music with up to 3 instruments playing in harmony. More instructions are displayed in the app.
Try it on HuggingFace first, maybe this is enough for you, and you don't need to install and run anything locally.
The gradio app has been made pretty simple so it works without breaking. The problem is that is quite limited in what it can do.
If you want to get more experimental with generation you can check out source/generation_playground.py
and try to get inspired by the code. You will be able to generate longer tracks, but it is less interactive than the app.