zmidi-core-0.7.0: Read and write MIDI files.

PortabilityGHC (at least generalized newtype deriving)
Stabilityunstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>
Safe HaskellNone

ZMidi.Core.Canonical

Description

Convert a MidiFile into "canonical" form - i.e. expand any use of Running Status and translate Running Status high, NoteOn channel velocity 0 events to NoteOff events.

Synopsis

Documentation

canonical :: MidiFile -> MidiFileSource

Convert an MidiFile into "canonical" form where any abbreviation introduced by Running Status is expanded.

Note - even with Running Status on the syntax tree is almost canonical (some expansion takes place in the Parser), so this translation is quite simplistic.