Safe Haskell | Safe-Inferred |
---|
Synopsis
- cmd_val_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status
- cmd_tempo_val_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status
- cmd_method_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status
- val_edit_at :: Cmd.M m => EditUtil.Pos -> Signal.Y -> m ()
- modify_val :: (Signal.Y -> Signal.Y) -> Text -> Maybe Text
- data Partial = Partial {}
- parse :: Text -> Partial
- unparse :: Partial -> Text
- parse_general :: (Text -> Text -> [Text] -> (Text, Text, [Text])) -> Text -> Partial
- unparse_general :: (Text -> Text -> [Text] -> [Text]) -> Partial -> Text
Documentation
cmd_val_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
Accept keystrokes and modify the val field of the event. Also accept
InputNote.NoteOn
or InputNote.Control
msgs and enter a value based on
their velocity or value, respectively. So you can use a MIDI knob to set
arbitrary control values.
Since control vals are typically normalized between 0 and 1, this accepts
hexadecimal higits and modifies the event text with modify_hex
. However,
not all tracks are normalized, so this only happens if infer_normalized
thinks that it's normalized.
The '
key will enter a '
call, which repeats the last value. This is
useful to extend a constant pitch value to the desired breakpoint.
cmd_tempo_val_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
Editing a tempo track is just like editing a normal control track, except that it doesn't do the hex entry thing.
cmd_method_edit :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
edit
val_edit_at :: Cmd.M m => EditUtil.Pos -> Signal.Y -> m () Source #
Try to figure out where the note part is in event text and modify that with the given function.
If the val was hex, keep it hex.
Partial
Partially-parse event text into method, val, and args. Method is actually
the call, val is the first argument to the calll, and args are the
remaining arguments. Control calls have a convention where the first
argument is the value to set. I separate it out so I can replace just that
value while leaving any arguments intact. E.g., exponential interpolation
might look like e 0 3
, where 0 is the destination and 3 is the exponent.
Or e (4c) 3
in the case of pitches. If I press a MIDI key I want to
replace just the 4c
.
The "method" terminology dates from back before calls existed. Nowadays
it's just a call, but for that matter so are numeric literals, so I need
something to differentiate 1
from i 1
.