Piano Reader is a Windows desktop application written in C# .NET 9 that converts piano roll videos (such as those rendered by Synthesia or similar software) into playable and editable MIDI files.
It analyzes video frames to detect pressed keys on a virtual piano keyboard, reconstructs the musical notes, and allows you to preview, configure, and export them as MIDI.
- 📹 Input from video: Load MP4 videos (e.g., Synthesia renders).
- 🎼 Automatic note recognition: Detects key presses and reconstructs MIDI.
- 🎚 Configurable detection parameters: Adjust keyboard size, black/white key colors, deviation thresholds, and more.
- ⏱ Tempo control: Set custom BPM (40–220).
- 🔀 Transpose: Shift notes up or down (0–64 semitones).
- ▶ Preview playback: Play the detected MIDI before saving.
- 💾 Save / Load presets: Store and reload your recognition settings.
- ⊞ Windows only: Built with C# .NET 9, designed for Windows environments.
- Ensure you have Windows 10/11 with .NET 9 Runtime installed.
- Download the latest release from the Releases page.
- Extract the archive and run
PianoReader.exe.
- Open Piano Reader.
- Load a piano-roll MP4 video (e.g., Synthesia render).
- Adjust detection parameters on the right-hand panel until keys are recognized correctly.
- Set start/stop frames, tempo, and transpose if needed.
- Click Convert to generate the MIDI.
- Preview with Play.
- Save the final MIDI file with Save.
- Keyboard Top: Vertical position of the keyboard area (0–1000 px).
- Key Number: Number of keys (8–88).
- Start Key: Left-most key (C–B).
- Black Key Height / Width: Adjust black key dimensions for detection (1–300 / 1–100).
- Keyboard Height: Vertical height of the entire keyboard (1–300).
- White / Black Key Color: Base colors of unpressed keys. Configure pressed state for left/right separately.
- Color Deviation: Tolerance for detecting a pressed key (10–100).
- Start / Stop Frame: Video frame range to process.
- BPM: Tempo for MIDI playback (40–220).
- Transpose: Shift notes up/down by semitones (0–64).
- Load a Synthesia MP4 (60 fps recommended for high accuracy).
- Adjust Keyboard Top and Key Number to align with the on-screen keyboard.
- Configure Color Deviation until pressed keys are detected correctly.
- Set Start Frame and Stop Frame to trim silence.
- Click Convert, then Play to preview.
- Save the MIDI file.
- Language: C#
- Framework: .NET 9 (Windows only)
- GUI: WinForms
-
Clone the repository:
git clone https://github.com/manh9011/PianoReader.git cd PianoReaderOpen in Visual Studio 2022 or newer.
-
Restore NuGet dependencies.
-
Build and run.
- This project is licensed under the MIT License
- Developed by manh9011.
- Inspired by Synthesia-style piano roll visualizations.
- Video decoder by OpenCvSharp.
- Midi writer by DryWetMidi.

