﻿# MAESTRO pedal data: key release is not the same target as sustained sound

Preserve MAESTRO pedal control events and declare sustain handling before deriving piano note durations, piano-roll labels or rendered-audio references.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-maestro-pedal-state-key-release-rendered-note-duration/
Language: en

## Define which ending a piano model should predict

A transcription pipeline reads MIDI note events, discards controller messages and compares note endings with audible piano sound. Notes sustained after key release can then look like reference mistakes. The problem is a target mismatch: key activity, a sustain-aware symbolic representation and the acoustic envelope need not end together. Decide which representation the experiment measures before deriving labels or interpreting offset errors as failures of a neural transcription model.

## Preserve the pedal information supplied by the release

The [MAESTRO dataset documentation](https://magenta.tensorflow.org/datasets/maestro) describes paired audio and MIDI, including key velocities and pedal positions, and records differences between dataset versions. Load the selected release with its controller events intact. A MIDI parser that exposes only a note list may be convenient, but that list is not the complete performance annotation. Keep the original event stream available so that another target representation can be derived without guessing discarded pedal behavior from the waveform.

## Keep symbolic structure separate from acoustic rendering

The [MAESTRO paper](https://arxiv.org/abs/1810.12247) uses notes as an intermediate representation between transcription, composition and synthesis. A symbolic event is an abstraction of performance rather than a guarantee of exact acoustic silence at its endpoint. The sound produced after a controller or key event also depends on the instrument and rendering process. Describe whether a note-offset result refers to key release or a transformed sustain-aware target, instead of combining both under an undefined duration metric.

## Inspect the transformation used by the software

The [note-seq implementation](https://raw.githubusercontent.com/magenta/note-seq/main/note_seq/sequences_lib.py) includes an explicit transformation for applying sustain control changes to note durations. That is an executable label policy, not a reason to overwrite the raw MIDI. Preserve the transformation and its parameters in derived-data provenance. Applying sustain in a preprocessing step and then applying an additional sustain interpretation during rendering can create a representation different from the one intended by either stage alone.

## Check a repeated pitch under a pedal change

Select a short performance passage with a pedal transition and repeated pitch. Compare raw note events, the chosen derived labels and the observed waveform, keeping the signal clock unchanged. The [audio timestamp guide](/journal/data-guide-audio-resample-time-labels/) and [reproducible software stack guide](/journal/software-stack-reproducibility/) help record timing and implementation choices. Report controller handling alongside note-offset metrics. Fine audio-MIDI alignment is valuable, but it cannot resolve a semantic disagreement about which kind of note ending the reference was constructed to represent.
