Help with a hardware controlled switch object


#1

I have been successful adding modulation inlets to several objects, however I am stuck on what is probably super simple, I want to add an inlet to phi/switch/1f to control it via a momentary hardware switch. So, pushing momentary toggles the switch.
Can someone please help me?


#2

In the factory objects under "Logic", there is an object called "toggle", if you connect a momentary switch to this, every time you press the momentary switch (signal goes high), the output of the object toggles on or off. If you prefer the toggle to activate when you release the switch, just use an "Inv" object (also under logic), place it in series before the "toggle" object and the signal goes high and toggles when you release the momentary switch.
You can test this first using the momentary switch object to help see what's happening.
:grin:


#3

Thanks!
Im following, however how do I change the switch parameter to flip?

> <axoObjectPatcherObject id="patch/object" uuid="755f4ae7-dc04-4337-a3dc-a8a6fd35bff8">
>    <sDescription>switch 1 f</sDescription>
>    <author>Philoop</author>
>    <license>BSD</license>
>    <helpPatch>switches.axh</helpPatch>
>    <inlets>
>       <frac32 name="i1" description="input 1"/>
>       <bool32.rising name="trig"/>
>    </inlets>
>    <outlets>
> <frac32 name="o" description="output"/>
>    </outlets>
>    <displays/>
>    <params>
>       <bool32.tgl name="b" description="on" noLabel="true"/>
>    </params>
>    <attribs/>
>    <includes/>
>    <code.krate><![CDATA[outlet_o= (param_b)?inlet_i1:0;]]></code.krate>
> </axoObjectPatcherObject>

#4

how are the switches connected and referenced in an object ?
Do you have an image of the patch ?


#5

Nvm, I got it!
Ok, one last bit and I am totally done with this project...
In TSG/fx/tapedelay
How can I add an inlet to control flutter?
Specifically, in the object, I need to attach an inlet to math/*c so i can control it... but the paramater type is frac.32.u.map.gain
outlet_out= __SMMUL(paramamp,inlet_in)<<1;
This is the big picture:


#6

From your image, you already have the "flutter in" input, or did you add this ??
Generally, in the code, you just swap out the parameter reference for the inlet reference, but if you want something more specific, you should personal message TSG.


#7

Yes, I added that, but is math premulitiplier... Not quite the same... I will message them, thanks