Interface for composing music with an A.I. musician
Currently in active development.
It is recomended 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 environement (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 installed and added to PATH (get the installer here)
-
Open Windows PowerShell (right-click Start button and select from the menu, or search
powershell.exe
) andcd
to which directory will hostmusAIc
-
$ git clone
this repository in some folder. -
Install the required packages with
$ pip install -r requirements/base.txt
-
Launch
musAIc
with$ python src/main/python/main.py
For complete beginners of 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 untill 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 into 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 like Projects/, 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/al165/musaic.git $ cd musaic
-
Create 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 with 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 promted 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 you MIDI device from the dropdown menu. Optionally you can send the MIDI clock signal too (on by default), however this is largely untested 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 bundelled 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
).