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.
#Header Source
data Header
An ABC Tune Header.
Constructors
Area String
Book String
Composer String
Discography String
FileUrl String
Group String
History String
Instruction String
Key ModifiedKeySignature
UnitNoteLength NoteDuration
Meter (Maybe TimeSignature)
Macro String
Notes String
Origin String
Parts String
Tempo TempoSignature
Rhythm String
Remark String
Source String
SymbolLine String
Title String
UserDefined String
Voice VoiceDescription
WordsAfter String
WordsAligned String
ReferenceNumber (Maybe Int)
Transcription String
FieldContinuation String
Comment String
UnsupportedHeader
#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
#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
#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)
Constructors
Pitch { accidental :: Accidental, pitchClass :: PitchClass }
Instances
#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.
#AnnotationPlacement Source
#Accidental Source
#PitchClass Source
#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.
#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.
- Modules
- Data.
Abc - Data.
Abc. Accidentals - Data.
Abc. Canonical - Data.
Abc. KeySignature - Data.
Abc. Meter - Data.
Abc. Midi - Data.
Abc. Midi. Pitch - Data.
Abc. Midi. RepeatSections - Data.
Abc. Midi. Types - Data.
Abc. Octave - Data.
Abc. Optics - Data.
Abc. Parser - Data.
Abc. Repeats. Section - Data.
Abc. Repeats. Types - Data.
Abc. Repeats. Variant - Data.
Abc. Tempo - Data.
Abc. Transposition - Data.
Abc. UnitNote - Data.
Abc. Utils - Data.
Abc. Voice