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!
Making a Quantizer
- honki-bobo
- Posts: 310
- Joined: Sat Nov 09, 2019 1:18 pm
Re: Making a Quantizer
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
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
Thanks a lot. I will give this a try later tonight.
Re: Making a Quantizer
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);