As example, peripheral MIDI Controller (pmidic) is a software program
that acts as a MIDI controller by using various peripheral devices.
The initial release(s) will be focused on using a webcam as a MIDI
controller with 3 dimensions (XYZ):
As you did integrate ODE into Croquet, maybe OpenCV is a good fit too...