initial author: Steve Wang ([email protected])
contributors: Yiler Huang ([email protected]); Renick Bell ([email protected])
- Download all the zip provided here and unzip it. You will get a directory called using-konduktiva-with-midi-1
- Install Nodejs. If npm does not automatically get installed with Nodejs, install npm.
- Check if nodejs is installed by running this command in the terminal:
node -v
- Check if nodejs is installed by running this command in the terminal:
npm -v
- Open the terminal, navigate to using-konduktiva-with-midi. We will call this terminal session t1. Then, run this command:
node installer.js
- After that code has finished running, the installation should be complete.
- Launch 4 sessions/instances of your prefered music synthesizer that supports having multiple instances running at the same time (each with a different midi inputs). Yoshimi is suggested for Linux and Surge is recomended for MacOS.
- Open a new terminal session (t2), navigate to using-konduktiva-with-midi and run this command:
node
- Paste the contents of example-session-with-melodies.js inside t2.
- Now you can try pasting the code in example-playing-melodies.js into t2. You will see that now you are able to control the music. The things in the file will also allow you to start and stop music.
e.play('musicSynthesizerSession1')
e.play('musicSynthesizerSession3')
e.play('musicSynthesizerSession4')
e.play('musicSynthesizerSession2')
e.stopAll()
Function updateMidiOutputList might not work correctly for your midi configuration. That function is in midi.js so you might want to edit it to work properly for you.
To edit this function run this code in nodejs: easymidi.getOutputs()
This will give you all the outputs easymidi detects and you can edit the function so that it works properly for you.
MIDI configuration. Configure your system so that easymidi can detect midi outputs.
That is OS specific.