Testing quantizer distribution

It is well-known that when feeding random numbers into pitch quantizers, most quantizers yield an uneven distribution of notes across the scale (GitHub - dbgrande/GrandeModular: Modules for VCV Rack). The Quant module from the Grande plugin compensates for that with its ‘Equi-likely’ mode.

The following test patch was created to study the behavior of different quantizers regarding their evenness of distribution.

Tool for testing quantizer distribution_20250110.vcvs (37.4 KB)

A random signal in the range of 0V to 1V is run into a quantizer and the resulting pitch is analyzed. Each note selection creates a respective trigger, which is counted using an Accumulator (docB) and presented graphically as well as in numbers.

Even distribution was usually observed when ‘chromatic’ (all semitone) was selected as scale. With other scales, quantizers exhibited an uneven distribution. The only exception was Quant (Grande) in ‘Equi’ mode.

An input of 0V yields C4, and 1V results in C5, so most quantizers also showed a distribution between these two notes. By placing Fence (Orange Line) into the path, C5 was rolled over into C4.

Use this patch to study and adjust your preferred quantizer.

OPERATION: Replace Grande’s Quant with the quantizer of your choice. Set the number of pulses per run in the Countdown 5 (Count Modula) module (default: 20000). Press the Reset button on the Button module (Little Utils). Start the clock in CLKD (Impromptu) and let the patch run. The Distribution Readout in PolyVoltageMeter (NYSTHI) shows how often a note is chosen relative to other notes. Polyprobe (Amalgamated Harmonics) shows respective values (count/1000).

Inactivate Fence (CTRL+E) to allow the split of C4 and C5.

So far, I tested the following quantizers:

  • ScaleCV (Aaron Static)
  • QuantEyes (Bacon Music)
  • Quant (Coffee)
  • Nonaquant (DanT)
  • Quant (Grande)
  • Quantizer (JW-Modules)
  • Quantum (ML Modules)
  • Weighted Quantizer (Null Set)
  • re-win (repelzen)
  • sickoQuant (Sickozell)
  • Quantizer (VCV)
8 Likes

interesting👍 do you have any results with your tested quantizers, yet? a favorite?

Interesting topic!

I’ve been testing some quantizers myself before, using a patch that is similar to yours but uses the “PdArray” module for visualization of the distribution. Up to now, I’ve only found 2 quantizers that can do a proper ‘Equi-likely’ mode quantization:

  • Quant (Grande)
  • Oh Peas! (computerscare)

quant_equi_likely_histogram_20250111.vcvs (15.0 KB)

Another easy way of testing if a quantizer does Equi-likely quantization is by feeding a properly scaled saw-tooth waveform through the quantizer, and plot the output together with the input on a scope. For correct equi-likely quantization, the horizontal “step-width” should be the same for all steps in the output waveform. In other cases, you will observe different lengths for the horizontal part of the steps (example in screenshot quantizes to the Blues scale).

quant_equi_likely_saw_20250111.vcvs (7.4 KB)

3 Likes

Here are a couple of results from different quantizers. All tests were run using the C aeolian/natural minor scale with 20,000 pulses. C4 and C5 were left separated (no Fence).

Quant (Grande) in Equi mode shows equal distribution. C4 and C5 are split into two columns of approx. half the size.

With Quant (Grande) in Non-Equi mode, Supertonic (2nd scale degree) and Dominant (5th scale degree) are diminished. Distribution also depends on the Round setting (Up, Down, Nearest).

The other quantizers each show individual profiles, which I think is pretty interesting (see pic).

For example, Quant (Coffee) and Nonaquant (DanT) are stronger on the Subtonic (7th scale degree). In contrast, others such as QuantEyes (Bacon Music) show dimished Supertonic and Dominant. ScaleCV shows diminished Supertonic, Dominant and Subtonic.

Weighted Quantizer (Null Set) delivered an even distribution in its native Cmin setting. It also allows for weighting notes to skew the distribution. With this feature, you can easily create any distribution — my current favorite for use with random numbers.

3 Likes

Cool setup :+1:, thanks!

Confirming that Oh Peas! (computerscare) shows even distribution as well.

Oh Peas (computerscare)_20250111

Venom Non-Octave-Repeating Scale Intervallic Quantizer (NORS-IQ) also has an equi-likely mode that works well.

I’ve tested NORS-IQ against Grande Quant using the same scale, and they give identical results. Of course NORS-IQ can be configured for all kinds of crazy scales that most quantizers cannot do. But all those crazy scales support equi-likely mode.

Not necessarily - it depends how the assigned voltage ranges align with the range of your input. Each note is assigned a different voltage range. It is true the delta between the min and max voltage for a given note remains constant in equi-likely mode. But your input min and max may not align with a transition point, in which case the notes at the bottom and top of your saw wave may have different lengths from the rest. Changing the rounding method (up, down, nearest) can change the alignment.

As long as both your input saw min and max voltage values align with a note transition, then yes, all horizontal step lengths will be equal in equi-likely mode.

1 Like

Confirming that NORS-IQ (Venom) in Equi-likely mode shows an even distribution :+1:, thank you!

NORS-IQ (Venom)_Equi-likely mode ON_20250111

This expands the list of equi-likely quantizers:

  • Oh Peas! (computerscare)
  • Quant (Grande)
  • Weighted Quantizer (Null Set)
  • Non-Octave-Repeating Scale Intervallic Quantizer (NORS-IQ) (Venom)

If Equi-likely in NORS-IQ is unchecked, Tonic, Subdominant and Subtonic are emphasized within the C minor scale.

