From d7679123fbc82a99b1619f3200d08cbe6eda58ec Mon Sep 17 00:00:00 2001 From: Pablo Castro Rivadeneira Date: Thu, 6 Dec 2018 11:33:19 -0500 Subject: [PATCH] Update README and update paths. --- Psc2/modes/mlsplainer.py | 2 +- README.md | 37 +++++++++++++++++++++++++++++++++---- talks/canarie2018/server.py | 2 +- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Psc2/modes/mlsplainer.py b/Psc2/modes/mlsplainer.py index b25bb0b..ee92de8 100644 --- a/Psc2/modes/mlsplainer.py +++ b/Psc2/modes/mlsplainer.py @@ -25,7 +25,7 @@ class MLSplainer(mode.Mode): def __init__(self, client, - base_models_path='/home/psc/pyosc/psc2/magenta_models', + base_models_path='~/Psc2/magenta_models', model_name='attention_rnn.mag', min_primer_length=20, max_robot_length=20, diff --git a/README.md b/README.md index 8881b1b..b9e2aef 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,38 @@ the arrangements take well-known songs from pop, rock and jazz and re-build them psc is a seƱor swesearcher in google brain, and is experimenting with using machine learning models (including generative models for music) as part of the live performance. most of the code used will be available in this repo. ## Installation +1. Install [SuperCollider](https://supercollider.github.io/) -From the root directory, run: +2. Create a virtualenv and activate it. We need Python2 (and _not_ Python3) + because `pyosc` is not compatible with Python3. This step is optional but + recommended: + + ``` + virtualenv --system-site-packages -p python2 venv + source venv/bin/activate + ``` + +3. `pip install pyosc`. + +4. Install Tensorflow (instructions + [here](https://www.tensorflow.org/install/)). + +5. Install Magenta (instructions [here](https://github.com/tensorflow/magenta)). + +4. Clone this repo. + +5. Open SuperCollider, open `Psc2/server.sc` and run the main group (enclosed + in parentheses). + +6. From the root directory, run: + + ``` + python setup.py install + ``` + +7. Start the python server: + + ``` + python Psc2/server.py + ``` -``` -python setup.py install -``` diff --git a/talks/canarie2018/server.py b/talks/canarie2018/server.py index d50ef24..f95180d 100644 --- a/talks/canarie2018/server.py +++ b/talks/canarie2018/server.py @@ -45,7 +45,7 @@ improv_status = 'psc' # One of 'psc' or 'robot'. # Read in the PerformanceRNN model. -MODEL_PATH = '/home/psc/pyosc/psc2/magenta_models/attention_rnn.mag' +MODEL_PATH = '~/Psc2/magenta_models/attention_rnn.mag' bundle = magenta.music.read_bundle_file(MODEL_PATH)