Module

Data.Midi.Parser

A parser for MIDI recordings or for MIDI event streams

#normalise

normalise :: String -> String

Normalise the input. The un-normalised input can by obtained (for example) by using readAsBinaryString or else by using XMLHttpRequest and then making use of the override MIME type hack.

This function masks off all but the least significant 8 bits and treats the result as a character array.

#parse

parse :: String -> Either String Recording

Parse a normalised MIDI string.

#parseMidiEvent

parseMidiEvent :: String -> Either String Event

Parse a MIDI event that emanates from a Web MIDI connection to the browser.

#parseMidiMessage

parseMidiMessage :: String -> Either String Message

Parse a MIDI message. Probably only useful for debug purposes.

Modules