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
#getTempoSig Source
getTempoSig :: AbcTune -> Maybe TempoSignature
Get the raw tempo signature from the tune For more flexibility, you should use the _Tempo optic.
#getAbcTempo Source
getAbcTempo :: AbcTune -> AbcTempo
Get the ABC tempo from the tune This is usually more useful because it incorporates the unit note length
#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
#playedNoteDuration Source
playedNoteDuration :: AbcTempo -> Rational -> Number
calculate the note duration when it is played (in seconds) from an ABC note duration and tempo
#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.
- 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