[PD] Non-Linear Quantization / Bitcrush

Ludwig Maes ludwig.maes at gmail.com
Tue Nov 2 19:37:37 CET 2010

So you want amplitude 'a' dependant quantization size 'q' ? take your
chosen q(a); in your example it seems you want a simple line:
define f(a) as integral of 1/q from a=0 to a; also calculate the
inverse of f(a) i.e. a(f);

now for each sample do: out=a(round(f(in))) where round is any floor
or the like...

have fun!


in your example: q=q0-k*a with for example q(0)=0.001 and
q(0.8)=0.0001: q:=0.001-0.0009/0.8*a
then f=2558.427881-1111.111111*ln(10.-9.*a)
and inverse=easy

On 2 November 2010 19:20, Ludwig Maes <ludwig.maes at gmail.com> wrote:
> This is pretty easy actually, I use such things mostly to guide my
> rhythmical quantization...
> On 2 November 2010 19:19, brandon zeeb <zeeb.brandon at gmail.com> wrote:
>> This is even better.  If I could minimize the jumps around Y = 0.5 to -0.5
>> It'll be exactly what I'm looking for... or a start at least.
>> Do you see what I mean now?  See how the amount of quantization changes with
>> Y and a minimum quantization value?
>> I think I'm getting towards the answer now...
>> --
>> Brandon Zeeb
>> Columbus, Ohio

More information about the Pd-list mailing list