haskore-0.2.0.3: The Haskore Computer Music System

Safe Haskell | None

Haskore.Music.GeneralMIDI

Synopsis

- type T = T Drum Instr
- type Note = Note Drum Instr
- type NoteBody = NoteBody Drum Instr
- type Instr = Instrument
- velocity :: Note drum instr -> Rational
- body :: Note drum instr -> NoteBody drum instr
- instrument :: NoteBody drum instr -> instr
- pitch :: NoteBody drum instr -> T
- drum :: NoteBody drum instr -> drum
- noteFromStdMelodyNote :: instr -> Note -> Note drum instr
- fromStdMelody :: Instr -> T -> T
- fromMelodyNullAttr :: Instr -> T () -> T
- data Instrument
  - = AcousticGrandPiano
  - | BrightAcousticPiano
  - | ElectricGrandPiano
  - | HonkyTonk
  - | ElectricPiano1
  - | ElectricPiano2
  - | Harpsichord
  - | Clavinet
  - | Celesta
  - | Glockenspiel
  - | MusicBox
  - | Vibraphone
  - | Marimba
  - | Xylophone
  - | TubularBells
  - | Dulcimer
  - | DrawbarOrgan
  - | PercussiveOrgan
  - | RockOrgan
  - | ChurchOrgan
  - | ReedOrgan
  - | Accordion
  - | Harmonica
  - | TangoAccordian
  - | AcousticGuitarNylon
  - | AcousticGuitarSteel
  - | ElectricGuitarJazz
  - | ElectricGuitarClean
  - | ElectricGuitarMuted
  - | OverdrivenGuitar
  - | DistortionGuitar
  - | GuitarHarmonics
  - | AcousticBass
  - | ElectricBassFinger
  - | ElectricBassPick
  - | FretlessBass
  - | SlapBass1
  - | SlapBass2
  - | SynthBass1
  - | SynthBass2
  - | Violin
  - | Viola
  - | Cello
  - | Contrabass
  - | TremoloStrings
  - | PizzicatoStrings
  - | OrchestralHarp
  - | Timpani
  - | StringEnsemble1
  - | StringEnsemble2
  - | SynthStrings1
  - | SynthStrings2
  - | ChoirAahs
  - | VoiceOohs
  - | SynthVoice
  - | OrchestraHit
  - | Trumpet
  - | Trombone
  - | Tuba
  - | MutedTrumpet
  - | FrenchHorn
  - | BrassSection
  - | SynthBrass1
  - | SynthBrass2
  - | SopranoSax
  - | AltoSax
  - | TenorSax
  - | BaritoneSax
  - | Oboe
  - | EnglishHorn
  - | Bassoon
  - | Clarinet
  - | Piccolo
  - | Flute
  - | Recorder
  - | PanFlute
  - | BlownBottle
  - | Skakuhachi
  - | Whistle
  - | Ocarina
  - | Lead1Square
  - | Lead2Sawtooth
  - | Lead3Calliope
  - | Lead4Chiff
  - | Lead5Charang
  - | Lead6Voice
  - | Lead7Fifths
  - | Lead8BassLead
  - | Pad1NewAge
  - | Pad2Warm
  - | Pad3Polysynth
  - | Pad4Choir
  - | Pad5Bowed
  - | Pad6Metallic
  - | Pad7Halo
  - | Pad8Sweep
  - | FX1Rain
  - | FX2Soundtrack
  - | FX3Crystal
  - | FX4Atmosphere
  - | FX5Brightness
  - | FX6Goblins
  - | FX7Echoes
  - | FX8SciFi
  - | Sitar
  - | Banjo
  - | Shamisen
  - | Koto
  - | Kalimba
  - | Bagpipe
  - | Fiddle
  - | Shanai
  - | TinkleBell
  - | Agogo
  - | SteelDrums
  - | Woodblock
  - | TaikoDrum
  - | MelodicTom
  - | SynthDrum
  - | ReverseCymbal
  - | GuitarFretNoise
  - | BreathNoise
  - | Seashore
  - | BirdTweet
  - | TelephoneRing
  - | Helicopter
  - | Applause
  - | Gunshot
