ABC data types

#AbcTune Source

type AbcTune = { body :: TuneBody, headers :: TuneHeaders }

A Tune.

#TuneHeaders Source

type TuneHeaders = List Header

A List of Tune Headers.

#TuneBody Source

type TuneBody = List BodyPart

A Tune Body.

#BodyPart Source

data BodyPart

A Tune Body part


#MusicLine Source

type MusicLine = List Music

A line of musical within a bar.

#AbcRest Source

type AbcRest = { duration :: NoteDuration }

A Rest.

#AbcNote Source

type AbcNote = { accidental :: Accidental, duration :: NoteDuration, octave :: Int, pitchClass :: PitchClass, tied :: Boolean }

A Note.

#Grace Source

type Grace = { isAcciaccatura :: Boolean, notes :: NonEmptyList AbcNote }

a set of one or more grace notes

#GraceableNote Source

type GraceableNote = { abcNote :: AbcNote, decorations :: List String, leftSlurs :: Int, maybeGrace :: Maybe Grace, rightSlurs :: Int }

A (possibly) Graced and Decorated Note.

#AbcChord Source

type AbcChord = { decorations :: List String, duration :: NoteDuration, leftSlurs :: Int, notes :: NonEmptyList AbcNote, rightSlurs :: Int }

A Chord.

#RestOrNote Source

type RestOrNote = Either AbcRest GraceableNote

either a Rest or a Note.

#AbcTuplet Source

type AbcTuplet = { leftSlurs :: Int, maybeGrace :: Maybe Grace, restsOrNotes :: NonEmptyList RestOrNote, signature :: TupletSignature }

A Tuplet

#Bar Source

type Bar = { decorations :: List String, music :: List Music, startLine :: BarLine }

A music phrase is contained within a Bar which is a set of music items introduced by a bar line

#BarLine Source

type BarLine = { endRepeats :: Int, iteration :: Maybe (NonEmptyList Volta), startRepeats :: Int, thickness :: Thickness }

A Bar Line:

#Thickness Source

data Thickness

A bar line Thickness.



#Volta Source

data Volta

a Volta - a repeated section



#NoteDuration Source

type NoteDuration = Rational

A Note Duration - e.g. 1/4.

#KeySignature Source

type KeySignature = { accidental :: Accidental, mode :: Mode, pitchClass :: PitchClass }

A Key Signature.

#ModifiedKeySignature Source

type ModifiedKeySignature = { keySignature :: KeySignature, modifications :: List Pitch, properties :: AmorphousProperties }

A Key Signature with modifications (possibly empty) This is used for non-diatonicrepeatS modes where intervals may be greater than two semitones (for example as found in Klezmer).

#Pitch Source

data Pitch

A Key Accidental is represented by a Pitch (A modification to a standard key for one pitch in the scale). (we're not allowed to derive instances on record types unless we use newtype)



#KeySet Source

type KeySet = List Pitch

A set of pitches within a key signature or scale

#TempoSignature Source

type TempoSignature = { bpm :: Int, marking :: Maybe String, noteLengths :: NonEmptyList Rational }

A Tempo Signature - for example:

#TimeSignature Source

type TimeSignature = { denominator :: Int, numerator :: Int }

A Time Signature - e.g. 3/4.

#TupletSignature Source

type TupletSignature = { p :: Int, q :: Int, r :: Int }

A tuplet signature: put p notes into the time of q the next r notes.

#PitchClass Source

data PitchClass

A white note on the piano.



#SymbolDefinition Source

type SymbolDefinition = { duration :: Maybe NoteDuration, name :: String }

A Chord Symbol definition. Note that in ABC, this is merely a free-format string with recommendations in the spec of how it might be properly formatted. We include an optional duration. This is ignored by the parser but can act as a placeholder for applications such as players to calculate a duration.

#Broken Source

data Broken

A broken rhythm operator - one or more < or >.-}


#VoiceDescription Source

type VoiceDescription = { id :: String, properties :: AmorphousProperties }

voice description

#AmorphousProperties Source

type AmorphousProperties = Map String String

we stringly-type any header properties that we don't particularly care about

#middlecOctave Source

middlecOctave :: Int

The octave number of middle C in MIDI parlance.