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

PortabilityAs per dependencies.
Stabilityunstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>
Safe HaskellNone

ZMidi.Core.Pretty.Interp

Description

Helper functions to pretty print MIDI as text.

The functionality is unstable and may change between releases however it is still exposed as it may be useful for writing a custom pretty printer.

Synopsis

Documentation

type ScaleMap = IntMap (String, String)Source

Representation of scales mapping the number of accidentals to (major,minor) key names.

scale_map :: ScaleMapSource

Populated ScaleMap.

Positive numbers are number of sharps Negative numbers are number of flats.

majorScaleName :: Int -> Maybe StringSource

Decode major scale name.

minorScaleName :: Int -> Maybe StringSource

Decode minor scale name.

midiScaleName :: MidiScaleType -> Int -> Maybe StringSource

Decode scale name.

simpleNoteName :: Int -> StringSource

Decode simple note name.

Follows the example of the book Beyond MIDI - there is no enharmonic spelling, all black key notes are named as their respective sharp note.

timeSignature :: Int -> Int -> (Int, Int)Source

Decode a time signature.

Returned as (numerator, denoimator) pair.

timeSignatureName :: Int -> Int -> StringSource

Decode a time signature - and print.