This page covers:
- What is a graph variable?
- How to edit graphs
- How graph variables function on a technical level
What is a graph variable?
It's one of these!
A graph variable is a setting that changes based on some other factor, such as Brightness by velocity. This means the output brightness changes based on the incoming velocity, allowing dynamic response and deeper visualisation.
Sometimes it can be a little difficult to spot graph variables, as any graph variable can operate as a flat slider where it only outputs a static value regardless of the input factor and thus does not visually look like a graph. Many settings are set to be flat values by default, obscuring the fact that they can operate in graph mode. Any variable title with these icons in the top right corner can operate in either flat or graph mode:
How to edit graphs
The first step to editing a graph variable is deciding whether you want a flat or graph value using the mode icons in the top right.
Dragging
When using graph mode, the handles can be click-and-dragged to adjust both Start / Min
and Stop / Max
values at the same time.
Alt modifier (smooth dragging)
While dragging, holding the Alt
key will disable value snapping while held. This can be useful for fine adjustment or getting values very close together. This modifier key also works on flat value sliders not capable of graph mode.
Shift modifier (proportional editing)
While dragging, holding the Shift
key will proportionally edit the other handle, snapped to the opposing corner (so, Shift
-dragging right handle will "pin" the graph to the bottom left corner). This can be useful for keeping the same ratio of response in a variable while changing its amplitude.
Ctrl modifier (graph panning)
While dragging, holding the Ctrl
key will translate the graph inside the bounds. This is rarely useful, but is included here for completeness.
Editing values directly
All values can also be edited directly by simply typing in a number. This will also automatically adjust graph bounds (if possible) to fit the new value.
Graph bounds
Many variables can be set to values far outside of the typical graph bounds. When available, this is indicated by the small -
+
buttons next to the Y-axis bounds.
Graph bounds can be edited directly by typing in a number, or indirectly by simply entering a number for Min / Max
that is outside the current graph range. When graph bounds are increased to have a range greater than the original range, snapping increments are also increased.
Copy / paste / reset
The small icon in the upper right corner can be used to reset the graph if necessary. Some default values on some variables may not be suitable for all presets though, so do not assume the default value is necessarily the best one.
By clicking on the title of a variable (both graph or flat value slider) and then pressing Ctrl+C
, the variable can be copied. Hovering over another graph or slider and pressing Ctrl+V
will paste the copied value (if possible).
How graph variables function
The following is a technical breakdown of how values are actually produced. This is somewhat obvious from the visual graph, so this section is optional extra reading.
How a value is output
Graph variables have eight internal values:
Mode | "Flat" or "Graph"
|
Start | 0.00 to 1.00 X-axis position of left handle
Stop | 0.00 to 1.00 X-axis position of right handle
|
Min | Y-axis value of left handle
Max | Y-axis value of right handle
|
Curve | -1.0 to 1.0, used to generate graph curvature
|
GraphMin | Graph region Y-axis lower bound (only relevant to UI)
GraphMax | Graph region Y-axis upper bound (only relevant to UI)
When a graph variable is used in Keysight, the very first thing it does is check whether the graph variable is in graph or flat Mode
. If it is in flat Mode
, the Max
value is output immediately.
If it is in graph Mode
, the variable is then provided with an input factor between 0.00 - 1.00
. The graph is then sampled at the given input factor location, and outputs a final value somewhere between Min
and Max
.
Info
The most common input factor is derived from the linked note-on event velocity(*), which is normalised from 0 - 127
to 0.00 - 1.00
by the given simulation's MIDI floor and ceiling clamps.(*)
Input factors are always measured as 0.00 - 1.00
; in any situation where the factor is coming from another dynamic value (such as "Lifetime" on particles), the factor is a proportion of the governing value. So 5.0
seconds into a 10.0
second lifetime Pulse will provide a 0.5
input factor to "Brightness by lifetime".*
How clamping and curvature works
Any incoming input factors below Start
will be clamped to the Min
value, and any above Stop
will be clamped to the Max
value.
The space between Start
and Stop
is where the Curve
value is used.
- At
0.00
as shown above, the intervening space is a straight line (linear interpolation) - At
-1.00
, value is "slow in, fast out" and traces a quarter circle - At
1.00
, value is "fast in, slow out" and traces a quarter circle - Intervening values linearly interpolate between lines traced by
0.00
and+/-1.00
Note
As a bonus for getting this far: behold, this is the actual code used in Keysight to solve graphs! (Open in new tab to zoom in)