The violin is an instrument which lends itself relatively well to motion sensitive virtual controllers. If the fingering on the neck of the instrument can be simulated with button presses or some other tactile feedback, then the bow motion can be captured by accelerometers or image processing. I used 2 wiimotes to create a virtual violin by using button presses and accelerometer data as input.
To interface with the wiimotes, I used a program called Osculator (Mac only) which captures data from up to 4 wiimotes and converts the data to OSC messages. I then used the OscP5 Library for Processing to read in the data. To output the musical notes, I used the Minim Library. Buttons are mapped to notes as indicated in the following table:
The default octave is A4 through A5, but the octave can be moved up and down by the 1 and 2 buttons (respectively) on the right hand wiimote.
The virtual violin turned out pretty well. I would have liked to get a violin sound, however I think the pure sine tones add to the virtual aesthetic of the whole thing. Furthermore, the pure sine tones added together in the visual component of the processing sketch produce cool and interesting shapes. Also, the motion detection was not ideal, as the accelerometer data was extremely noisy. A large portion of my work on this project involved messing around with the motion detection parameters.
Note: Within the /data/ folder, there is a file called “wiimote.oscd”. This file needs to be loaded into Osculator in order for the OSC routing to work properly with the sketch.