-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Haskell representation and parser for ABC notation.
--
-- This package contains a Haskell representation and parser for ABC
-- notation.
--
-- ABC notation is a text-based music notation system designed to be
-- comprehensible by both people and computers. For more information see
-- http://abcnotation.com.
--
-- Based on the 2.1 standard.
@package abcnotation
@version 1.7.1
-- | A Haskell representation and parser for ABC notation. Based on the 2.1
-- standard.
--
-- For more information see http://abcnotation.com.
module Music.Abc
-- | A full ABC file (2.2).
data AbcFile
AbcFile :: (Maybe String) -> (Maybe FileHeader) -> [Element] -> AbcFile
-- | File header (2.2.2).
data FileHeader
FileHeader :: [Information] -> [Directive] -> FileHeader
-- | Either a tune, free text or typeset text (2.2.3).
data Element
-- | An Abc tune.
Tune :: AbcTune -> Element
-- | Free text (2.2.3).
FreeText :: String -> Element
-- | Typeset text (2.2.3).
TypesetText :: String -> Element
data AbcTune
AbcTune :: TuneHeader -> TuneBody -> AbcTune
data TuneHeader
TuneHeader :: [Information] -> TuneHeader
-- | Lines of music code.
type TuneBody = [Music]
-- | One line of music code.
data Music
Chord :: Chord -> Music
Barline :: Barline -> Music
Tie :: Music -> Music
Slur :: Music -> Music
Beam :: Music -> Music
Grace :: Music -> Music
Tuplet :: Duration -> Music -> Music
Decorate :: Decoration -> Music -> Music
Annotate :: Annotation -> Music -> Music
ChordSymbol :: ChordSymbol -> Music -> Music
Sequence :: [Music] -> Music
newtype Chord
Chord_ :: ([Pitch], Maybe Duration) -> Chord
getChord :: Chord -> ([Pitch], Maybe Duration)
-- | Barline, including special barlines and repeats.
data Barline
SingleBarline :: Barline
DoubleBarline :: Bool -> Bool -> Barline
Repeat :: Int -> Bool -> Bool -> Barline
DottedBarline :: Barline -> Barline
InvisibleBarline :: Barline -> Barline
data Annotation
AnnotateLeft :: String -> Annotation
AnnotateRight :: String -> Annotation
AnnotateAbove :: String -> Annotation
AnnotateBelow :: String -> Annotation
AnnotateUnspecified :: String -> Annotation
type ChordSymbol = String
-- | Decorations (4.14)
data Decoration
Trill :: Decoration
TrillBegin :: Decoration
TrillEnd :: Decoration
Lowermordent :: Decoration
Uppermordent :: Decoration
Roll :: Decoration
Turn :: Decoration
Turnx :: Decoration
Invertedturn :: Decoration
Invertedturnx :: Decoration
Arpeggio :: Decoration
Accent :: Decoration
Fermata :: Bool -> Decoration
Tenuto :: Decoration
Fingering :: Int -> Decoration
Plus :: Decoration
Snap :: Decoration
Slide :: Decoration
Wedge :: Decoration
Upbow :: Decoration
Downbow :: Decoration
Open :: Decoration
Thumb :: Decoration
Breath :: Decoration
Dynamic :: Dynamic -> Decoration
Crescendo :: Decoration
EndCrescendo :: Decoration
Diminuendo :: Decoration
EndDiminuendo :: Decoration
Segno :: Decoration
Coda :: Decoration
DaSegno :: Decoration
DaCapo :: Decoration
Dacoda :: Decoration
Fine :: Decoration
Shortphrase :: Decoration
Mediumphrase :: Decoration
Longphrase :: Decoration
data Dynamic
PPPP :: Dynamic
PPP :: Dynamic
PP :: Dynamic
P_ :: Dynamic
MP :: Dynamic
MF :: Dynamic
F_ :: Dynamic
FF :: Dynamic
FFF :: Dynamic
FFFF :: Dynamic
SFZ :: Dynamic
-- | Duration (4.3).
newtype Duration
Duration :: Rational -> Duration
getDuration :: Duration -> Rational
data Meter
NoMeter :: Meter
Common :: Meter
Cut :: Meter
Simple :: Rational -> Meter
Compound :: [Integer] -> Integer -> Meter
-- | Optional string, numerators, frequency (3.1.8)
newtype Tempo
Tempo_ :: (Maybe String, [Duration], Duration) -> Tempo
getTempo :: Tempo -> (Maybe String, [Duration], Duration)
-- | Pitch class (4.1).
data PitchClass
C :: PitchClass
D :: PitchClass
E :: PitchClass
F :: PitchClass
G :: PitchClass
A :: PitchClass
B :: PitchClass
-- | Accidentals (4.2).
data Accidental
DoubleFlat :: Accidental
Flat :: Accidental
Natural :: Accidental
Sharp :: Accidental
DoubleSharp :: Accidental
-- | Octaves (4.1).
newtype Octave
Octave :: Int -> Octave
getOctave :: Octave -> Int
-- | Pitch (4.1, 4.2).
newtype Pitch
Pitch :: (PitchClass, Maybe Accidental, Octave) -> Pitch
getPitch :: Pitch -> (PitchClass, Maybe Accidental, Octave)
newtype Key
Key_ :: (Integer, Mode) -> Key
data StemDirection
Up :: StemDirection
Down :: StemDirection
data Clef
NoClef :: Clef
Treble :: Clef
Alto :: Clef
Tenor :: Clef
Bass :: Clef
Perc :: Clef
data Mode
Major :: Mode
Minor :: Mode
Ionian :: Mode
Dorian :: Mode
Phrygian :: Mode
Lydian :: Mode
Mixolydian :: Mode
Aeolian :: Mode
Locrian :: Mode
-- | An information field (3).
data Information
Area :: String -> Information
Book :: String -> Information
Composer :: String -> Information
Discography :: String -> Information
FileUrl :: String -> Information
Group :: String -> Information
History :: String -> Information
Instruction :: Directive -> Information
Key :: Key -> Information
UnitNoteLength :: Duration -> Information
Meter :: Meter -> Information
-- | Macro (not supported)
Macro :: Information
-- | Notes
Notes :: String -> Information
-- | Origin of tune.
Origin :: String -> Information
Parts :: Information
-- | Tempo of tune.
Tempo :: Tempo -> Information
-- | Rhythm type of tune.
Rhythm :: String -> Information
-- | Remarks (not supported)
Remark :: Information
-- | Source material.
Source :: String -> Information
SymbolLine :: Information
-- | Title of tune.
Title :: String -> Information
-- | User defined (not supported)
UserDefined :: Information
Voice :: VoiceProperties -> Information
Words :: String -> Information
ReferenceNumber :: Integer -> Information
Transcription :: String -> Information
-- | Abc directive.
newtype Directive
Directive :: (String, String) -> Directive
getDirective :: Directive -> (String, String)
data VoiceProperties
VoiceProperties :: (Maybe String) -> (Maybe String) -> (Maybe StemDirection) -> (Maybe Clef) -> VoiceProperties
readAbc :: String -> AbcFile
showAbc :: AbcFile -> String
instance Eq Annotation
instance Ord Annotation
instance Show Annotation
instance Eq Barline
instance Ord Barline
instance Show Barline
instance Eq Dynamic
instance Ord Dynamic
instance Show Dynamic
instance Eq Decoration
instance Ord Decoration
instance Show Decoration
instance Eq PitchClass
instance Ord PitchClass
instance Show PitchClass
instance Enum PitchClass
instance Bounded PitchClass
instance Eq Accidental
instance Ord Accidental
instance Show Accidental
instance Enum Accidental
instance Bounded Accidental
instance Eq Octave
instance Ord Octave
instance Show Octave
instance Enum Octave
instance Num Octave
instance Real Octave
instance Integral Octave
instance Eq Pitch
instance Ord Pitch
instance Show Pitch
instance Eq Duration
instance Ord Duration
instance Show Duration
instance Enum Duration
instance Num Duration
instance Real Duration
instance Fractional Duration
instance RealFrac Duration
instance Eq Chord
instance Ord Chord
instance Show Chord
instance Eq Music
instance Ord Music
instance Show Music
instance Eq Meter
instance Ord Meter
instance Show Meter
instance Eq Mode
instance Ord Mode
instance Show Mode
instance Eq Key
instance Ord Key
instance Show Key
instance Eq Tempo
instance Ord Tempo
instance Show Tempo
instance Eq StemDirection
instance Ord StemDirection
instance Show StemDirection
instance Enum StemDirection
instance Bounded StemDirection
instance Eq Clef
instance Ord Clef
instance Show Clef
instance Enum Clef
instance Bounded Clef
instance Eq VoiceProperties
instance Ord VoiceProperties
instance Show VoiceProperties
instance Eq Directive
instance Ord Directive
instance Show Directive
instance Eq Information
instance Ord Information
instance Show Information
instance Eq TuneHeader
instance Ord TuneHeader
instance Show TuneHeader
instance Eq AbcTune
instance Ord AbcTune
instance Show AbcTune
instance Eq Element
instance Ord Element
instance Show Element
instance Eq FileHeader
instance Ord FileHeader
instance Show FileHeader
instance Eq AbcFile
instance Ord AbcFile
instance Show AbcFile
instance Pretty Directive
instance Pretty VoiceProperties
instance Pretty Tempo
instance Pretty Mode
instance Pretty Key
instance Pretty Meter
instance Pretty Duration
instance Pretty Accidental
instance Pretty Pitch
instance Pretty Information
instance Pretty Chord
instance Pretty Music
instance Pretty TuneHeader
instance Pretty AbcTune
instance Pretty Element
instance Pretty FileHeader
instance Pretty AbcFile
module Music.Abc.Parser
-- | Parse a module description, returning an error if unsuccessful.
parse :: String -> Either ParseError AbcFile