Portability | As per dependencies. |
---|---|
Stability | unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Safe Haskell | None |
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.
- type ScaleMap = IntMap (String, String)
- scale_map :: ScaleMap
- majorScaleName :: Int -> Maybe String
- minorScaleName :: Int -> Maybe String
- midiScaleName :: MidiScaleType -> Int -> Maybe String
- simpleNoteName :: Int -> String
- timeSignature :: Int -> Int -> (Int, Int)
- timeSignatureName :: Int -> Int -> String
Documentation
type ScaleMap = IntMap (String, String)Source
Representation of scales mapping the number of accidentals to (major,minor) key names.
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.