-- 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 0.5
-- | 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
type TuneBody = [Music]
data Music
Music :: [Note :|: (MultiRest :|: (Barline :|: ()))] -> Music
type Note = DecorationT (SlurT (BeamT (GraceT (TupletT (DurationT (RestT Pitch))))))
type DecorationT a = ([Decoration], a)
type SlurT a = (Bool, a, Bool)
type BeamT a = (Bool, a, Bool)
type GraceT a = (Bool, a)
type TupletT a = (Duration, a)
type DurationT a = (a, Duration)
type RestT a = Maybe (Maybe a)
type (:|:) a b = Either a b
newtype Duration
Duration :: Rational -> Duration
getDuration :: Duration -> Rational
data PitchClass
C :: PitchClass
D :: PitchClass
E :: PitchClass
F :: PitchClass
G :: PitchClass
A :: PitchClass
B :: PitchClass
data Accidental
DoubleFlat :: Accidental
Flat :: Accidental
Natural :: Accidental
Sharp :: Accidental
DoubleSharp :: Accidental
newtype Octave
Octave :: Int -> Octave
getOctave :: Octave -> Int
newtype Pitch
Pitch :: (PitchClass, Accidental, Octave) -> Pitch
getPitch :: Pitch -> (PitchClass, Accidental, Octave)
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
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
-- | Barline, including special barlines and repeats.
data Barline
Barline :: Barline
DoubleBarline :: Bool -> Bool -> Barline
Repeat :: Int -> Bool -> Bool -> Barline
DottedBarline :: Barline -> Barline
InvisibleBarline :: Barline -> Barline
newtype MultiRest
MultiRest :: Int -> MultiRest
getMultiRest :: MultiRest -> Int
data Information
Area :: String -> Information
Book :: String -> Information
Composer :: String -> Information
Discography :: String -> Information
FileUrl :: String -> URI -> Information
Group :: String -> Information
History :: String -> Information
Instruction :: Directive -> Information
Key :: Key -> Information
UnitNoteLength :: Duration -> Information
Meter :: Meter -> Information
Notes :: String -> Information
Origin :: String -> Information
Parts :: Information
Tempo :: Tempo -> Information
Rhythm :: String -> Information
Source :: String -> Information
SymbolLine :: Symbol -> Information
TuneTitle :: String -> Information
Voice :: VoiceProps -> Information
Words :: String -> Information
ReferenceNumber :: Integer -> Information
Transcription :: String -> Information
-- | Abc directive.
type Directive = (String, String)
readAbc :: String -> AbcFile
showAbc :: AbcFile -> String
instance Eq MultiRest
instance Ord MultiRest
instance Show MultiRest
instance Eq Decoration
instance Ord Decoration
instance Show Decoration
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 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 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 Barline
instance Ord Barline
instance Show Barline
instance Eq VoiceProps
instance Ord VoiceProps
instance Show VoiceProps
instance Eq Meter
instance Ord Meter
instance Show Meter
instance Eq Mode
instance Ord Mode
instance Show Mode
instance Eq Information
instance Ord Information
instance Show Information
instance Eq TuneHeader
instance Ord TuneHeader
instance Show TuneHeader
instance Eq FileHeader
instance Ord FileHeader
instance Show FileHeader
instance Eq Music
instance Ord Music
instance Show Music
instance Eq AbcTune
instance Ord AbcTune
instance Show AbcTune
instance Eq Element
instance Ord Element
instance Show Element
module Music.Abc.Parser
-- | Parse a module description, returning an error if unsuccessful.
parse :: String -> Either ParseError AbcFile