NORS-IQ (Venom)_Equi-likely mode OFF_20250111

The word “proper” makes it a bit of a value judgement, yes? I don’t think any of these quantizers attempt that mode. Sure it’s a super useful option, and if that’s what you want/need for your musical application then by all means seek it out. I just don’t think other quantizers are “improper” because they choose not to implement that feature. Yes?

2 Likes

No value judgement intended here at all. There are plenty of other quantizers available (that don’t do equi-likely quantization), that are excellent. Just want to make people aware on what is available if equi-likely quant. is what they are looking for (like I was).

oh for sure. good stuff.

As an expansion of the theme, a similar patch was used to test the distribution of random note generators. Some of the results were unexpected.

It’s an interesting and worthwhile analysis, thank you. Just throwing out a thought here - there might be an assumption that there’s only one right way to quantize, and that all quantization should quantize a CV to the nearest note-value. That assumption might not hold and developers could make various choices, such as “nearest note up” or “nearest note down”, etc. For instance I’m reminded of the 5 different quantization modes on the menu of the ML::Quantum module:

So different developers might also have made different artistic choices that don’t align with one’s assumption of “only one way to do it”, apart from the inevitable bugs of course. I don’t know but something to keep in mind perhaps.

Edit: Upon re-reading the various posts perhaps testers are very aware of different quantization modes and my comment might not be valid. I’ll just leave it here.

2 Likes

This definitely falls uner the category of ‘things I didn’t know I needed’.

1 Like

I was able to condense the accumulator to a single module (the fabulous polycounter by alef’s bits, which is polyphonic), thereby significantly compacting the patch.

Improved tool for testing quantizer distribution_20250113.vcvs (19.5 KB)


This now also allows for displaying distributions across multiple octaves (in the example shown below: Oct2, 3, 4, and 5) in a relatively small space.

Improved tool for testing quantizer distribution_4 octaves_20250113.vcvs (31.7 KB)

Note that for this, the range of the random number input is adjusted to a range of -2V to 2V (4 octaves at 1V/Oct). Technically, random values between 1.91667V (B5) and 2V (C6) are ignored and therefore do not register.

Different octaves are implemented by setting different offset values for the ‘B’ parameter in WinComp (Venom).

For quantizers, the new setup may be less important, as they usually only have settings that apply to all octaves in the same way (one exception being Nonaquant by DanT; see below).

However, distributions across multiple octaves will be more relevant when testing random number generators.

1 Like

Nonaquant (DanT): in C minor mode. Pattern similar to single octave.

Nonaquant (DanT)_4 octaves_20250114.vcvs (38.4 KB)


Nonaquant (DanT) with blocked 3rd octave: C minor mode. Framing notes seem to soak up notes from the void.

Nonaquant (DanT)_4 octaves_Blocking Oct 3_20250114.vcvs (38.4 KB)

This is in no way a criticism of this thread, it is really fascinating, and captures the beauty of eurorack; do what ever you want, use things in unexpected ways, there are no wrongs.

But I have to say, for my quantizer, this is 100% working as intended. The distance between the two notes is larger than the distance between any other notes sequentially, so it stands to reason that for a flat distribution of values, the largest space would capture the most values.

I can understand the want for a different distribution of generated notes, but for me (and for the design philosophy of my plugin), having the quantizer work in any other way would just be “incorrect”.

If I wanted an equal distribution of notes generated from an uneven scale (ie the spaces between notes are not uniform), then I would use something like a random switch (assuming the switch has the distribution that I wanted) instead of a quantizer. (This is in fact, one of the reasons why I created PolySplice).

1 Like

Thank you! Yes, sorry if the comment came across as judgmental, it was not intended to be! Rather, it was meant to be descriptive of an interesting effect.

The way I see it, is that the notes that cannot be played because they are blocked out need to go ‘somewhere’, so it is quite natural that they move to the next higher or lower framing note that is ‘allowed’ and then accumulate there. I think that’s perfectly fine and I’m glad that the testing made me aware of it.

I think Nonaquant is a wonderful module and, AFAIK, the only one that can quantize notes differently in different octaves.

1 Like

Not at all, no worries.

It is just that in my head

(bear in mind that I am a green-orange personality-type (which is also roughly ENTJ))

“quantisation” has a specific meaning,

and what is described as “equi-likely quantisation”, for me is not actually quantisation.

It is a remapping from a non-uniform scale to a uniform scale.

edit

I suppose you could say that the random values are quantized after the remapping, but what I don’t like about that is, after the remapping, the scale visually indicated on the module is no longer accurate to the actual scale being used to quantize the input.

2nd edit

The remapping is of course a useful concept, so it is very good that there are modules that can do this, but it is not a “question” that Nonaquant was made to answer.

To further illustrate how I think about this for Nonaquant;

Quite often I set a scale on a few higher octaves, and then a different scale on a lower octave, I could then use a single input to generate both melody and bass.

I might add a random value to an LFO to use as the input, potentially use a longer envelope for the bass notes so that they overlap the melody…

To me, a teleological and practical approach makes the most sense: There are some applications/situations where equi-likely quantization is useful, and others that benefit from a non-equi behavior. I think there is no right or wrong in this, they are just different and it depends on goal and expectation.

Quantizing low and high registers to different scales can yield really interesting combinations and this is easy to do with Nonaquant. Every quantizer (probably even every module) focusses on a different trait, and I think it would be unreasonable to expect that all should be able to do all.

On the contrary, trying to pack in too many ‘features’ can quickly take a toll on user-friendliness.