tidal-link-1.1.0: Ableton Link integration for Tidal
Safe HaskellNone
LanguageHaskell2010

Sound.Tidal.Clock

Synopsis

Documentation

type Clock = ReaderT ClockMemory (StateT ClockState IO) Source #

representation of a tick based clock

data ClockMemory Source #

internal read-only memory of the clock

data ClockState Source #

internal mutable state of the clock

Constructors

ClockState 

Fields

Instances

Instances details
Show ClockState Source # 
Instance details

Defined in Sound.Tidal.Clock

data ClockRef Source #

reference to interact with the clock, while it is running

type TickAction = (Time, Time) -> Double -> ClockConfig -> ClockRef -> (SessionState, SessionState) -> IO () Source #

action to be executed on a tick, | given the current timespan, nudge and reference to the clock

data ClockAction Source #

possible actions for interacting with the clock

clocked :: ClockConfig -> TickAction -> IO ClockRef Source #

creates a clock according to the config and runs it | in a seperate thread

runClock :: ClockConfig -> TickAction -> Clock () -> IO ClockRef Source #

runs the clock on the initial state and memory as given | by initClock, hands the ClockRef for interaction from outside

initClock :: ClockConfig -> TickAction -> IO (ClockMemory, ClockState) Source #

creates a ableton link instance and an MVar for interacting | with the clock from outside and computes the initial clock state