HCodecs-0.5.2: A library to read, write and manipulate MIDI, WAVE, and SoundFont2 files.
CopyrightGeorge Giorgidze
LicenseBSD3
MaintainerGeorge Giorgidze <http://cs.nott.ac.uk/~ggg/>
StabilityExperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell98

Codec.Midi

Description

Reading, writing and maniplating of standard MIDI files

Documentation

data Midi Source #

Constructors

Midi 

Instances

Instances details
Arbitrary Midi Source # 
Instance details

Defined in Codec.Midi

Methods

arbitrary :: Gen Midi

shrink :: Midi -> [Midi]

Show Midi Source # 
Instance details

Defined in Codec.Midi

Methods

showsPrec :: Int -> Midi -> ShowS

show :: Midi -> String

showList :: [Midi] -> ShowS

Eq Midi Source # 
Instance details

Defined in Codec.Midi

Methods

(==) :: Midi -> Midi -> Bool

(/=) :: Midi -> Midi -> Bool

data FileType Source #

Instances

Instances details
Arbitrary FileType Source # 
Instance details

Defined in Codec.Midi

Show FileType Source # 
Instance details

Defined in Codec.Midi

Methods

showsPrec :: Int -> FileType -> ShowS

show :: FileType -> String

showList :: [FileType] -> ShowS

Eq FileType Source # 
Instance details

Defined in Codec.Midi

Methods

(==) :: FileType -> FileType -> Bool

(/=) :: FileType -> FileType -> Bool

type Track a = [(a, Message)] Source #

data TimeDiv Source #

Constructors

TicksPerBeat Int 
TicksPerSecond Int Int 

Instances

Instances details
Arbitrary TimeDiv Source # 
Instance details

Defined in Codec.Midi

Methods

arbitrary :: Gen TimeDiv

shrink :: TimeDiv -> [TimeDiv]

Show TimeDiv Source # 
Instance details

Defined in Codec.Midi

Methods

showsPrec :: Int -> TimeDiv -> ShowS

show :: TimeDiv -> String

showList :: [TimeDiv] -> ShowS

Eq TimeDiv Source # 
Instance details

Defined in Codec.Midi

Methods

(==) :: TimeDiv -> TimeDiv -> Bool

(/=) :: TimeDiv -> TimeDiv -> Bool

data Message Source #

Constructors

NoteOff 

Fields

NoteOn 

Fields

KeyPressure 

Fields

ControlChange 

Fields

ProgramChange 

Fields

ChannelPressure 

Fields

PitchWheel 
SequenceNumber !Int 
Text !String 
Copyright !String 
TrackName !String 
InstrumentName !String 
Lyrics !String 
Marker !String 
CuePoint !String 
ChannelPrefix !Channel 
ProgramName !String 
DeviceName !String 
TrackEnd 
TempoChange !Tempo 
SMPTEOffset !Int !Int !Int !Int !Int 
TimeSignature !Int !Int !Int !Int 
KeySignature !Int !Int 
Reserved !Int !ByteString 
Sysex !Int !ByteString 

Instances

Instances details
Arbitrary Message Source # 
Instance details

Defined in Codec.Midi

Methods

arbitrary :: Gen Message

shrink :: Message -> [Message]

Show Message Source # 
Instance details

Defined in Codec.Midi

Methods

showsPrec :: Int -> Message -> ShowS

show :: Message -> String

showList :: [Message] -> ShowS

Eq Message Source # 
Instance details

Defined in Codec.Midi

Methods

(==) :: Message -> Message -> Bool

(/=) :: Message -> Message -> Bool

type Ticks = Int Source #

type Time = Double Source #

type Channel = Int Source #

type Key = Int Source #

type Velocity = Int Source #

type Pressure = Int Source #

type Preset = Int Source #

type Bank = Int Source #

type PitchWheel = Int Source #

type Tempo = Int Source #

merge :: (Num a, Ord a) => Track a -> Track a -> Track a Source #

fromAbsTime :: Num a => Track a -> Track a Source #

toAbsTime :: Num a => Track a -> Track a Source #

importFile :: FilePath -> IO (Either String Midi) Source #

exportFile :: FilePath -> Midi -> IO () Source #