music-score-1.7.1: Musical score and part representation.

Portabilitynon-portable (TF,GNTD)
Stabilityexperimental
Maintainerhans@hanshoglund.se
Safe HaskellNone

Music.Score.Import.Midi

Description

Provides MIDI import.

Warning Experimental module.

Synopsis

Documentation

type IsMidi a = (IsPitch a, HasPart' a, Ord (Part a), Enum (Part a), Num (Pitch a), HasTremolo a, HasArticulation a a, Tiable a)Source

This constraint includes all note types that can be constructed from a Midi representation.

fromMidi :: IsMidi a => Midi -> Score aSource

Convert a score from a Midi representation.

readMidi :: IsMidi a => FilePath -> IO (Score a)Source

Read a Midi score from a file. Fails if the file could not be read or if a parsing error occurs.

readMidiMaybe :: IsMidi a => FilePath -> IO (Maybe (Score a))Source

Read a Midi score from a file. Fails if the file could not be read, and returns Nothing if a parsing error occurs.

readMidiEither :: IsMidi a => FilePath -> IO (Either String (Score a))Source

Read a Midi score from a file. Fails if the file could not be read, and returns Left m if a parsing error occurs.