Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
Provides MIDI import.
Warning Experimental module.
- type IsMidi a = (IsPitch a, HasPart' a, Ord (Part a), Enum (Part a), Num (Pitch a), HasTremolo a, HasArticulation a a, Tiable a)
- fromMidi :: IsMidi a => Midi -> Score a
- readMidi :: IsMidi a => FilePath -> IO (Score a)
- readMidiMaybe :: IsMidi a => FilePath -> IO (Maybe (Score a))
- readMidiEither :: IsMidi a => FilePath -> IO (Either String (Score a))
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.
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.