Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A2M - Audio to MIDI

Code: GitHub Website Mirror: SourceForge

A2M Logo

Download (Windows)

Desktop audio-to-MIDI conversion tailored for piano recordings

Transcribes locally on Windows, CPU-first by design, with optional CUDA or DirectML acceleration

Version License Last Commit Open Issues Stars Installs (7d)

Overview

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.

Basic usage

  1. Download and install from the latest release.
  2. On first launch, A2M assesses the available hardware and selects appropriate default CPU and GPU resource settings.
  3. If prompted, approve the initial transcription model download.
  4. Click Choose Audio and select a local file.
  5. If supported, optionally select GPU execution in Settings.
  6. Click Convert to MIDI.
  7. Open the result from the configured save location or by selecting Open output folder in the footer.

Features

  • 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.

Technical overview

Audio and feature processing

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.

Inference and event decoding

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.

Runtime and acceleration

  • 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.

MIDI construction

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 resources

For Developers

Requirements

Running From Source

cd A2M
py -m pip install -r requirements.txt
py A2M.py

Configuration Files

Security and Windows warnings

Contributing

Contributions are welcome.

License

Licensed under the GNU General Public License v3.0 (GPL-3.0).

See LICENSE.

Contact

About

Desktop audio-to-MIDI transcription for piano recordings with optional CUDA/DirectML GPU acceleration.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages