Page 1 of 1

Making a Quantizer

Posted: Sat Nov 09, 2019 2:24 am
by merkury
Hey everyone,

I am trying to make some simple utility modules to learn more about how this works. I want to make a quantizer, but I am immediately questioning my sanity. Is there an easy way to do this or do I need to define voltage ranges for every note across 10 octaves? I am thinking that is the case, but maybe I am missing a library or something. Any advice or help appreciated :)

Also - is there any way to import in core modules to examine how they work?

Thanks!

Re: Making a Quantizer

Posted: Sat Nov 09, 2019 1:41 pm
by honki-bobo
Hello merkury,

since an oscillator works with 1 V/octave, a semitone corresponds to 1/12 V. So what you need to do is basically this:

outputJack1.SetValue(Math.round(inputJack1.GetValue()*12)/12.0);

I've just tested this with the stock quantizer module and the output is exctly the same.

Hope this helps.

Best regards

Re: Making a Quantizer

Posted: Sun Nov 10, 2019 9:56 pm
by merkury
Thanks a lot. I will give this a try later tonight.

Re: Making a Quantizer

Posted: Mon Nov 11, 2019 7:49 pm
by seal58
I think, that algorithm is only true, when the input is normalized as signal 0 to 1 volt. The octave transpose amount should be subtracted before quantizing and added afterwards.

Code: Select all

int octave = (int)inputValue;
normalizedValue = (inputValue % 1);