Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
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 


Instances details
Eq Status # 
Instance details

Defined in Perform.Transport


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

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

Show Status # 
Instance details

Defined in Perform.Transport

Pretty Status # 
Instance details

Defined in Perform.Transport

data Info Source #

Data needed by the MIDI 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.


Instances details
Show PlayControl # 
Instance details

Defined in Perform.Transport

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 -> Warp.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 = Stop -> 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.

data Stop Source #

Configure InverseTempoFunction. TODO think of better names



Stop emitting ScoreTime as soon as the events on the block end. This is used by the play monitor, since I want it to stop as soon as the score is "over" visually.


Keep emitting score time for all blocks. This is used to map from RealTime to ScoreTime for a particular block, regardless of the notes on it. E.g. Msg.ImProgress uses this because synthesis continues as long as the notes ring.


Instances details
Eq Stop # 
Instance details

Defined in Perform.Transport


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

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

Show Stop # 
Instance details

Defined in Perform.Transport


showsPrec :: Int -> Stop -> ShowS #

show :: Stop -> String #

showList :: [Stop] -> ShowS #