Data.Abc.Utils
- Package
- purescript-abc-parser
- Repository
- newlandsvalley/purescript-abc-parser
A Ragbag of convenience functions, many of which get Metadata from ABC
#dotFactor Source
dotFactor :: Int -> Rational
The amount by which you increase or decrease the duration of a (possibly multiply) dotted note. For example A > B increases the duration of A and proportionally reduces that of B. A << B decreases the duration of A and increases that of B by an even greater amount. This function calculates the increase or decrease. The new duration will be given by:
duration * (1 +/- dotfactor i)
i is the number of 'dot' indicators (< or >)
#normaliseChord Source
normaliseChord :: AbcChord -> AbcChord
Normalise an ABC chord by placing the correct duration against each note and setting the overall Chord length to Unit
#chordDuration Source
chordDuration :: AbcChord -> NoteDuration
Get the duration of a chord. We consider notes in a chord to have the same duration (as the first such note) and must also cater for the overall chord duration.
#tupletDuration Source
tupletDuration :: AbcTuplet -> NoteDuration
Get the overall duration of a tuplet
#isEmptyStave Source
isEmptyStave :: List Bar -> Boolean
check if a new stave's contents is effectively empty (the list of bars is introduced by the Score BodyPart)
#removeRepeatMarkers Source
removeRepeatMarkers :: AbcTune -> AbcTune
remove repeat markers (used for thumbnails where we need to ignore them)
- 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