algorithm for mixing voices from a poly synth

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

How do you mix the different voices of a poly synth? On a mono synth there is just one voice in the range from 0.0 to 1.0 that's simple. But on a poly synth with maybe 16 voices I couldn't just add the voices, cause just with 2 voices the values where greater than 1.0. On the other side if I lower the volume of each voice in the polysynth and I play one voice, this voice would be very silent.

Have you an algorithm that solves this problem?

Post

I think what usually happens is that it can be that the signals are simply added,
and a master volume with possibly a limiter is used to lower the volume to stay under 1
wishing success

Post

Yep, all infos I found says that I should just accumulate the signal values.

Post

This is what VCV Sum does. It unity-sums the polyphonic channels and offers a volume knob for attenuating the result.
2019-08-08-172103_1600x900_scrot.png
If you're looking for the answer to "What gain is best for summing N channels?", it doesn't exist. In the case where all frequencies of the channels are in phase, the amplitude of their sum equals the sum of their amplitudes, so it would sound N times louder. This is the upper bound. In the typical case, all frequencies are uniformly randomly out of phase, so the amplitude of the sum tends toward sqrt(N) assuming the amplitudes of all channels are equal. But most of the time, users won't be holding down all N voices, and you can't predict this behavior, so it's best to just give up and provide the user with a knob.
You do not have the required permissions to view the files attached to this post.
VCV Rack, the Eurorack simulator

Post

..which is useful if terminology is confusing here, eg. if you were making a unison synth that played n# of voices, then it would be prudent to make the *voice* the same amplitude regardless of *oscillator count*

but yes do not modulate amplitude based on # of voices of polyphony are being used... this would aggravate.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

xoxos wrote: Fri Aug 09, 2019 11:13 pm ..which is useful if terminology is confusing here, eg. if you were making a unison synth that played n# of voices, then it would be prudent to make the *voice* the same amplitude regardless of *oscillator count*
Unison (whether it's several oscillators or several full voices in unison) should usually be treated as uncorrelated, so scaling by 1/sqrt(n) gets you constant RMS (which is generally what you want) when varying voice counts.

This is different from playing multiple notes though, which should never be automatically scaled.

For plugins, there's usually no need to worry about peak levels (within reason) beyond having an output gain control anyway. Going somewhat over 0dBfs works fine in basically every DAW (although from the mixing workflow point of view, having individual instruments peak -10dB or even lower usually makes things a lot easier). If you're feeding the DAC directly (eg. standalone or embedded software), then either use a peak-limiter or clipper at the output.

Post

As a user, I do not want automatic level compensation - neither for poly nor for unison. If I increase voicecount, I expect it to become louder.

Absynth is one instrument that does compensation, and I hate that behaviour. Better let the user deal with the levels!
The hole is deeper than the hum of its farts

Post

nah no way people wouldn't put up with that in a product..

..you hold down one note, then keep triggering more to build up a chord... how teh fcuk would dracula sound if you stacked up all them notes and it went quiet with every note? people would be scalping absynth. (never had enough dosh to consider looking at it)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

To clarify: Absynth doesn't compensate for the number of held notes, but for the max-polyphony setting - but I find that almost as annoying.
The hole is deeper than the hum of its farts

Post

I do not disagree with the idea that USUALLY output should not be auto-scaled according to the number of notes played.

Only mention of exceptions--

Old-style Hammond tonewheel organ cross-wired each tonewheel generator to multiple key contacts and busbars. So that (somewhat depending on how many drawbars are pulled out) a single note can be "relatively louder than you would expect" considering the level of a two-fisted chord. Holding a big chord would "dilute" the output of any "shared" tone generators that happen to be shunted into 2 or more busbars when a big chord is played. A subtle volume compression / timbre change effect because it depends on the drawbar patch and the nature of each chord played (how many of the tone generators are getting "diluted" among multiple notes).

It ought to be horrible to play but in practice can be more fun than a sampler playing a Hammond sample, where an 8-note chord is linear addition of 8 samples.

Maybe some other old instruments which used busbars and did not have "wall to wall buffer transistors on every note and key contact", could also show some chord compression? Dunno.

Maybe some of the electric pianos could show similar effect? Just wild guessing. Wonder if an 8 note chord on a Wurlie EP capacitative pickup or Hohner Pianet would be as loud as a sampler linear-adding 8 notes of Wurlie or Pianet samples?

So far as that goes, would a clean 6 note stratocaster chord be as loud as a sampler linear-adding 6 notes of clean strat samples? Dunno. There sometimes seems to be some chord compression that happens even on clean guitar, more noticeable in some guitars, less noticeable in others. But I've never tried to measure it.

Post

a recent dafx review (iirc, all a blur to me) mentioned ??smith and valimaki? measuring guitar pickups in gauss, which has a simple takeaway nonlinearity for emulating pickups, which i guess would smush some.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post Reply

Return to “DSP and Plugin Development”