defer(buffer1)

awgrover/buffer1/defer(buffer1)

Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer(buffer1)
@/defer(buffer1)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
IN@/buffer1
defer(buffer1)
IN
OUT
OUT@/buffer1
To use the node in your project you should have the awgrover/buffer1 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    if (isInputDirty<input_IN>(ctx)) { // This happens only when all nodes are evaluated
        setTimeout(ctx, 0);
        // This will not have any immediate effect, because
        // deferred nodes are at the very bottom of sorted graph.
        // We do this to just save the value for reemission
        // on deferred-only evaluation.
        emitValue<output_OUT>(ctx, getValue<input_IN>(ctx));
    } else { // deferred-only evaluation pass
        emitValue<output_OUT>(ctx, getValue<output_OUT>(ctx));
    }
}