BoolStateArray Op

BoolStateArray

Array filled with 0, only one can be 1


<p>Outputs an array where only one element is <code>1</code>, the other elements are <code>0</code>. By changing the <code>Active Index</code> port you can decide which of the elements is the <code>1</code>.</p> <p>E.g.:<br><code>Active Index</code> is <code>2</code>: <code>[0, 0, 1, 0, 0, 0, 0, 0, 0, 0]</code></p> <p>you can also set the inactive value and active value to change the <code>0</code> and <code>1</code> to something else like <code>9.5</code> and <code>0.1</code></p>


Full Name
  • Ops.Array.BoolStateArray
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


INPUT PORTS


Array Length (Number)

<p>How long the array should be</p>

Active Index (Number)

<p>Which element is the <code>1</code></p>

Inactive Value (Number)

<p>Zeroes are set to this number</p>

Active Value (Number)

<p>Ones are set to this number</p>

OUTPUT PORTS


State Array (Array)

<p>The array containing elements with <code>0</code>, and one element with <code>1</code></p>


Patches using BoolStateArray

  • Examples
  • Public
  • My Patches

Changelog


Ops.Array.ExclusiveBoolStateArray renamed to Ops.Array.BoolStateArrayuser avatarpandur - 2019-06-13 10:45