- data Drum
  - = AcousticBassDrum
  - | BassDrum1
  - | SideStick
  - | AcousticSnare
  - | HandClap
  - | ElectricSnare
  - | LowFloorTom
  - | ClosedHiHat
  - | HighFloorTom
  - | PedalHiHat
  - | LowTom
  - | OpenHiHat
  - | LowMidTom
  - | HiMidTom
  - | CrashCymbal1
  - | HighTom
  - | RideCymbal1
  - | ChineseCymbal
  - | RideBell
  - | Tambourine
  - | SplashCymbal
  - | Cowbell
  - | CrashCymbal2
  - | Vibraslap
  - | RideCymbal2
  - | HiBongo
  - | LowBongo
  - | MuteHiConga
  - | OpenHiConga
  - | LowConga
  - | HighTimbale
  - | LowTimbale
  - | HighAgogo
  - | LowAgogo
  - | Cabasa
  - | Maracas
  - | ShortWhistle
  - | LongWhistle
  - | ShortGuiro
  - | LongGuiro
  - | Claves
  - | HiWoodBlock
  - | LowWoodBlock
  - | MuteCuica
  - | OpenCuica
  - | MuteTriangle
  - | OpenTriangle
- toProgram :: Int -> Program
- toChannel :: Int -> Channel
- bn :: T
- wn :: T
- hn :: T
- qn :: T
- en :: T
- sn :: T
- tn :: T
- sfn :: T
- dwn :: T
- dhn :: T
- dqn :: T
- den :: T
- dsn :: T
- dtn :: T
- ddhn :: T
- ddqn :: T
- dden :: T
- bnr :: T note
- wnr :: T note
- hnr :: T note
- qnr :: T note
- enr :: T note
- snr :: T note
- tnr :: T note
- sfnr :: T note
- dwnr :: T note
- dhnr :: T note
- dqnr :: T note
- denr :: T note
- dsnr :: T note
- dtnr :: T note
- ddhnr :: T note
- ddqnr :: T note
- ddenr :: T note
- line :: [T note] -> T note
- chord :: [T note] -> T note
- changeTempo :: DurRatio -> T note -> T note
- transpose :: Relative -> T note -> T note
- phrase :: PhraseAttribute -> T note -> T note
- (+:+) :: T note -> T note -> T note
- (=:=) :: T note -> T note -> T note
- type Dur = T
- data PhraseAttribute
  - = Dyn Dynamic
  - | Tmp Tempo
  - | Art Articulation
  - | Orn Ornament
- data Dynamic
  - = Loudness Rational
  - | Accent Rational
  - | Crescendo Rational
  - | Diminuendo Rational
- data Tempo
  - = Ritardando Rational
  - | Accelerando Rational
- data Articulation
  - = Staccato Dur
  - | Legato Dur
  - | Slurred Dur
  - | Tenuto
  - | Marcato
  - | Pedal
  - | Fermata
  - | FermataDown
  - | Breath
  - | DownBow
  - | UpBow
  - | Harmonic
  - | Pizzicato
  - | LeftPizz
  - | BartokPizz
  - | Swell
  - | Wedge
  - | Thumb
  - | Stopped
- data Ornament
  - = Trill
  - | Mordent
  - | InvMordent
  - | DoubleMordent
  - | Turn
  - | TrilledTurn
  - | ShortTrill
  - | Arpeggio
  - | ArpeggioUp
  - | ArpeggioDown
  - | Instruction String
  - | Head NoteHead
- data NoteHead
  - = DiamondHead
  - | SquareHead
  - | XHead
  - | TriangleHead
  - | TremoloHead
  - | SlashHead
  - | ArtHarmonic
  - | NoHead
- accent :: Rational -> T note -> T note
- crescendo :: Rational -> T note -> T note
- diminuendo :: Rational -> T note -> T note
- loudness1 :: Rational -> T note -> T note
- ritardando :: Rational -> T note -> T note
- accelerando :: Rational -> T note -> T note
- staccato :: Dur -> T note -> T note
- legato :: Dur -> T note -> T note
- defltLegato :: T note -> T note
- defltStaccato :: T note -> T note
- defltAccent :: T note -> T note
- bigAccent :: T note -> T note

# Documentation

type T = T Drum Instr Source

