BowController is an interactive music system giving the violinist timbral control of a pre-composed MIDI accompaniment using bowing parameters extracted using optical, marker-based motion capture technology.
Watch the demo video: https://drive.google.com/file/d/1PwbykmJccvtBl9BjLUUu1WIoxm4yglWo/view?usp=sharing
- OptiTrack optical motion capture system and accompanying Motive software
- Max 8
- Python 3.x (i.e., through an Anaconda environment)
- On the PC connected to the OptiTrack system, start Motive and calibrate the OptiTrack system.
- Set up two rigid bodies. The system is intended and calibrated to use a violin and bow, but you can theoretically use any two rigid bodies provided one has ID 1 and the other has ID 2.
- Connect your laptop to the Cisco network switch located behind the MoCap PC via ethernet. This allows your laptop to communicate with the MoCap PC over the UiO network.
- Open the Data Streaming panel in Motive and ensure streaming is on, and sending out via the IP address (i.e., not in loopback mode).
- In the terminal create or load an Anaconda environment and install the following packages:
- Numpy (
pip install numpy
) - Scipy (
pip install scipy
) - PythonOSC (
pip install python-osc
)
- Numpy (
- Navigate your terminal to the project root folder (where this readme is located) and run
feature_extraction.py
. - Open
main_patch.maxpat
in Max 8. If the Python script is running, the patch should automatically start receiving data via OSC. - Wave your rigid bodies around the capture space. If you see the numbers changing and graphs moving, you're nearly there.
- To load a MIDI file, drag and drop it into the box in the top left of the presentation view of the Max patch.
- Recommended test file:
./MIDI_files/test_accomp_longer.mid
-> this is the one used in the demo video
- Recommended test file:
- Click 'Start Playback' and playback should start. Move the rigid bodies while it's playing to see what happens. Your results with non-violin and -bow shaped rigid bodies may vary!
- If the Python script can't find the MoCap PC:
- Ensure Motive is running, data streaming is on, and it's not in loopback mode.
- Check your IP on the UiO network.
- Run the
ipconfig
command, look for the UiO network in the list, and check your IP address is the same as that listed infeature_extraction.py
on line 288. - If not, change it to your IP in the script.
- Run the
- If the Python script is running correctly but the Max patch isn't receiving any data over OSC:
- The Python script and Max patch should be running on the same machine, as the OSC is set to use
localhost
. - Check that the port in the Python script (line 280) and in the Max patch (top left in the patcher when not in presentation view) are the same.
- The Python script and Max patch should be running on the same machine, as the OSC is set to use
feature_extraction.py
: the main Python script receiving data from Motive, extracting features, and sending to Max via OSCmain_patch.maxpat
: the main Max patch containing the OSC receiver, parameter mapping, and synthesiserbowed_string_voice.maxpat
: the patch for one voice of the synthesiser, used in the poly~ object to make a polysynthMIDI_files
folder : the directory for the test MIDI files for the Max patchREADME.txt
: this documentDataDescriptors.py
: part of the NatNet SDK provided by OptiTrackMoCapData.py
: part of the NatNet SDK provided by OptiTrackNatNetClient.py
: part of the NatNet SDK provided by OptiTrack