-
Notifications
You must be signed in to change notification settings - Fork 0
1.2 API server
These instructions are for setting up the API server, which receives requests and process the audio files.
First, follow these instructions to add kxstudio repositories to your system.
sudo apt-get update && sudo apt-get install jack jack-tools guitarix python3-pip make sox pkg-config help2man libjack-jackd2-dev lame libsox3 jack-capture libsndfile1-dev opus-tools xauth xbase-clients dbus-x11 ffmpeg ruby fluidsynth
pip3 install nclib JACK-Client
sudo gem install midilib
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
git clone --recurse-submodules [email protected]:gutobenn/musical-artifacts-preview.git
cd musical-artifacts-preview/server/jack-file
make
cd ..
npm install
Manage_artifacts.py is a utility to manage the artifacts database. With 'create_database' parameter the sqlite database is created. With 'update_guitarix' and 'update_soundfonts' the artifacts available on musical-artifacts.com are downloaded and configured.
cd scripts
python3 manage_artifacts.py create_database
python3 manage_artifacts.py update_guitarix
python3 manage_artifacts.py update_soundfonts
Run guitarix -N
and then close it (ignore any jack error message). It's needed to create the .config/guitarix directory on your machine.
Run crontab -e
.
In the editor that opens, add the following. Make sure the path to manage_artifacts.py is correct.
0 */6 * * * python3 /home/ubuntu/musical-artifacts-preview/server/scripts/manage_artifacts.py update_guitarix
0 */9 * * * python3 /home/ubuntu/musical-artifacts-preview/server/scripts/manage_artifacts.py update_soundfonts
Start guitarix (it will start Jack too): dbus-launch guitarix -N p 7000
Start the server: npm start