1 {-# LANGUAGE MultiParamTypeClasses #-}
3 module RMCA.Global.Clock ( AbsBeat
12 -- The absolute beat is the beat number of the global clock, there are
13 -- 16 starting from 1.
19 -- The global system tempo beats every 16th note, each beat is tagged
20 -- with a beat number modulo sixteen. Each layer is then beating at
21 -- its own fraction, discarding the unecessary beats.
22 metronome :: SF Tempo (Event AbsBeat)
23 metronome = accumBy (\pb _ -> nextBeatNo maxAbsBeat pb) 0 <<<
24 repeatedlyS' () <<^ (15*) <<^ (1/) <<^ fromIntegral