Module

Data.Abc

Package
purescript-abc-parser
Repository
newlandsvalley/purescript-abc-parser

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

Constructors

#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 = { duration :: NoteDuration, notes :: NonEmptyList AbcNote }

A Chord.

#RestOrNote Source

type RestOrNote = Either AbcRest GraceableNote

either a Rest or a Note.

#Bar Source

type Bar = { music :: List Music, startLine :: BarType }

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

#BarType Source

type BarType = { iteration :: Maybe Int, repeat :: Maybe Repeat, thickness :: Thickness }

A Bar line type:

#Thickness Source

data Thickness

A bar line Thickness.

Constructors

Instances

#Repeat Source

data Repeat

A Repeat in a Bar line.

Constructors

Instances

#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 }

A Key Signature with modifications (possibly empty) This is used for non-diatonic 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)

Constructors

Instances

#KeySet Source

type KeySet = List Pitch

A set of pitches within a key signature or scale

#MeterSignature Source

type MeterSignature = Tuple Int Int

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

#TempoSignature Source

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

A Tempo Signature - for example:

#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.

Constructors

Instances

#Broken Source

data Broken

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

Constructors

#VoiceDescription Source

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

voice description

#middlecOctave Source

middlecOctave :: Int

The octave number of middle C in MIDI parlance.