type Note = Note Drum Instr Source

type NoteBody = NoteBody Drum Instr Source

type Instr = Instrument Source

velocity :: Note drum instr -> Rational Source

body :: Note drum instr -> NoteBody drum instrSource

instrument :: NoteBody drum instr -> instrSource

pitch :: NoteBody drum instr -> T Source

drum :: NoteBody drum instr -> drumSource

noteFromStdMelodyNote :: instr -> Note -> Note drum instrSource

fromStdMelody :: Instr -> T -> T Source

in contrast to RhyMusic.fromStdMelody it has fixed instrument type

fromMelodyNullAttr :: Instr -> T () -> T Source

data Instrument

Constructors

AcousticGrandPiano |
BrightAcousticPiano |
ElectricGrandPiano |
HonkyTonk |
ElectricPiano1 |
ElectricPiano2 |
Harpsichord |
Clavinet |
Celesta |
Glockenspiel |
MusicBox |
Vibraphone |
Marimba |
Xylophone |
TubularBells |
Dulcimer |
DrawbarOrgan |
PercussiveOrgan |
RockOrgan |
ChurchOrgan |
ReedOrgan |
Accordion |
Harmonica |
TangoAccordian |
AcousticGuitarNylon |
AcousticGuitarSteel |
ElectricGuitarJazz |
ElectricGuitarClean |
ElectricGuitarMuted |
OverdrivenGuitar |
DistortionGuitar |
GuitarHarmonics |
AcousticBass |
ElectricBassFinger |
ElectricBassPick |
FretlessBass |
SlapBass1 |
SlapBass2 |
SynthBass1 |
SynthBass2 |
Violin |
Viola |
Cello |
Contrabass |
TremoloStrings |
PizzicatoStrings |
OrchestralHarp |
Timpani |
StringEnsemble1 |
StringEnsemble2 |
SynthStrings1 |
SynthStrings2 |
ChoirAahs |
VoiceOohs |
SynthVoice |
OrchestraHit |
Trumpet |
Trombone |
Tuba |
MutedTrumpet |
FrenchHorn |
BrassSection |
SynthBrass1 |
SynthBrass2 |
SopranoSax |
AltoSax |
TenorSax |
BaritoneSax |
Oboe |
EnglishHorn |
Bassoon |
Clarinet |
Piccolo |
Flute |
Recorder |
PanFlute |
BlownBottle |
Skakuhachi |
Whistle |
Ocarina |
Lead1Square |
Lead2Sawtooth |
Lead3Calliope |
Lead4Chiff |
Lead5Charang |
Lead6Voice |
Lead7Fifths |
Lead8BassLead |
Pad1NewAge |
Pad2Warm |
Pad3Polysynth |
Pad4Choir |
Pad5Bowed |
Pad6Metallic |
Pad7Halo |
Pad8Sweep |
FX1Rain |
FX2Soundtrack |
FX3Crystal |
FX4Atmosphere |
FX5Brightness |
FX6Goblins |
FX7Echoes |
FX8SciFi |
Sitar |
Banjo |
Shamisen |
Koto |
Kalimba |
Bagpipe |
Fiddle |
Shanai |
TinkleBell |
Agogo |
SteelDrums |
Woodblock |
TaikoDrum |
MelodicTom |
SynthDrum |
ReverseCymbal |
GuitarFretNoise |
BreathNoise |
Seashore |
BirdTweet |
TelephoneRing |
Helicopter |
Applause |
Gunshot |

Instances

Bounded Instrument |
Enum Instrument |
Eq Instrument |
Ord Instrument |
Show Instrument |
Ix Instrument |
Random Instrument |
Arbitrary Instrument |

data Drum

Constructors

AcousticBassDrum |
BassDrum1 |
SideStick |
AcousticSnare |
HandClap |
ElectricSnare |
LowFloorTom |
ClosedHiHat |
HighFloorTom |
PedalHiHat |
LowTom |
OpenHiHat |
LowMidTom |
HiMidTom |
CrashCymbal1 |
HighTom |
RideCymbal1 |
ChineseCymbal |
RideBell |
Tambourine |
SplashCymbal |
Cowbell |
CrashCymbal2 |
Vibraslap |
RideCymbal2 |
HiBongo |
LowBongo |
MuteHiConga |
OpenHiConga |
LowConga |
HighTimbale |
LowTimbale |
HighAgogo |
LowAgogo |
Cabasa |
Maracas |
ShortWhistle |
LongWhistle |
ShortGuiro |
LongGuiro |
Claves |
HiWoodBlock |
LowWoodBlock |
MuteCuica |
OpenCuica |
MuteTriangle |
OpenTriangle |

