mux2

SpecialNodes mux2

parameter ports:
Name Type Description Optional

case0

?0

case selector for out0

yes

case1

?0

case selector for out1

yes

…​

case N-1

?0

case selector for out N-1

yes

input ports:
Name Type Description Optional

selector

?0

selector for the current output

no

in0

?1

input selected when case0 is matched

yes

in1

?1

input selected when case1 is matched

yes

…​

inN-1

?1

input selected when case_N-1_ is matched

yes

output ports:
Name Type Description Optional

output

?1

the selected input is routed here

no

mux2 has the same behavior as a choose, but all of its input ports are triggered. In other words, the selector value is used to select an input to read. This differs from mux, which also has all triggered input ports, but reads all of them every time it is fired. mux2 functions correctly only when it is fed data from a demux2, which primes the inputs of the mux2 with data when the circuit is initialized, prior to firing any of the nodes. This behavior is useful in certain kinds of real-time DSP circuits where the selector value must be switched at the sample rate while signals are passing through the demux / mux structure. It is important to note that the selector input runs latency sample periods behind the data inputs and outputs, where latency is the value of the latency input to the opening demux2.. This makes this node utterly unsuitable for use other than in certain realtime DSP scenarios.

Not recommended for use in AWS applications.