Desktop audio-to-MIDI conversion tailored for piano recordings
Transcribes locally on Windows, CPU-first by design, with optional CUDA or DirectML acceleration
A2M is a Windows desktop application designed to achieve high transcription accuracy when converting piano recordings into editable MIDI files. The A2M Piano Engine estimates notes, timing, velocity, sustain, and soft pedal events locally, using CPU processing by default with optional CUDA or DirectML acceleration. Configurable CPU usage and GPU memory settings allow system load to be balanced against processing speed. Although runtime depends on recording duration and available hardware, transcription typically completes promptly on suitable systems. Clean solo piano recordings provide the best results.
- Download and install from the latest release.
- On first launch, A2M assesses the available hardware and selects appropriate default CPU and GPU resource settings.
- If prompted, approve the initial transcription model download.
- Click Choose Audio and select a local file.
- If supported, optionally select GPU execution in Settings.
- Click Convert to MIDI.
- Open the result from the configured save location or by selecting Open output folder in the footer.
- Local transcription of polyphonic piano recordings.
- A file picker that recognizes MP3, WAV, FLAC, OGG, M4A, AAC, WMA, AIFF, and AIF files, subject to codec availability.
- A consistent A2M Piano Engine for note, timing, velocity, sustain pedal, and soft pedal estimation.
- ONNX Runtime inference on CPU, CUDA, or DirectML.
- CPU usage controls and GPU memory controls scaled to the available hardware.
- Optional expressive or uniform MIDI velocity and optional pedal export.
- Verified model and runtime packages with integrated dependency installation.
- Configurable output location, interface scaling, and update checks.
- Cancellation support during downloads, dependency installation, and transcription.
The source recording is decoded with SoundFile, with audioread available as a fallback. Audio is resampled to 44,100 Hz and analyzed in centered frames of 4,096 samples with a 1,024 sample hop. Six window sizes provide complementary spectral views, which are projected into 229 mel bands and log normalized for model inference.
Recordings are processed in overlapping sections of 16 seconds that advance by 8 seconds. This overlap supplies context near section boundaries and allows section results to be reconstructed on the original recording timeline.
The scorer model evaluates possible start and end frame pairs for 88 piano pitches and two pedal tracks. A dynamic programming decoder selects coherent intervals, after which the attribute model estimates velocity and subframe timing adjustments. Events from successive sections are then joined, resolved, and clipped to the duration of the source recording.
- A2M runs on CPU by default.
- CUDA and DirectML execute the same models and decoding process as CPU mode.
- Optional GPU runtime packs are installed for the current user under:
%LOCALAPPDATA%\A2M\runtime_packs\cuda%LOCALAPPDATA%\A2M\runtime_packs\dml
- Runtime-pack endpoints are defined in
A2M/a2m/core/config.py.
Decoded events are ordered and written as a 960 PPQ MIDI sequence. Notes retain their estimated pitch, timing, and selected velocity treatment. Sustain and soft pedal controller events can be included or excluded before export. A2M assigns a unique output filename so an existing transcription is not overwritten unintentionally.
The model package is obtained from https://downloads.justagwas.com/a2m/PianoModel.a2m when required and retained for subsequent use. Its package structure and internal components are validated before inference. CPU execution is included with the application dependencies, while optional GPU components remain separate.
For a visual and detailed technical account of this process, see How A2M Works, the Audio Processing Pipeline, and From Model Output to MIDI.
- Project page: https://www.justagwas.com/projects/a2m
- Download page: https://www.justagwas.com/projects/a2m/download
- Documentation: https://github.com/Justagwas/A2M/wiki
- Releases: https://github.com/Justagwas/a2m/releases
For Developers
- Windows (primary runtime target).
- Python 3.11 or later.
- Dependencies in
A2M/requirements.txt.
cd A2M
py -m pip install -r requirements.txt
py A2M.py- Application metadata, constants, and service endpoints:
A2M/a2m/core/config.py - Runtime setting serialization and normalization:
A2M/a2m/core/config_service.py - Runtime and path resolution:
A2M/a2m/core/paths.py - Model acquisition, storage, and validation:
A2M/a2m/core/model_service.py - GPU runtime pack management:
A2M/a2m/core/runtime_pack_service.py - Audio analysis and event decoding:
A2M/a2m/core/piano_engine.py - MIDI construction and output naming:
A2M/a2m/core/conversion_service.py
- Windows SmartScreen may display a warning for a new or unsigned release.
- Obtain A2M only from the official distribution locations:
- Refer to
.github/SECURITY.mdfor the security policy and private vulnerability reporting procedure.
Contributions are welcome.
- Start with
.github/CONTRIBUTING.md - Follow
.github/CODE_OF_CONDUCT.md - Use Issues for defect reports, feature proposals, and questions
- Wiki: https://github.com/Justagwas/A2M/wiki
Licensed under the GNU General Public License v3.0 (GPL-3.0).
See LICENSE.
- Email: email@justagwas.com
- Website: https://www.justagwas.com/projects/a2m
