Safe Haskell | Safe-Inferred |
---|
Define a few inhabitants of Environ which are used by the built-in set of
calls. Expected types are in hardcoded_types
.
Synopsis
- type Key = Text
- args :: Key
- attributes :: Key
- block_end :: Key
- control :: Key
- instrument :: Key
- key :: Key
- note_end :: Key
- note_start :: Key
- merge :: Key
- scale :: Key
- seed :: Key
- srate :: Key
- tempo :: Key
- track_voice :: Key
- suppress_until :: Key
- dynamic_val :: Key
- release_val :: Key
- attack_val :: Key
- start_offset_val :: Key
- control_gt_0 :: Key
- instrument_top :: Key
- instrument_bottom :: Key
- open_strings :: Key
- string :: Key
- tuning :: Key
- voice :: Key
- hand :: Key
- hold :: Key
- element :: Key
- polos :: Text
- sangsih :: Text
Documentation
directly supported by core derivers
VList: arguments for a requires_postproc
call.
Also see make_delayed
.
attributes :: Key Source #
VAttributes: Default set of attrs.
ScoreTime: the block deriver sets it to the ScoreTime end of the block. Blocks always start at zero, but this is the only way for a call to know if an event is at the end of the block.
instrument :: Key Source #
VStr: Instrument in scope.
VStr: Many scales use this for scale-specific configuration.
Some scales conceptually have a separate key and mode, e.g. C minor, in
which case they're combined into key
.
VNum (ScoreTime): End time of the note event. This is set when evaluating note events so that inverted control tracks know when their parent event ends.
note_start :: Key Source #
This is just like note_end
, except, you know, the other end.
VNum: Random seed used by randomization functions. Can be explicitly initialized to capture a certain "random" variation.
This is rounded to an integer, so only integral values make sense.
VNum: Set the default tempo, overriding default_tempo
. This
only applies if there is no toplevel tempo track, and generally only has an
effect if the block is played as a toplevel block since it's a constant
tempo.
Previously I would directly set the tempo warp in the equal call, but tempo setting has to be at the toplevel tempo track for it to interact properly with block call stretching.
track_voice :: Key Source #
VNum: this is the count of the tracks with the same instrument, starting
from 0 on the left. So three tracks named >pno
would be 0, 1, and 2,
respectively. Used with Derive.Call.InferTrackVoice.
internal
suppress_until :: Key Source #
RealTime: suppress other notes until this time, inclusive. Only events
without a suppress-until will be retained. Applied by infer-duration
, see
Derive.Call.Post.Move.
dynamic_val :: Key Source #
VNum: This is a bit of a hack for the dynamic to velocity conversion in Perform.Midi.Convert. The default note deriver stashes the control function output here so it can use it for note on velocity. Otherwise I couldn't use ControlFunctions (e.g. randomization) for note on velocity because control functions don't exist after MIDI conversion.
Details in NOTE [EnvKey.dynamic_val].
release_val :: Key Source #
Like dynamic_val
, but for the release velocity. Set from
release_velocity
.
attack_val :: Key Source #
VNum: Set from attack_velocity
in the same way as
release_val
.
control_gt_0 :: Key Source #
Bool: Control tracks normally range from 0 to 1, or -1 to 1. This is set for control tracks which range >0. That's just the tempo track for now.
supported by not so core derivers
instrument_top :: Key Source #
VNotePitch or VNum (NN): The top of the instrument's range.
It's a VNotePitch for instruments that are tied to a particular family of scales, and have an upper note that is independent of any particular frequency. For instance, a kantilan's top note will have a different NoteNumber depending on its scale, or even within a single scale, depending if it is pengumbang or pengisep.
For instruments with less complicated scale requirements, NoteNumber is simpler.
open_strings :: Key Source #
List VPitch: tuning of open strings for this instrument. The pitches should be probably absolute NNs, not in any scale, so they work regardless of which scale you happen to be in.
TODO maybe it should be VNotePitch as with instrument_top
?
VPitch: Select a string to play on. Presumably it should be from one of
the open_strings
. TODO currently I address strings by pitch. It's
convenient because general purpose string calls work with pitches, but
will be ambiguous for instruments where multiple strings have the same
pitch.
VStr: Kind of tuning for the scale in scope. The meaning is dependent on the scale, e.g. ngumbang ngisep for Balinese scales.
VNum: Separate notes into different voices. This is used by integrate to put them on their own tracks, and by the lilypond backend to split them into their own voices. Should be an integer from 1 to 4.
VStr: right
, r
, left
, or l
. Used by the lilypond backend, and
also by any call that relies on an instrument's parts being divided by hand.