[sdiy] Quantizer project.. incoming CV's switching point to change to quantized output CV's ...

Jean-Pierre Desrochers jpdesroc at oricom.ca
Mon Jul 5 01:18:45 CEST 2021

I agree with you Brian.
Yes, the use of dead zones are necessary around the threshold points
to  avoid any glitches on quantized output..
I think my PIC micro's  10bits A/D would be Ok to read the incoming CV signal.
The quantized output though will be from an external SPI 12bits DAC.

-----Message d'origine-----
De : Brian Willoughby [mailto:brianw at audiobanshee.com] 
Envoyé : 4 juillet 2021 17:48
À : Jean-Pierre Desrochers
Objet : Re: [sdiy] Quantizer project.. incoming CV's switching point to change to quantized output CV's ...

Regardless of where you place the thresholds, you want to implement hysteresis. In other words, you want a dead zone that is at least one code in width at the resolution of your A/D converter. If there is noise in your A/D circuit, then you'll need to make the zone larger than one dead code. You can make the dead zones much larger than these minimums, especially for the scales that have very few output notes, but the important factor is that you don't want the dead zones to be smaller than the amplitude of the noise on the input, including quantization noise.

The reason this is necessary is that you don't want to end up with edge cases where the output fluctuates between two values at the sample rate. No matter how precise your A/D, there will always be the possibility that an analog input will fall exactly on a threshold and produce a different code with every sample.

When the input is in the dead zone, the output should stay at whatever value it was before (which would either be just above or just below the dead zone). Thus, once a given output CV is generated, it will not change until the input moves more than the noise amplitude away from the previous value.

Of course, you could assume that your input CV is always precisely on scale, so you might be able to assume that the input voltage is never near the thresholds that could be placed half way between each note. However, it's very easy for drift to occur, or for there to be a mismatch between two pieces of modular gear, or even just that you want to connect a slowly-changing continuous CV to the input without having modulated noise come out the other side.


p.s. There are adaptive algorithms for avoiding dithered output that do not use dead zones, but they have the disadvantage of ignoring valid input as a tradeoff for stabilizing the output. The advantage of the dead zones is that any input that doesn't fall into a dead zone will always produce the correct output, which is far more satisfying than adaptive algorithms that might ignore a valid input that's close to previous inputs.

On Jul 4, 2021, at 11:44, Jean-Pierre Desrochers <jpdesroc at oricom.ca> wrote:
> I think i managed the problem..
> Here is an Excel view of some exotic scales..
> column B shows the incoming CV voltages and column D shows where the 
> tripping points are..
> For example:
> In the Triad scale,  an incoming key of G (0,5833v) will output a 
> quantized G note as long as it stay in the boundary between 0,5417v 
> and 0,6250v and will stay on this key if the next incoming key gets in the pink areas.
> Otherwise it will switch to another quantized key.
> Or maybe that’s not the way to manage the problem.. 
> <image001.jpg>
> De : Synth-diy [mailto:synth-diy-bounces at synth-diy.org] De la part de 
> Jean-Pierre Desrochers Envoyé : 4 juillet 2021 13:35 À : 'SDIY'
> Objet : [sdiy] Quantizer project.. incoming CV's switching point to change to quantized output CV's ...
> I'm starting a CV quantizer design and am wondering about the 
> following things:
> Let's assume a normal quantized semi-tone scale:
> All the incoming CV's are quantized to semi-tones like this:
> incoming CV 'around' C, output quantized CV -> C incoming CV 'around' 
> C#, output quantized CV -> C# incoming CV 'around' D, output quantized 
> CV -> D and so on..
> 12 equally spaced output quantized intervals. OK.
> But if the quantized scale output is a TRIAD like C-E-G-C-E-G-C, 
> etc... ( 3 quantized intervals)
> where are the switching bounderies of each incoming note CV's to 
> change to the next outputed quantized note ?
> This question is for ascending and/or descending notes..
> Same question for a quantized PENTATONIC major scale output like 
> C-D#-F-G-A#-C-D#-F-G-A#-C, etc.. ( 5 quantized intervals)
> I would think of dividing the octave range with equal intervals with 
> the number of intervals inside the actual quantized scale..
> For example: 
> That's 3 intervals
> 1 octave = 1 volt
> so 1volt/3 intervals = 0.333v between each quantized notes (??)
> or
> PENTATONIC major scale C-D#-F-G-A#-C
> That's 5 intervals
> 1 octave = 1 volt
> so 1volt/5 intervals = 0.20v between each quantized notes (??)
> But... I don't think that is working this way..
> I think I must keep the incoming CV interval sizes and use them for 
> the quantized switch points.. (???)
> Your opinion on that ??

More information about the Synth-diy mailing list