Data.Abc.Tempo
- Package
- purescript-abc-parser
- Repository
- newlandsvalley/purescript-abc-parser
Conversion functions for Tempo.
#AbcTempo Source
type AbcTempo = { bpm :: Int, tempoNoteLength :: Rational, unitNoteLength :: Rational }
The tempo when the tune is being played. This is usually represented as (for example) 1/4 = 120 - i.e. 120 querter notes per minute. this is a consolidation of both the Tempo and the Unit Note length which thus encapsulates everything you need to calculate the overall tempo of the tune
tempoNoteLength - the note length of a tempo definition bpm - the beats per minute of a tempo Definition unitNoteLength - the length of a 'unit note' in the ABC definition
#defaultTempo Source
defaultTempo :: TempoSignature
The default Tempo - 1/4=120.
#defaultAbcTempo Source
defaultAbcTempo :: AbcTempo
default to 1/4=120 with eighth notes as the default note length this works out that an eighth notes last for 1/4 second
#getAbcTempo Source
getAbcTempo :: AbcTune -> AbcTempo
Get the ABC tempo from the tune
#beatsPerSecond Source
beatsPerSecond :: AbcTempo -> Rational
calculate the number of beats per second given by an ABC tempo to give a simple indication of the tempo of the overall melody note that this is independent of the unit note length
#standardMidiTick Source
standardMidiTick :: MidiTick
A standard MIDI tick - we use 1/4 note = 480 ticks. this is known as 'ticks per quarter note' or 'parts per quarter' in MIDI literature, 480 tends to be standard.