Copyright | (c) Stephen Tetley 2013 |
---|---|
License | BSD3 |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Stability | unstable |
Portability | As per dependencies. |
Safe Haskell | None |
Language | Haskell98 |
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 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.