Interface for composing music with an A.I. musician.
Currently in active development.
It is recommended to use Python version 3.6.x since I have encountered issues with installing tensorflow
and keras
on later versions of Python. The best way of making this easy is to use isolated environments, such as with pyenv.
-
$ git clone
this repository to somewhere in your home directory -
Make sure you are in a Python 3.6.x environment (e.g. with global
$ python3 -v
is 3.6.x, or with something like pyenv) -
Install the required packages with
$ pip install -r requirements/base.txt
-
Launch
musAIc
with$ python src/main/python/main.py
-
Install
git
from here -
Make sure Python 3.6.8 (64-bit) is installed and added to PATH (get the installer here)
-
Open Windows PowerShell (right-click the Start button and select from the menu, or search
powershell.exe
) andcd
to which directory will hostmusAIc
-
$ git clone https://github.com/Denbergvanthijs/musaic.git
this repository in some folder. -
pip install wheel cython
-
pip install --upgrade pip
-
pip install ./requirements/rtmidi_python-0.2.2-cp36-cp36m-win_amd64.whl
-
Install the required packages with
$ pip install -r requirements/base.txt
-
Launch
musAIc
with$ python src/main/python/main.py
For complete beginners in Python and Terminal
-
Open Terminal from the Finder.
-
Install XCode, Homebrew and Python 3.X. A simple guide that covers these can be found here. Follow the steps up until the Virtual Environments stuff (I recommend something easier in the next step)
-
Install pyenv:
brew install pyenv openssl readline sqlite3 xz zlib echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
Restart the Terminal.
-
Create a folder and navigate to where you would like to install musAIc (this is done with the commands
$ mkdir DirectoryName/
to make directories and$ cd path/to/directory
to move into a directory). This could be in somewhere likeProjects/
,Music/Tools/
, or whatever you like to do to organise your projects. -
Download (clone) this repository in this folder with the command, and move into the folder:
git clone https://github.com/Denbergvanthijs/musaic.git cd musaic
-
Create a virtual environment and install dependencies:
pyenv install 3.6.8 pyenv local 3.6.8
(Verify that the command
$ pyenv which python
returns some path with3.6.8
somewhere in it) -
Finally, launch musAIc with the command
$ python src/main/python/main.py
-
Bonus: to make it easier to start musAIc without using the terminal, first copy the output of the command
$ pwd
in the directory you launched musAIc from. Then, create a new file with your favourite text editor calledmusaic.sh
and put in the following with the path you just copied:#!/bin/bash cd PATH_YOU_JUST_COPIED python src/main/python/main.py &
Save this file to Desktop, then in Terminal run the command:
sudo chmod +x ~/Desktop/musaic.py
(If you are prompted to enter your password, do so and press enter)
Now, to launch musAIc just double click
musaic.sh
!
Work In Progress
-
Make sure whichever MIDI device you wish to use (either through a soundcard, USB or a virtual MIDI cable) is initialised and working before starting
musAIc
-
Once started click
options
, tick the box next to MIDI, then select your MIDI device from the dropdown menu. Optionally you can send the MIDI clock signal too (on by default), however, this is largely untested and may act weird.
Note: there is also a small bug where re-opening the options dialog will reset which MIDI device it will use, so make sure to select the desired one again.
musAIc
is currently bundled with two neural networks: the original developed in 2019 (affectionately named VERSION 9
), and the WIP pop star EUROAI
. In the future they (and others!) would be selectable from within the GUI, however for now the only way is to change the PLAYER
global variable in src/main/python/network.py
to either 1 for VERSION_9
, 2 for EUROAI
, or 0 for a random number generator (for development/debugging, will not load tensorflow
).
- The MIDI box in the options menu needs to be selected to hear sounds
- MusAIc will stop generating new bars if all five styles (qb, eb, lb, fb, tb) are de-selected