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

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

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 a Source

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.