This is a small webcam instrument for FL Studio and any other MIDI-friendly setup that feels like playing light in the air.
It started from HandTrack_To_MIDI, then turned into something more melodic: two hands, playable scales, smoother expression, and a little stage presence on screen so you can actually feel what the instrument is doing while you perform.
| Hand | Role |
|---|---|
| Right hand | Melody. Wrist height chooses the note, pinch plays it, finger spread shapes velocity. |
| Left hand | Expression. Wrist height sends pitch bend, index finger height sends mod wheel. |
The note lane is quantized to a chosen scale, so you can stay musical while still moving freely.
- Named scales now live inside the app instead of one hard-coded interval list.
- Roots are changeable in real time, so getting to E natural minor, A phrygian, or D hijaz is immediate.
- Added darker and more exotic colors like:
- Major
- Minor Pentatonic
- Major Pentatonic
- Major Bebop
- Mixolydian
- Lydian
- Natural Minor
- Harmonic Minor
- Melodic Minor
- Minor Bebop
- Dorian
- Phrygian
- Phrygian Dominant
- Double Harmonic
- Hijaz
- Bayati Approx
- Kurd
- Sika Approx
- Nahawand
- Whole Tone
- Pinch triggering now uses hysteresis, which makes it feel less twitchy and more playable.
- Pitch bend and mod wheel are smoothed a bit, so expression feels more sung than jittered.
- You can shift the whole note range up or down by octave while you play.
- The whole visual mood now changes with the active scale family, so bright modes feel different from dark or Arabic ones before you even hear the next phrase.
- The HUD now shows the current scale, root, octave, note map, and a scale picker overlay grouped by musical family.
Note on the Arabic entries: these are 12-tone equal temperament approximations, not strict maqam intonation. They are useful, expressive, and fun, but they are still living inside standard MIDI note spacing.
qquits cleanlysopens or closes the scale picker[and]cycle scales,and.cycle roots-and=shift octave down or up- Arrow keys also work inside the scale picker
- Download it from Tobias Erichsen's site
- Create a virtual port named
HandMIDI - Leave it running
- Open
Options > MIDI Settings - Find
HandMIDIunder input - Enable it
- Set the port number you want
pip install -r requirements.txtUse Python 3.10 to 3.12. MediaPipe does not yet support 3.13 here.
python hand_instrument.py- Select the instrument/channel you want to record.
- Hit record.
- Make sure notes and automation are enabled.
- Perform with your hands.
- Stop and edit the captured MIDI like any other part.
Pitch bend goes out as pitch wheel data. Modulation goes out as CC1.
To map hand movement to a parameter in FL Studio:
- Right-click a knob or slider.
- Choose
Link to controller... - Move your left hand.
- Let FL learn the incoming MIDI.
Most of the personality lives near the top of hand_instrument.py:
NOTE_MINandNOTE_MAXchange the rangeVELOCITY_MINandVELOCITY_MAXshape the dynamic floor and ceilingPINCH_ON_THRESHOLDandPINCH_OFF_THRESHOLDchange note trigger feelBEND_SMOOTHINGandMOD_SMOOTHINGchange expression glideOCTAVE_SHIFT_MINandOCTAVE_SHIFT_MAXdefine the live transpose boundsSCALE_LIBRARYis where the available modes live
It is not trying to be a piano. It is closer to a camera-fed ribbon instrument with a pinch gate and a strange memory for scales. Sometimes it behaves like a flute, sometimes like a synth lead, sometimes like you are conducting a machine that only understands gesture and tension.
That is the point.