Safe Haskell | Safe-Inferred |
---|
Simple Events are supposed to be easy to read, and easy to serialize to text and load back again. Functions here convert them to and from text form, stashing converted simple blocks in the clipboard.
Synopsis
- type State = (Text, Allocations, [Block])
- type Block = (Text, Text, [Maybe Track], [Skeleton.Edge])
- type Track = (Text, Text, [Event])
- type Event = (Double, Double, Text)
- type ScoreEvent = (Double, Double, String, Maybe Pitch.NoteNumber)
- type PerfEvent = (String, Double, Double, Pitch.NoteNumber)
- type Allocations = [(Instrument, (Qualified, Allocation))]
- type Instrument = Text
- type Qualified = Text
- type WriteDevice = Text
- data Allocation
- = Midi [(WriteDevice, Midi.Channel)]
- | Dummy
- | Im
- | Sc
- from_score :: ScoreTime.ScoreTime -> Double
- from_real :: RealTime.RealTime -> Double
- event :: Event.Event -> Event
- score_event :: Score.Event -> ScoreEvent
- perf_event :: Midi.Types.Event -> PerfEvent
- dump_state :: Ui.M m => m State
- load_state :: Ui.M m => State -> m Ui.State
- dump_block :: Ui.M m => Id.BlockId -> m Block
- load_block :: Cmd.M m => Block -> m Ui.State
- read_block :: FilePath -> Cmd.CmdT IO Ui.State
- make_block :: Ui.M m => Block -> m Id.BlockId
- dump_tracklike :: Ui.M m => Block.TracklikeId -> m (Maybe Track)
- load_tracklike :: Ui.M m => Maybe Track -> m Block.Track
- dump_track :: Ui.M m => Id.TrackId -> m Track
- simplify_track :: Id.TrackId -> Track.Track -> Track
- load_track :: Ui.M m => Track -> m Block.Track
- load_event :: Event -> Event.Event
- dump_selection :: Cmd.CmdL [(Id.TrackId, [Event])]
- dump_allocations :: UiConfig.Allocations -> Allocations
- allocations :: Allocations -> UiConfig.Allocations
- allocation :: (Instrument, (Qualified, Allocation)) -> (ScoreT.Instrument, UiConfig.Allocation)
- type ExactPerfEvent = (Text, RealTime.RealTime, RealTime.RealTime, [(Text, [(RealTime.RealTime, Signal.Y)])], [(RealTime.RealTime, Signal.Y)], (Signal.Y, Signal.Y), Stack.Stack)
- dump_exact_perf_event :: Midi.Types.Event -> ExactPerfEvent
- load_exact_perf_event :: (InstT.Qualified -> Maybe Midi.Types.Patch) -> ExactPerfEvent -> Maybe Midi.Types.Event
- control_map :: [(Text, [(RealTime.RealTime, Signal.Y)])] -> Map ScoreT.Control MSignal.Signal
Documentation
type State = (Text, Allocations, [Block]) Source #
Dump a score, or part of a score, to paste into a test. (global_transform, allocations, blocks)
type Block = (Text, Text, [Maybe Track], [Skeleton.Edge]) Source #
(id_name, title, tracks, skeleton)
type ScoreEvent = (Double, Double, String, Maybe Pitch.NoteNumber) Source #
(start, duration, text, initial_nn)
type PerfEvent = (String, Double, Double, Pitch.NoteNumber) Source #
(inst, start, duration, initial_nn)
type Allocations = [(Instrument, (Qualified, Allocation))] Source #
(instrument, (qualified, [(device, chan)]))
[] chans means it's UiConfig.Dummy.
This doesn't include Patch.config_settings
, so it's assumed they're the
same as Patch.patch_defaults
.
type Instrument = Text Source #
type WriteDevice = Text Source #
data Allocation Source #
Midi [(WriteDevice, Midi.Channel)] | |
Dummy | |
Im | |
Sc |
Instances
Show Allocation Source # | |
Defined in Cmd.Simple showsPrec :: Int -> Allocation -> ShowS # show :: Allocation -> String # showList :: [Allocation] -> ShowS # | |
Eq Allocation Source # | |
Defined in Cmd.Simple (==) :: Allocation -> Allocation -> Bool # (/=) :: Allocation -> Allocation -> Bool # | |
Pretty.Pretty Allocation Source # | |
Defined in Cmd.Simple pretty :: Allocation -> Text Source # format :: Allocation -> Doc Source # formatList :: [Allocation] -> Doc Source # |
from_real :: RealTime.RealTime -> Double Source #
event :: Event.Event -> Event Source #
score_event :: Score.Event -> ScoreEvent Source #
state
dump_state :: Ui.M m => m State Source #
block
dump_block :: Ui.M m => Id.BlockId -> m Block Source #
make_block :: Ui.M m => Block -> m Id.BlockId Source #
dump_tracklike :: Ui.M m => Block.TracklikeId -> m (Maybe Track) Source #
load_tracklike :: Ui.M m => Maybe Track -> m Block.Track Source #
track
dump_track :: Ui.M m => Id.TrackId -> m Track Source #
simplify_track :: Id.TrackId -> Track.Track -> Track Source #
load_track :: Ui.M m => Track -> m Block.Track Source #
load_event :: Event -> Event.Event Source #
dump_selection :: Cmd.CmdL [(Id.TrackId, [Event])] Source #
allocations
allocation :: (Instrument, (Qualified, Allocation)) -> (ScoreT.Instrument, UiConfig.Allocation) Source #
ExactPerfEvent
type ExactPerfEvent = (Text, RealTime.RealTime, RealTime.RealTime, [(Text, [(RealTime.RealTime, Signal.Y)])], [(RealTime.RealTime, Signal.Y)], (Signal.Y, Signal.Y), Stack.Stack) Source #
Like PerfEvent
, but is meant to recreate a Midi.Types.Event
exactly.
load_exact_perf_event :: (InstT.Qualified -> Maybe Midi.Types.Patch) -> ExactPerfEvent -> Maybe Midi.Types.Event Source #
control_map :: [(Text, [(RealTime.RealTime, Signal.Y)])] -> Map ScoreT.Control MSignal.Signal Source #