For the complete documentation index, see llms.txt. This page is also available as Markdown.

Input values are not all the same layer

input-value-layers.gpc
int raw_cross;
int current_cross;
int previous_cross;

main {
    raw_cross = get_ival(PS5_CROSS);
    current_cross = get_val(PS5_CROSS);
    previous_cross = get_lval(PS5_CROSS);

    set_val(TRACE_1, raw_cross);
    set_val(TRACE_2, current_cross);
    set_val(TRACE_3, previous_cross);
}
Read
Layer
Typical use

get_ival(id)

physical/unmodified input

features that must not feed on earlier script changes

get_val(id)

current value after earlier changes this cycle

composing deliberate transformations

get_lval(id)

final outgoing value from the previous VM iteration

output-history comparison

Use event_press / event_release for ordinary button edges. Use explicit current-versus-previous comparisons when the exact input layer matters.

Last updated