Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | W. Bas de Haas <bash@cs.uu.nl> |
Safe Haskell | Safe-Inferred |
Summary: Modelling musical time (in a minimalistic way) with beats, bars and time signatures.
- newtype TimeSig = TimeSig {}
- data BeatWeight
- beatWeight :: TimeSig -> Int -> BeatWeight
- tatumsPerBar :: TimeSig -> Int
- chordsPerDot :: TimeSig -> Int
Documentation
Model a time signature as a fraction
data BeatWeight Source
Barlines can have different weights. Among other applications, this is used in the printing of chord sequences.
beatWeight :: TimeSig -> Int -> BeatWeightSource
Defines the metrical weight of a bar. A regular beat has strength 0, a bar has strength 1, a bar after 4 bars 2, a bar after 8 bars 3, and a bar after 16 bars 4.
tatumsPerBar :: TimeSig -> IntSource
Returns the number of tatums
in a bar which is different for time
signatures. For example:
>>>
tatumsPerBar (TimeSig (3 ,4))
6
>>>
tatumsPerBar (TimeSig (6 ,8))
6
>>>
tatumsPerBar (TimeSig (12,8))
12
N.B. This function is not strictly correct music-theoretically, but it reflects how Billboard annotators used time signatures.