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.
#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 MeterSignature)
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 = { duration :: NoteDuration, notes :: NonEmptyList AbcNote }
A Chord.
#RestOrNote Source
type RestOrNote = Either AbcRest GraceableNote
either a Rest or a Note.
#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
Pitch { accidental :: Accidental, pitchClass :: PitchClass }
Instances
#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.
#AnnotationPlacement Source
#Accidental Source
#PitchClass Source
#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.