Consolidate Multiple CHOP Execute DATs

I’ve been developing a UI with different controls. Toggles, Momentary buttons, sliders etc. The UI generates different ranges of values to calibrate and control a series of motors. At the moment each UI element’s value is merged and passed in the network to a select CHOP. Currently there is a CHOP Execute DAT for each channel of the merged UI. Individual CHOP Execute DATs per function seems clunky. Although they only cook when activated, it just seems redundant. Is there a way to use a single CHOP Execute DAT and reference the channel name by in python to execute a command only when that CHOP value is updated/off-to-on/etc. ?

A simplified project file is attached.
Multiple CHOP Execute DATs.toe (4.61 KB)

Yes, you can just use the ‘channel’ object that is passed in to the function;

def onOffToOn(channel, sampleIndex, val, prev): if == 'toggle': print(val) return

Thanks Ben!