Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Cmd.Msg

Contents

Synopsis

Documentation

data Msg Source #

Constructors

Ui UiMsg.UiMsg

Message from the UI.

Midi Midi.ReadMessage

Incoming midi message.

InputNote InputNote.Input

Incoming abstract note. This is meant to enter a note and is not a MIDI NoteOn, though NoteOns may very well be translated into these. These are not generated from any subsystem, but instead translated from other msgs (such as Midi).

Transport Transport.Status

Message from the transport/play thread.

DeriveStatus Id.BlockId DeriveStatus

Message about the derivation status, from the background derivation threads.

Socket Handle ReplProtocol.Query

Message from the REPL socket, includes the socket handle than can be used to write a response. Whoever responds to it should close the handle.

Instances

Instances details
Show Msg # 
Instance details

Defined in Cmd.Msg

Methods

showsPrec :: Int -> Msg -> ShowS #

show :: Msg -> String #

showList :: [Msg] -> ShowS #

Pretty.Pretty Msg # 
Instance details

Defined in Cmd.Msg

data DeriveStatus Source #

Constructors

OutOfDate

The current derivation is out of date, but work has not yet started on a replacement. The new Performance is already in state_current_performance but not in state_performance yet.

Deriving 
DeriveComplete !Performance !ImStarted 
ImStatus !Id.BlockId !(Set Id.TrackId) !ImStatus 

Instances

Instances details
Show DeriveStatus # 
Instance details

Defined in Cmd.Msg

Pretty.Pretty DeriveStatus # 
Instance details

Defined in Cmd.Msg

data ImStarted Source #

Constructors

ImStarted

im subprocess in progress

ImUnnecessary

no im notes, so no subprocesses started

Instances

Instances details
Show ImStarted # 
Instance details

Defined in Cmd.Msg

data ImStatus Source #

Constructors

ImRenderingRange !RealTime !RealTime

start--end currently being rendered.

ImWaveformsCompleted ![Track.WaveformChunk]

Waveforms written for these chunks.

ImComplete !Bool

True if the im subprocess had a failure. The error will have been logged, and this flag will leave a visual indicator on the track that something went wrong.

Instances

Instances details
Show ImStatus # 
Instance details

Defined in Cmd.Msg

Pretty.Pretty ImStatus # 
Instance details

Defined in Cmd.Msg

data Performance Source #

This holds the final performance for a given block. It is used to actually play music, and poked and prodded in a separate thread to control its evaluation.

This is basically the same as Result. I could make them be the same, but Performance wasn't always the same and may not be the same in the future.

Unlike other records, the fields here are all lazy. This is because I need to put an unevaluated Performance into Cmd.state_current_performances, and then force the fields in a separate thread. Also I need to modify perf_damage without forcing any of the others.

Constructors

Performance 

Fields

Instances

Instances details
Show Performance # 
Instance details

Defined in Cmd.Msg

Pretty.Pretty Performance # 
Instance details

Defined in Cmd.Msg

force_performance :: Performance -> () Source #

Force a Performance so that it can be used without a lag.

views

text :: Msg -> Maybe (Key.Key, Maybe Char) Source #

The text that this keydown wants to enter, if any.

keycap :: Msg -> Maybe (UiMsg.KbdState, Char) Source #

A key action by keycap. This is different from text because it should be just the keycap, not taking shift or alt or anything into account.

char :: Msg -> Maybe (UiMsg.KbdState, Char) Source #

This is like keycap, but it takes shift into account. This is because it's convenient to bind to a single Char including shifted, and not have to pass around a ([Key.Modifier], Char) or (Bool, Char).