Data.Abc.Metadata
- Package
- purescript-abc-parser
- Repository
- newlandsvalley/purescript-abc-parser
A Ragbag of convenience functions for getting Metadata from ABC headers
#getKeySig Source
getKeySig :: AbcTune -> Maybe ModifiedKeySignature
Get the key signature (if any) from the tune.
#getTempoSig Source
getTempoSig :: AbcTune -> Maybe TempoSignature
get the tempo
#getUnitNoteLength Source
getUnitNoteLength :: AbcTune -> Maybe NoteDuration
Get the unit note length
#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
#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)