Question: differentiate Mono or Poly signal in & act on it

I work on an extension of 23Volts “N1” that takes 8 Polyphonic inputs and Sequences through their channels in parallel - its easy & finished & works. Just: I want to get rid of the ‘parallel’.

Question A: I have 5 (Reset, Step Increase, Decrease, Random, CV) Inputs that should detect if the incoming Signal is Mono or Poly. Usually I’d do: if(input[].getChannels() <= 1) and define a bool (poly true/false). But is there a more compact way to go about it?

Because that leaves me with

Question B: All these Inputs are tied to IF statements ( if(isConnected, process.trigger(inputs[].getVoltage ) that progress the Sequence. ( { step++ } etc.). I don’t know how to make this poly-friendly without adding a shit-ton of code.

if (increaseConnected && stepIncreaseTrigger.process(inputs[INinc].getVoltage()))
                if (step[c] >= chnr)
                    step[c] = 0;

Is there an easy way to getChannel of the Trigger.process(inputs… part and implement it in a way that does not interfere with the current Mono solution? Then “step” works on all channels - what’s the best way to add Poly Sequencing?

if(poly == false)step++; else if(poly==true){ for(…) {count(i)++}}; ???

There are up to 8 Sequences. I’m sure there’s an easy way. When Mono in, declare one counter that steps through all Sequences. When Poly in & on Poly Channel get Trigger, declare eight counters & each progress only the Sequence corresponding to the Triggers channel.

I do it the dumb, lazy way. All my logic that involved processing the number of channels I only do every 16 (or 32) process calls. It can’t possibly make a difference how fast you can react to re-patching…

1 Like

dont ask the question is it poly. just for loop based on number of channels, be that 1 or 8 or . . . .

yeah but that is in direct conflict with the sequence progression.

  • I’ll wait a bit longer if someone else knows what I mean and how to do it… or I’ll re-think the whole sequencing method

You don’t like my suggestion? I’ve done it in several modules that work very well, and use very little CPU.