Maybe dumb question on Polyphony Development


I’m writing some modules and would like to implement polyphony. Using the dev sdk from the weekend and the matching runtime on my mac.

My question is: How do I generate a polyphonic signal? I did the simplest thing of hooking gate from the standard MIDI plugin to my input and getChannels() returns 1 even when I press 2 keys. Seems the MIDI input adapter isn’t polyphonic yet, or I’m missing something really really basic.

So for folks out there making their envelopes and oscillators polyphonic today, how do you generate polyphonic input signals? I see things like Fundamental/VCA already support poly so there must be a way I"m just missing. I think?


This post might help, not sure:

Thank you; yes I had read that. I had a more pedestrian question which is “I have done that in my module, how do I send it a polyphonic gate input?”

Like ‘what’s a good graph look like if I have a polphonic envelope generator attached to the (now) polyphonic fundamental/vca’ type thing.

Appreciate you taking the time to answer!

If you are asking where you can get a poly signal to route into your module.

The v1 fundamental plugin has a merge module which can merge 2 or more mono signals to a poly.

1 Like

Great thank you! That answers my question indeed.

Right-click on the MIDI-CV module and choose Polyphony > something higher than 1.

Thank you. That is the really really basic thing I was missing :slight_smile:

I think @Omri_Cohen will make a video entirely on polyphony one day, because poly patches are a bit more advanced than monophonic patches.


Yeah actually I have a less dumb question on polyphony also which is a design one.

Say I have an envelope generator with ADSR and a Gate. Fine. So obviously a polyphonic gate means you can do an envelope per voice. easy peasy.

But how are you suggesting we deal with polyphony on the parameters? Seems there’s three cases

1: Easy case: ADSR have a CV control with width 1; Gate has width N. Just copy at trigger time. Fine
2: Easy case: ADSR and Gate both have width N. Fine makes perfect sense as well.
3: But what if one of the CV inputs on A has a different channel count than the gates. What does that “mean” and how are modules defaulting to dealing with that?

See what I mean? If you’d prefer I can ask this someplace else too.

These are answered in How polyphonic cables will work in Rack v1, but that post is quite long, so here are the direct answers.

One “master” input should define the global channels of your process() function. Typically this is the most significant input, like “audio in” or “gate in” for envelope generators.

  1. Use inputs[GATE_INPUT].getVoltage(c) for the “master” input and inputs[CV_INPUT].getPolyVoltage(c) for secondary inputs.
  2. Same as above.
  3. Same as above. If the CV input is poly, it will return 0 for channels it doesn’t have. If it’s mono, it will return the mono voltage for all c.

Thank you!