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

Copyright(c) Stephen Tetley 2013
LicenseBSD3
MaintainerStephen Tetley <stephen.tetley@gmail.com>
Stabilityunstable
PortabilityAs per dependencies.
Safe HaskellNone
LanguageHaskell98

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 :: ScaleMap Source #

Populated ScaleMap.

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

majorScaleName :: Int -> Maybe String Source #

Decode major scale name.

minorScaleName :: Int -> Maybe String Source #

Decode minor scale name.

midiScaleName :: MidiScaleType -> Int -> Maybe String Source #

Decode scale name.

simpleNoteName :: Int -> String Source #

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 -> String Source #

Decode a time signature - and print.