true-to-pulse

awgrover/conversions/true-to-pulse

Convert (each) true into a pulse. Compare with cast-boolean-to-pulse
true-to-pulse
@/true-to-pulse
Convert (each) true into a pulse. Compare with cast-boolean-to-pulse
boolboolean
boolean, or Number (0=false, everything else is true)
true-to-pulse
pulse
bool
pulsepulse
To use the node in your project you should have the awgrover/conversions 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 (getValue<input_bool>(ctx)) {
    emitValue<output_pulse>(ctx, 1);
    }
}