xod/core@0.37.3

License: AGPL-3.0

The very basic nodes of XOD
NodeDescription
act
Pulses when `ACT` is `True` and one of the following happens: the data on `DATA` pin changes, program boot, `ACT` has changed from `False` to `True`. Use this node to convert a boolean value which denotes activity/enableness to discrete update action pulses which appear right at the moments when you should reflect the changes in incoming data.
add
Adds numbers
and
Outputs true if and only if all inputs are true
animation-segment
Animates a number making it run from one boundary to another with the given rate.
animation-unit
Animates a number making it run from 0.0 to 1.0
any
Pulses on output when any input recieves a pulse
branch
Routes an incoming pulse to either of outputs depending on condition
buffer
Permanently holds a single value
boot
Outputs a single pulse when the program starts
clock
Outputs pulses at regular intervals
concat
Concatenates (adds together) strings
constant-boolean
A predefined `true` or `false` value that never changes in runtime
constant-number
A predefined numeric value that never changes in runtime
constant-byte
A predefined single byte datum that never changes in runtime
constant-port
A hardware port value
continuously
Continuously outputs pulses
constant-string
A predefined text string that never changes in runtime. Non-ASCII characters are encoded in UTF-8.
continuously-pausable
Continuously outputs pulses, can be paused
count
Stores a number which gets incremented on each `INC` pulse.
debounce
Debounces a value. The `OUT` value would change only after a period of at least `Ts` seconds while which the input state `ST` has not changed.
debounce(boolean)
Debounces a boolean value. The `OUT` value would change only after a period of at least `Ts` seconds while which the input state `ST` has not changed. The node is useful to fight signal bouncing of mechanical switches.
defer(boolean)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
debounce(number)
Debounces a number value. The `OUT` value would change only after a period of at least `Ts` seconds while which the input state `ST` has not changed.
defer(byte)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer(number)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer(string)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer(pulse)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
delta
Calculates difference between current and past input values.
delay
Delays triggering of an incoming pulse by specified time
delta-time
Outputs time difference between the current and previous updates.
divide
Divides two numbers
duty-to-time
Converts total time and duty cycle values into absolute on/off time values
equal
Outputs true if `IN1` = `IN2`, and false otherwise
equal(boolean)
Outputs true if `IN1` = `IN2`, and false otherwise
equal(byte)
Outputs true if `IN1` = `IN2`, and false otherwise
equal(number)
Outputs true if `IN1` = `IN2`, and false otherwise
equal(string)
Outputs true if `IN1` = `IN2`, and false otherwise
error
Raises an error when the `ERR` input pin receives the `True` value. Otherwise, the node passes the value from the `IN` pin to the `OUT` pin.
error(pulse)
Raises an error when the `ERR` input pin receives the `True` value. Otherwise, it fires the pulse on the `OUT` pin when the `IN` pin receives a pulse.
fade
Lineary animates an internal value toward target value `TARG` with a rate `RATE`. Use the node to smoothen LED switching, motor starting, or servo angular position update.
flip-n-times
Generates `N` switches of output boolean signal. Useful to flash/blink/flip/switch something for several times in a row.
flip-flop
Permanently holds either 0 or 1
format-progress
Outputs one of “...”, “OK”, “ERR” depending on the pulse which came last. Useful for demonstrating progress of a long-running process.
gate(boolean)
Allows values to pass through only if EN pin is set to true
gate
Allows values to pass through only if EN pin is set to true
gate(byte)
Allows values to pass through only if EN pin is set to true
format-number
Transforms a number into a string with specified precision
gate(string)
Allows values to pass through only if EN pin is set to true
gate(pulse)
Allows values to pass through only if EN pin is set to true
gate(number)
Allows values to pass through only if EN pin is set to true
greater
Outputs true if `IN1` > `IN2`, and false otherwise
has-error
Outputs `True` while the upstream node is in the error state.
if-else
Outputs either input value depending on condition
if-error
Outputs value from IN if it does not carry an error. Otherwise, defaults to value from DEF
integrate-dt
Integrates input value over time
join
Joins multiple strings together inserting a delimiter between each pair. Useful for separating string parts with spaces and building CSV lines.
length(string)
Calculates string size in bytes. Will be inequal to the number of glyphs if the input string is UTF-8 encoded and contains non-ASCII characters.
modulo
Computes the remainder of `IN1` divided by `IN2`.
if-error(pulse)
Passes pulse from IN to OUT if it does not carry an error. Otherwise, pulses on error if the DEF pin received a pulse.
nand
Outputs false if and only if all inputs are true
multiply
Multiplies numbers
nor
Outputs true if and only if all inputs are false
not
Inverses a boolean value
nth-input
Selects either `X0` or `X1` based on `IDX` index value.
nth-input(string)
Selects either `X0` or `X1` based on `IDX` index value.
less
Outputs true if `IN1` < `IN2`, and false otherwise
nth-input(number)
Selects either `X0` or `X1` based on `IDX` index value.
overrun
Delays changes of the `EN` value from true to false by the specified time. Switching `EN` from false to true acts instantly.
pad-with-zeroes
Transforms a number into a string and adds zeroes to the beginning of the string until it is W-sized. Ignores a fractional part of the value and a sign. If the width of a string for a number is greater than the specified W value, node produces a string with the untransformed number
pid-controller
A proportional–integral–derivative controller. Computes fuzzy output value based on an actual current input value and the desired value.
or
Outputs false if and only if all inputs are false
pulse-on-change(boolean)
Emits a pulse every time input value changes.
pulse-on-change
Emits a pulse every time input value changes.
pulse-on-change(byte)
Emits a pulse every time input value changes.
pulse-on-change(number)
Emits a pulse every time input value changes.
pulse-on-error
Fires a pulse when the upstream node enters the error state.
pulse-on-false
Emits a pulse on a falling edge, i.e. when true changes to false. Does not pulse on program start even if initial input value is false.
pulse-on-true
Emits a pulse on a rising edge, i.e. when false changes to true. Does not pulse on program start even if initial input value is true.
pulse-on-change(string)
Emits a pulse every time input value changes.
select
Outputs `X𝑛` value based on which `S𝑛` pulse came last. By default outputs the value of the latest `X𝑛` input.
spread-error
If at least one of the inputs has an error the node raises an error on all outputs. If there are no errors the node passes input values through without changes.
switch-case
Outputs Yn value when the corresponding Xn equals IN. If IN is not found among Xns, outputs DEF.
subtract
Subtracts two numbers
system-time
Outputs time spent since the program start
to-percent
Transforms a number to percent string. For example, 0.42 to “42%”
time-to-duty
Converts two absolute time values representing on and off time to a total duration and duty cycle values
throttle
Throttles input changes to happen no more often than once per interval specified. Useful to limit the rate of updates.
timer
A simple timer/stopwatch
wait-all-once
Passes pulse only once when all `IN` pins received a pulse.
wait-all
Passes pulses through only when all `IN` pins received a pulse.
xor
Outputs true if and only if just one of inputs has true value