Weights for piano-hand-assignment: assign every note of a piano MIDI file to the right or the left hand.
| File | Architecture | Parameters |
|---|---|---|
lstm.pt |
2-layer bidirectional LSTM, d=192 | 1.58M |
transformer.pt |
4-layer Transformer encoder, d=192, 4 heads | 1.75M |
Both are PyTorch checkpoints saved as {"arch": ..., "state": state_dict, "args": ...}.
Inference averages the two probability distributions.
from piano_hand_assignment import HandAssigner
assigner = HandAssigner() # downloads these files on first run
assigner.assign_file("input.mid", "output.mid")
30,382 two-hand piano scores from PDMX (MuseScore-derived MusicXML), 20.4M notes. Hand labels come from the staff number in the score.
| Test set | Accuracy | Hand-switch F1 |
|---|---|---|
| Held-out PDMX split (2.0M notes) | 94.30 | 0.918 |
| Yamaha Disklavier pieces (unseen domain) | 95.91 | 0.927 |
transformer.pt 7 MBlstm.pt 6 MB