Module

Data.Midi.Parser

Package
purescript-midi
Repository
newlandsvalley/purescript-midi

A parser for MIDI recordings or for MIDI event streams

#normalise Source

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 Source

parse :: String -> Either String Recording

Parse a normalised MIDI string.

#parseMidiEvent Source

parseMidiEvent :: String -> Either String Event

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

#parseMidiMessage Source

parseMidiMessage :: String -> Either String Message

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