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

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

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.

Synopsis

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