Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Data.Music.Abc
Description
A Haskell representation and parser for ABC notation. Based on the 2.1 standard.
For more information see http://abcnotation.com.
- data AbcFile = AbcFile (Maybe String) (Maybe FileHeader) [Element]
- data FileHeader = FileHeader [Information] [Directive]
- data Element
- data AbcTune = AbcTune TuneHeader TuneBody
- data TuneHeader = TuneHeader [Information]
- type TuneBody = [Music]
- data Music
- newtype Chord = Chord_ {}
- data Barline
- data Annotation
- type ChordSymbol = String
- data Decoration
- = Trill
- | TrillBegin
- | TrillEnd
- | Lowermordent
- | Uppermordent
- | Roll
- | Turn
- | Turnx
- | Invertedturn
- | Invertedturnx
- | Arpeggio
- | Accent
- | Fermata Bool
- | Tenuto
- | Fingering Int
- | Plus
- | Snap
- | Slide
- | Wedge
- | Upbow
- | Downbow
- | Open
- | Thumb
- | Breath
- | Dynamic Dynamic
- | Crescendo
- | EndCrescendo
- | Diminuendo
- | EndDiminuendo
- | Segno
- | Coda
- | DaSegno
- | DaCapo
- | Dacoda
- | Fine
- | Shortphrase
- | Mediumphrase
- | Longphrase
- data Dynamic
- newtype Duration = Duration {}
- data Meter
- newtype Tempo = Tempo_ {}
- data PitchClass
- data Accidental
- = DoubleFlat
- | Flat
- | Natural
- | Sharp
- | DoubleSharp
- newtype Octave = Octave {}
- newtype Pitch = Pitch {
- getPitch :: (PitchClass, Maybe Accidental, Octave)
- newtype Key = Key_ (Integer, Mode)
- data StemDirection
- data Clef
- data Mode
- data Information
- = Area String
- | Book String
- | Composer String
- | Discography String
- | FileUrl String
- | Group String
- | History String
- | Instruction Directive
- | Key Key
- | UnitNoteLength Duration
- | Meter Meter
- | Macro
- | Notes String
- | Origin String
- | Parts
- | Tempo Tempo
- | Rhythm String
- | Remark
- | Source String
- | SymbolLine
- | Title String
- | UserDefined
- | Voice VoiceProperties
- | Words String
- | ReferenceNumber Integer
- | Transcription String
- newtype Directive = Directive {
- getDirective :: (String, String)
- data VoiceProperties = VoiceProperties (Maybe String) (Maybe String) (Maybe StemDirection) (Maybe Clef)
- readAbc :: String -> AbcFile
- showAbc :: AbcFile -> String
Abc format
Files
A full ABC file (2.2).
File header
data FileHeader Source
File header (2.2.2).
Constructors
FileHeader [Information] [Directive] |
Instances
Eq FileHeader | |
Ord FileHeader | |
Show FileHeader | |
Pretty FileHeader |
Either a tune, free text or typeset text (2.2.3).
Tunes
Constructors
AbcTune TuneHeader TuneBody |
data TuneHeader Source
Constructors
TuneHeader [Information] |
Instances
Eq TuneHeader | |
Ord TuneHeader | |
Show TuneHeader | |
Pretty TuneHeader |
Music
One line of music code.
Barline, including special barlines and repeats.
data Annotation Source
Constructors
AnnotateLeft String | |
AnnotateRight String | |
AnnotateAbove String | |
AnnotateBelow String | |
AnnotateUnspecified String |
Instances
type ChordSymbol = String Source
data Decoration Source
Decorations (4.14)
Constructors
Instances
Time
Duration (4.3).
Constructors
Duration | |
Fields |
Optional string, numerators, frequency (3.1.8)
Pitch
data Accidental Source
Accidentals (4.2).
Constructors
DoubleFlat | |
Flat | |
Natural | |
Sharp | |
DoubleSharp |
Instances
Octaves (4.1).
Pitch (4.1, 4.2).
Constructors
Pitch | |
Fields
|
data StemDirection Source
Information
data Information Source
An information field (3).
Constructors
Area String | |
Book String | |
Composer String | |
Discography String | |
FileUrl String | |
Group String | |
History String | |
Instruction Directive | |
Key Key | |
UnitNoteLength Duration | |
Meter Meter | |
Macro | Macro (not supported) |
Notes String | Notes |
Origin String | Origin of tune. |
Parts | |
Tempo Tempo | Tempo of tune. |
Rhythm String | Rhythm type of tune. |
Remark | Remarks (not supported) |
Source String | Source material. |
SymbolLine | |
Title String | Title of tune. |
UserDefined | User defined (not supported) |
Voice VoiceProperties | |
Words String | |
ReferenceNumber Integer | |
Transcription String |
Instances
Abc directive.
Constructors
Directive | |
Fields
|
data VoiceProperties Source
Constructors
VoiceProperties (Maybe String) (Maybe String) (Maybe StemDirection) (Maybe Clef) |
Instances