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 |
ZMidi.Core.Pretty.Internal
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.
- midi_header_columns :: ColumnSpecs
- tellMidiHeader :: MidiHeader -> Table ()
- byteList :: (Show a, Integral a) => a -> [Word8] -> WString
- safeString :: String -> String
- textType :: MidiTextType -> String
Documentation
midi_header_columns :: ColumnSpecs Source
Column specs for Header - Header is printed as simple name-value pairs (2 columns).
tellMidiHeader :: MidiHeader -> Table () Source
Log the MidiHeader in the Table monad (cf. Writer).
byteList :: (Show a, Integral a) => a -> [Word8] -> WString Source
Print a short byte-list as Hex. Byte-lists longer than 10 chars are printed as ellipses.
safeString :: String -> String Source
Make a string safe for stdout.
This is a temporary hack - characters above ASCII 163 cause an (invalid character) error when written to stdout on Windows (Cygwin).
textType :: MidiTextType -> String Source
Decode Text Type