Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

Safe HaskellNone




The transport is the communication mechanism between the app and the performer. Extensive description is in the Cmd.Play docstring.



data Status Source #

These go back to the responder loop from the render thread to notify it about the transport's state.


Died String 


Eq Status # 


(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status # 

data Info Source #

Data needed by the player thread. This is created during app setup and passed directly to the play cmds by the responder loop. When the play is started, it's incorporated into the play State.




play control

data PlayControl Source #

Communication from the responder to the player, to tell the player to stop.

stop_player :: PlayControl -> IO () Source #

Signal to the player that you'd like it to start stopping doing whatever it is that it's doing and just like stop now ok? Is that ok?

play monitor control

data PlayMonitorControl Source #

Communication from the player to the responder, to say when it's stopped.

player_stopped :: PlayMonitorControl -> IO () Source #

Signal that the player has stopped.

poll_player_stopped :: Thread.Seconds -> PlayMonitorControl -> IO Bool Source #

True if the player has stopped.

play timing

type TempoFunction = BlockId -> TrackId -> ScoreTime -> [RealTime] Source #

Given a score time on a certain track in a certain block, give the real times that it corresponds to. There may be more than one if the block has been derived in more than one place, and there may be zero if the block and track combination wasn't derived at all or didn't extend to the given score time.

type ClosestWarpFunction = BlockId -> TrackId -> RealTime -> Score.Warp Source #

This is similar to TempoFunction but finds the warp for the given block that occurs closest to the given RealTime. Callers can use the warp to find multiple real times on that block.

TempoFunction simply returns all real times for a given score time, with no control over whether they come from the same block or not.

type InverseTempoFunction = RealTime -> [(BlockId, [(TrackId, ScoreTime)])] Source #

Return the ScoreTime play position in the various playing blocks at the given physical time. If the RealTime is past the end of all playing blocks, return []. The play monitor thread polls this periodically for all displayed blocks and updates the play selection accordingly.

Since a given block may be playing in multiple places at the same time (e.g. for a block that is played like an instrument, if the notes overlap), the same BlockId may occur more than once in the output list.