Making a Quantizer

Post Reply
merkury
Posts: 2
Joined: Sat Nov 09, 2019 2:18 am

Making a Quantizer

Post 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!
User avatar
honki-bobo
Posts: 306
Joined: Sat Nov 09, 2019 1:18 pm

Re: Making a Quantizer

Post 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
merkury
Posts: 2
Joined: Sat Nov 09, 2019 2:18 am

Re: Making a Quantizer

Post by merkury »

Thanks a lot. I will give this a try later tonight.
User avatar
seal58
Posts: 354
Joined: Fri Jul 12, 2019 5:28 pm
Location: Rostock, Germany
Contact:

Re: Making a Quantizer

Post 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);
Post Reply

Return to “Module Designer”