Safe Haskell | Safe-Inferred |
---|
Functions to do with performance. This is split off from Cmd.Play, which contains play Cmds and their direct support.
Synopsis
- initial_environ :: DeriveT.Environ
- cached_derive :: Cmd.M m => BlockId -> m Result
- uncached_derive :: Cmd.M m => BlockId -> m Result
- derive_block :: Cmd.M m => Cache -> ScoreDamage -> BlockId -> m Result
- run :: Cmd.M m => Cache -> ScoreDamage -> Deriver a -> m (RunResult a)
- eval_with_dynamic :: Cmd.M m => Dynamic -> Deriver a -> m a
- run_with_constant :: Constant -> Dynamic -> Deriver a -> RunResult a
- is_score_damage_log :: Log.Msg -> Bool
- get_constant :: Cmd.M m => Ui.State -> Cache -> ScoreDamage -> m (Constant, InstrumentAliases)
- initial_constant :: Ui.State -> Cmd.Config -> Builtins -> Cache -> ScoreDamage -> Constant
- initial_dynamic :: InstrumentAliases -> Dynamic
- perform_from :: Cmd.M m => RealTime.RealTime -> Vector.Vector Score.Event -> m (Perform.MidiEvents, Sc.Note.Notes)
- perform_raw :: Cmd.M m => [Score.Event] -> m Perform.MidiEvents
- shift_midi :: RealTime.RealTime -> RealTime.RealTime -> Perform.MidiEvents -> Perform.MidiEvents
- first_time :: [LEvent.LEvent Midi.WriteMessage] -> RealTime.RealTime
- events_from :: Set ScoreT.Instrument -> RealTime.RealTime -> Vector.Vector Score.Event -> ([Score.Event], Vector.Vector Score.Event)
- overlapping_events :: RealTime.RealTime -> Vector.Vector Score.Event -> [Score.Event]
- make_midi_lookup :: (ScoreT.Instrument -> Maybe Cmd.ResolvedInstrument) -> Convert.MidiLookup
- midi_configs :: UiConfig.Allocations -> Map ScoreT.Instrument Patch.Config
- get_muted_tracks :: Ui.M m => m (Set TrackId)
- muted_instruments :: UiConfig.Allocations -> Set ScoreT.Instrument
Documentation
initial_environ :: DeriveT.Environ Source #
There are a few environ values that almost everything relies on.
derive_block :: Cmd.M m => Cache -> ScoreDamage -> BlockId -> m Result Source #
Derive the contents of the given block to score events.
eval_with_dynamic :: Cmd.M m => Dynamic -> Deriver a -> m a Source #
run_with_dynamic
but extract just the value.
is_score_damage_log :: Log.Msg -> Bool Source #
get_constant :: Cmd.M m => Ui.State -> Cache -> ScoreDamage -> m (Constant, InstrumentAliases) Source #
Create deriver configuration. This is the main place where Cmd level configuration is adapted to the deriver.
initial_constant :: Ui.State -> Cmd.Config -> Builtins -> Cache -> ScoreDamage -> Constant Source #
perform
perform_from :: Cmd.M m => RealTime.RealTime -> Vector.Vector Score.Event -> m (Perform.MidiEvents, Sc.Note.Notes) Source #
perform_raw :: Cmd.M m => [Score.Event] -> m Perform.MidiEvents Source #
Perform midi only, from time 0, without mutes.
shift_midi :: RealTime.RealTime -> RealTime.RealTime -> Perform.MidiEvents -> Perform.MidiEvents Source #
first_time :: [LEvent.LEvent Midi.WriteMessage] -> RealTime.RealTime Source #
The first timestamp from the msgs.
:: Set ScoreT.Instrument | scan back for starts of these |
-> RealTime.RealTime | |
-> Vector.Vector Score.Event | |
-> ([Score.Event], Vector.Vector Score.Event) | (extra events before start, events from start) |
As a special case, a start <= 0 will get all events, including negative ones. This is so notes pushed before 0 won't be clipped on a play from 0.
overlapping_events :: RealTime.RealTime -> Vector.Vector Score.Event -> [Score.Event] Source #
How to know how far back to go? Impossible to know! Well, I could look up overlapping ui events, then map the earliest time to RealTime, and start searching there. But for now scanning from the beginning should be fast enough.
make_midi_lookup :: (ScoreT.Instrument -> Maybe Cmd.ResolvedInstrument) -> Convert.MidiLookup Source #