[sdiy] just quantization

Magnus Danielson cfmd at bredband.net
Sun Jul 24 15:54:31 CEST 2005


From: Ingo Debus <debus at cityweb.de>
Subject: Re: [sdiy] just quantization
Date: Sun, 24 Jul 2005 15:03:14 +0200
Message-ID: <4B4CC496-FC43-11D9-9732-000A9571C136 at cityweb.de>

Hi Ingo,

> Am Sonntag, 24.07.05 um 06:39 Uhr schrieb anthony:
> 
> > I use Cubase VST too and I have plug-ins for all kinds of tunings.
> > I just always like to have an all-analog solution for most this.
> >
> 
> With one knob for each pitch the scale contains? So that you needed for 
> instance 61 knobs for five octaves of 100CET?
> 
> Or one knob for each pitch inside a range of one octave, and have this 
> pattern repeated every octave? But this would limit you to scales like 
> this. Some scales even do not have octave intervals.
> 
> I'm still thinking of a quantizer that has only a few, say five or so 
> knobs, and still would be able to generate most of the known scales.

OK, here is my idea then...

You have one switch which scales the number of tones per octave, so that you
can map a 5 tone scale per octave onto a normal continous 12-semitone per
octave scale. Consider that you have a scale of n seminotes per octave, and
you now have seminote N (the voltage of seminote N is N/12 V). Now, for each
multiple of n we want the output to be raised by 1V, so we produce the
floor(N/n) value, which can be performed by propper scaling of either reference
voltage or input voltage to a comparator AD-DA quantizer setup.
We then take the residue which is equalent to N mod n and process that further
by doing a Taylor approximation, where the knobs control the coefficients in
the x, x², x³ etc. series. This way you can handle both linear and non-linear
distributions of the seminotes within the scale and also have a continous
range. it's a crude approximation, but should work well.

To create the higher terms like x², x³ etc. use of 4-quadrant multipliers
should be used, but with some thought may even 2-quadrant (OTA-based) and
1-quadrant multipliers be used.

Noct is the number of octaves in the scale that was found by the octave
quantizer:

             N
Noct = floor(-)*n
             n

m is the seminote within the octave (m is 0 to n-1):

m   = N - Noct

x is the Taylor approximation value, offset by the Taylor approximation centrum
of a:

      m
x   = - - a
      n

(Note: m/n will be a value from 0 up to (but reaching) 1 and is those a
fractional octave value. The value a is probably best chosen to be 1/2 so that
the error in 0 and 1 is equalent. Some suitable scaling of this fractional
voltage may be useful in the implementation.)

The higher terms of taylor approximation is calculated:

x^2 = x   * x
x^3 = x^2 * x
x^4 = x^2 * x^2
x^5 = x^4 * x

etc.

Then we get

    Noct*12            2      3      4
y = ------- + c x + c x  + c x  + c x + ...
       n       1     2      3      4


a is chosen to be a suitable offset-point in the octave.
c , c  etc. is the Taylor coefficients which is tuned by the knobs.
 1   2

For a correct treatment in math, there should be a divide with the p! (where p
is the power of the x) but ah well, in the life of approximations! ;O)

What one then has to do is to create a table of the taylor coefficients for
various scales, which is a matter of homework for a computer near you.

The interesting aspect of this sceme, is that it will handle both small and
large detunings as a continous function, if sufficient detail is payed in
implementation, trimming and values of coefficients such that octave jumping
does not cause too large jump in voltage (one octave step needs to match the
step of going from x=0 to x=1, selecting a to 1/2 acheives this, but requires
4-quadrant multipliers, a selected to be 0 requires only 1-quadrant
multipliers but a much better tuning of the coefficients).

Now, was this anythin near what you was thinking about?
I haven't seen anything like this and I just came up with the idea, but it
should work fairly well. Some analysis needs to go into the number of higher
terms which is needed for a good fiddelity. Also, I think this would lend
itself to create really whacky scales, which is continous, which I think people
would enjoy fooling around with.

Cheers,
Magnus




More information about the Synth-diy mailing list