Instances

Bounded Drum |
Enum Drum |
Eq Drum |
Ord Drum |
Show Drum |
Ix Drum |
Random Drum |
Arbitrary Drum |

toProgram :: Int -> Program

toChannel :: Int -> Channel

bn :: T Source

wn :: T Source

hn :: T Source

qn :: T Source

en :: T Source

sn :: T Source

tn :: T Source

sfn :: T Source

dwn :: T Source

dhn :: T Source

dqn :: T Source

den :: T Source

dsn :: T Source

dtn :: T Source

ddhn :: T Source

ddqn :: T Source

dden :: T Source

bnr :: T noteSource

wnr :: T noteSource

hnr :: T noteSource

qnr :: T noteSource

enr :: T noteSource

snr :: T noteSource

tnr :: T noteSource

sfnr :: T noteSource

dwnr :: T noteSource

dhnr :: T noteSource

dqnr :: T noteSource

denr :: T noteSource

dsnr :: T noteSource

dtnr :: T noteSource

ddhnr :: T noteSource

ddqnr :: T noteSource

ddenr :: T noteSource

line :: [T note] -> T noteSource

chord :: [T note] -> T noteSource

changeTempo :: DurRatio -> T note -> T noteSource

transpose :: Relative -> T note -> T noteSource

phrase :: PhraseAttribute -> T note -> T noteSource

(+:+) :: T note -> T note -> T noteSource

(=:=) :: T note -> T note -> T noteSource

type Dur = T Source

data PhraseAttribute Source

Constructors

Dyn Dynamic |
Tmp Tempo |
Art Articulation |
Orn Ornament |

Instances

Eq PhraseAttribute |
Ord PhraseAttribute |
Show PhraseAttribute |

data Dynamic Source

Constructors

Loudness Rational |
Accent Rational |
Crescendo Rational |
Diminuendo Rational |

Instances

Eq Dynamic |
Ord Dynamic |
Show Dynamic |

data Tempo Source

Constructors

Ritardando Rational |
Accelerando Rational |

Instances

Eq Tempo |
Ord Tempo |
Show Tempo |

data Articulation Source

Constructors

Staccato Dur |
Legato Dur |
Slurred Dur |
Tenuto |
Marcato |
Pedal |
Fermata |
FermataDown |
Breath |
DownBow |
UpBow |
Harmonic |
Pizzicato |
LeftPizz |
BartokPizz |
Swell |
Wedge |
Thumb |
Stopped |

Instances

Eq Articulation |
Ord Articulation |
Show Articulation |

data Ornament Source

Constructors

Trill |
Mordent |
InvMordent |
DoubleMordent |
Turn |
TrilledTurn |
ShortTrill |
Arpeggio |
ArpeggioUp |
ArpeggioDown |
Instruction String |
Head NoteHead |

Instances

Eq Ornament |
Ord Ornament |
Show Ornament |

data NoteHead Source

Constructors

DiamondHead |
SquareHead |
XHead |
TriangleHead |
TremoloHead |
SlashHead |
ArtHarmonic |
NoHead |

Instances

Eq NoteHead |
Ord NoteHead |
Show NoteHead |

accent :: Rational -> T note -> T noteSource

crescendo :: Rational -> T note -> T noteSource

diminuendo :: Rational -> T note -> T noteSource

loudness1 :: Rational -> T note -> T noteSource

ritardando :: Rational -> T note -> T noteSource

accelerando :: Rational -> T note -> T noteSource

staccato :: Dur -> T note -> T noteSource

legato :: Dur -> T note -> T noteSource

defltLegato :: T note -> T noteSource

defltStaccato :: T note -> T noteSource

defltAccent :: T note -> T noteSource

bigAccent :: T note -> T noteSource