Summing poly gate input to a single channel?

Hey :slight_smile:

Been trying to do something for a few hours and just can’t get it working, so I thought I’d swing it by the community.

I have an incoming gate inside a polyphonic module, using the c/channels setup, which sends the incoming gates to the selected incoming voice:

Gate in 1 > channel 1
Gate in 2 > channel 2
Gate in 3 > channel 3

I am using “inputs[GATE_INPUT].getPolyVoltage(c)” to get the incoming gates.

But I’d like to use the poly gate inputs outside of the c/channels setup, where I would like to set all the incoming gates to same voice/channel. Like this:

Gate in 1 >  > channel 1
Gate in 2 >  > channel 1
Gate in 3 >  > channel 1

Then I should be able to use it outside of the c/channels poly setup and get all the incoming poly trigger on the same voice/channel.

Does anyone have a suggestion to how I can do that?


I can’t tell if I am just being dense, or if you have not described your design clearly, or if you have not properly thought out the expected behavior for all possible inputs.

There is a getVoltageSum() method that sums the voltages across all poly channels into a single value. But I don’t know if that is really what you want.

Suppose channel 0 goes high at t0, then at t1 channel 1 goes high, at t2 channel 0 goes low, at t3 channel 2 goes high, at t4 channel 1 goes low, and finally at t5 channel 2 goes low. Then getVoltageSum() will give you one continuous high gate between t0 and t5, whereas your original inputs had 3 overlapping gates across different channels at different times. Maybe that is what you want, maybe not.


That did the trick.

I didn’t know about that getVoltageSum feature. Always nice to learn something new :wink:

Thank you very much!