summaryrefslogtreecommitdiff
path: root/objects/sel b 32 pulse.axo
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2016-09-06 22:13:03 +0200
committerrekado <rekado@elephly.net>2016-09-06 23:31:22 +0200
commit8a4bca986c57062e96f1e58281b3eff52a856ee6 (patch)
tree11b125b567c212739a6585862628f0565f51ce35 /objects/sel b 32 pulse.axo
Initial commit.
Diffstat (limited to 'objects/sel b 32 pulse.axo')
-rw-r--r--objects/sel b 32 pulse.axo29
1 files changed, 29 insertions, 0 deletions
diff --git a/objects/sel b 32 pulse.axo b/objects/sel b 32 pulse.axo
new file mode 100644
index 0000000..33f52f0
--- /dev/null
+++ b/objects/sel b 32 pulse.axo
@@ -0,0 +1,29 @@
+<objdefs>
+ <obj.normal id="sel b 32 pulse" uuid="8ad8a3dea3cedd0c5f731045ab90188e437c1260" sha="42339346cf951f33849d48f4292fa61903ccf4c8">
+ <sDescription>select one out of 32 booleans, chainable. Pulse output.</sDescription>
+ <author>Johannes Taelman</author>
+ <license>BSD</license>
+ <inlets>
+ <int32 name="in" description="in"/>
+ <bool32 name="def" description="default value"/>
+ </inlets>
+ <outlets>
+ <int32 name="chain" description="chain out (in-32)"/>
+ <bool32.pulse name="o" description="output"/>
+ </outlets>
+ <displays/>
+ <params>
+ <bin32 name="b32" noLabel="true"/>
+ </params>
+ <attribs/>
+ <code.declaration><![CDATA[int in_prev;
+]]></code.declaration>
+ <code.init><![CDATA[in_prev = 0;
+]]></code.init>
+ <code.krate><![CDATA[if ((inlet_in>=0)&&(inlet_in<32)) outlet_o=(in_prev!=inlet_in)&&(param_b32&(1<<inlet_in));
+else outlet_o = inlet_def;
+outlet_chain = inlet_in-32;
+in_prev = inlet_in;
+]]></code.krate>
+ </obj.normal>
+</objdefs>