Dynamic voice allocation for variable-size MC chords

Luca Schwarz's icon

Hi everyone,

I’m trying to figure out the best way to handle dynamic voice allocation with MC signals, and I’m wondering if mc.voiceallocator (or another MC object) can solve this.

My setup is roughly this:

I’m using mc.chord to store and recall different chords/sets of notes. The number of notes is not fixed — sometimes the chord contains only one note, sometimes two or three, and sometimes it can contain 8 or more notes.

I would then like to send these notes to a bank of oscillators, for example something like:

mc.cycle~ with 30 channels

The problem is that I don't want all 30 MC channels to be active/processed when the current chord only contains, say, 2 notes.

Ideally, I would like some kind of dynamic voice allocation where:

  • If the current chord contains 1 note → 1 oscillator voice is active

  • 2 notes → 2 voices

  • 3 notes → 3 voices

  • 8 notes → 8 voices

  • etc.

The voices should also be allocated/released properly, including the release/tail time of a voice. So if a note ends, its voice should become available again rather than simply having a fixed number of continuously active MC channels.

My initial thought was to use mc.voiceallocator, but I'm not quite sure how to structure the signal flow for this.

For example, would it be possible to have a fixed pool such as:

mc.cycle~ @chans 30

and then dynamically allocate only the number of voices actually required by the current mc.chord?

How can I dynamically map a variable number of notes from mc.chord to a pool of MC voices without processing unnecessary voices?

A little help patch would be deeply appreciated.

Thanks!