Copyright | (c) Hans Hoglund 2012 |
---|---|
License | BSD-style |
Maintainer | hans@hanshoglund.se |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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).
Eq FileHeader | |
Ord FileHeader | |
Show FileHeader | |
Pretty FileHeader |
Either a tune, free text or typeset text (2.2.3).
Tunes
data TuneHeader Source
Eq TuneHeader | |
Ord TuneHeader | |
Show TuneHeader | |
Pretty TuneHeader |
Music
One line of music code.
Barline, including special barlines and repeats.
data Annotation Source
type ChordSymbol = String Source
data Decoration Source
Decorations (4.14)
Time
Duration (4.3).
Optional string, numerators, frequency (3.1.8)
Pitch
data PitchClass Source
Pitch class (4.1).
data Accidental Source
Accidentals (4.2).
Octaves (4.1).
Pitch (4.1, 4.2).
Pitch | |
|
data StemDirection Source
Information
data Information Source
An information field (3).
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 |
Abc directive.
Directive | |
|
data VoiceProperties Source
VoiceProperties (Maybe String) (Maybe String) (Maybe StemDirection) (Maybe Clef) |