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

Cmd.ControlTrack

Contents

Synopsis

# Documentation

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.

Editing a tempo track is just like editing a normal control track, except that it doesn't do the hex entry thing.

# edit

Arguments

 :: (Signal.Y -> Signal.Y) -> Text -> Maybe Text Nothing if I couldn't parse out a VNum.

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

data Partial Source #

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.

Constructors

 Partial Fields_transform :: [[Text]] _method :: Text _val :: Text _args :: [Text] _comment :: Text

#### Instances

Instances details
 # Instance detailsDefined in Cmd.ControlTrack Methods(==) :: Partial -> Partial -> Bool #(/=) :: Partial -> Partial -> Bool # # Instance detailsDefined in Cmd.ControlTrack MethodsshowList :: [Partial] -> ShowS #

Try to figure out the call part of the expression and split it from the rest.

I use a trailing space to tell the difference between a method and a val.

parse_general :: (Text -> Text -> [Text] -> (Text, Text, [Text])) -> Text -> Partial Source #