Summary: Step-by-step instructions for installing DeepBach with its dependencies with pip including a flask server which turns DeepBach into a musescore 2 plugin for interactive composition-work, using python 3.
git
There are at least two ways to do this:
https://www.python.org/downloads/mac-osx/
Pick the latest Release. Stay away from release candidate versions (they have "rc" in the name) and beta versions ("b"). 3.6.4 was current as of 2018-03-23.
https://musescore.org/en/download/musescore.dmg
Open the program Terminal.app
which resides in the folder Utilities
.
tensorflow
and music21
sudo su
pip3 install matplotlib scipy h5py keras mako nose setuptools tqdm werkzeug \
wheel pylzma appdirs flask click packaging music21
pip3 install -Iv tensorflow==1.5
CTRL-D
in the terminalmusic21
music21
binary is located. First, start python 3 by typing python3
in the terminal.python3
Then run this code in the interactive python 3 environment:
import music21 us=music21.environment.UserSettings() us['musicxmlPath']='/Applications/MuseScore 2.app' exit()
DeepBach
Create a new directory, and make it the current directory
mkdir ~/src
cd ~/src
git clone https://github.com/Ghadjeres/DeepBach.git
deepBachMuseScore.qml
file in your MuseScore2/Plugins
directory:
musescore 2
on OS X is ~/Documents/MuseScore2/Plugins
and deepBachMuseScore.qml
resides in the root directory of DeepBach
, socp ~/src/DeepBach/deepBachMuseScore.qml ~/Documents/MuseScore2/Plugins
DeepBach/plugin_flask_server.py
:model_name = 'deepbach' # model_name = 'skip_new'
[ more to write here]
On OS X you have to manually start Musescore 2 before you run DeepBach
, if you want the generated choral to automatically show up in Musescore 2.
[ more to write here]
cd ~/src/DeepBach/DeepBach export FLASK_APP=~/src/DeepBach/plugin_flask_server.py python3 -m flask run --host=0.0.0.0