-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quantization question #117
Comments
Hello @koswir , the Quantizer is normal from my experience.. you basically have 2 types of creating chords in the CH algorithms u have two options either you qualitize and have chords related to the root key and the second note on the scale and third related which creates Triads , or if u turn the quantizer Off , you are using the algorithms like before ( WTx4 ) algo . Chord Modes \ \CH, -_CH, /\CH, SICH, WTCH \ \x6, -_x6, /\x6, SIx6, WTx6 Timbre parameter For saw algorithms (\ \CH, \ \x6), each note is actually 2 saw waves, and Timbre controls the detuning between the 2 saw waves. For square algorithms (-_CH, -_x6), Timbre controls the pulse width of the square wave. For triangle and sine algorithms (/\CH, /\x6, SICH, SIx6), Timbre controls the amount of wavefolding to apply to each oscillator before summing. For wavetable algorithms (WTCH, WTx6), Timbre morphs between a small set of wavetable entries. This is the same wavetable list as the original WTx4 mode. here from the manual of the Chords modes from renaissance. |
oh really? @rootapprox
yes I know what you mean - but there is no Root key setting |
The root key is the first key in the little piano roll in the waveforms interface. like F#3 for exmple then i you want a chord with F# Aeolian , you go the quantizer you set aeolian scale then when u open the color u will hear more notes coming after your root Key to complete your chord in the proper scale that you choose, hope i explained myself good here . |
I do not think so - from what I hear - the piano does not set the root key of the scale setting from the i/o page. |
@koswir The Transpose in the IO section it just shift the note to other notes , for exmple u want to go 1 octave down you put -12 in the IO section. |
Thanks for all your help bro. |
@koswir i'm not sure if i have fully understood the discussion (somehow i lack the ability to concentrate at the moment). In any case, the CV or the return value of engine::cv() is calculated internally as follows:
The The
Edit: The code for Braids Renaissance Chords is special in this case, otherwise there is no engine that does the lookup directly on the quantizer table. These are two places where you can work out how the chords are generated: https://github.com/eh2k/squares-and-circles/blob/main/lib/braids/chords_stack.cc#L560 |
I Actually understand what you mean now i think @koswir , @eh2k the problem is from my end also is that when you change the note in the CV / V oct in my case , the note its fixed to C and when you keep goin down you just change to octaves , not semitones.. even if i wanted to change that from the IO menu i still cant change semitones in the actual squale , its fixed to C and its goes down only for octaves or up .. |
Not sure what you mean by octaves @rootapprox but the fact is no matter how you retune a machine the quantizer is always in C. |
@koswir you are making total sense , the quantizer is always in C and its not changin the notes when u try to change it from the IO ( only goes octaves down or up in the scales) |
There is a new update 0e83607. In addition to a few optimisations, the piano roll is now displayed and incremented according to the quantizer. Here, for example, the Japanese scale - there are only 5 notes per octave: The transpose in not changed in the io-page yet, but I would limit it to octaves only. What do you think - what about the initial question/issue? |
Hey @eh2k
Well, the display of a scale looks pretty cool! It works great for modulating the Tune knob! I am sorry to be the downer thought but this is not helping with the problem.
...it will be very bad to remove the i/o transposition now cause you limited a machine's transposition to steps from a selected scale. There will be no way to transpose freely other than forget about the quantizer at all. Please add Fine Tune to the i/o - I needed it a few times and I had to waste one of the slots on v/oct engine (it has finetune parameter). Let me try to explain again the scale key problem. So... lets assume that we use standard 440hz=A equal temperament tuning and standard v/oct calibration so 0, 1, 2, 3 are octaves of C. Of course if we want to play chromatic notes we have to split 1 volt /12.
The voltages and values for all the notes will go like that: 0V: C (0) 0,0833V: C# (128) 0,1667V: D (256) 0,25V: D# (384) 0,3333V: E (512) 0,4167V: F (640) 0,5V: F# (768) 0,5833V: G (896) 0,6667V: G# (1024) 0,75V: A (1152) 0,8333V: A# (1280) 0,9167V: B (1408) Now if we want to quantize to a scale. So now lets play a different key - for example F# aeolian. So to be able to quantize to the F# aeolian the code should be If it still not clear I have no idea how to explain that. |
or maybe it could be calculated somehow like that: |
Thank you for your feedback. To be honest, I didn't focus on the quantizer at all. I simply quantised the CV at the end of the signal chain and thought that was it. With the last update ca4b980, there were following changes / new parameter in the io-page:
I think where are still the following quantizer issues:
|
@eh2k Hello , now it works perfectly (you can change the Root key in the scale) !! nice additions also with the fine tune and the Root Key! |
Hey @eh2k
To be honest me too! I discovered it accidently becasue the new chord algos.
It works as it should except the new chord algos.
For me there is no need to quantize midi - but I will try that later. |
@eh2k The new problem I found: quantizer-noteskippingtest.mp4 |
there is a new update 78883e6, with following changes.
Here is the code snippet that shows how the CV is currently calculated. At the moment I am not sure whether the midi_note should be quantized or not. The same actually applies to the V_OCT parameter (which I now add after the quantization, as the scale actually already corresponds to the quantizer) constexpr int32_t PITCH_PER_SEMITONE = PITCH_PER_OCTAVE / 12;
constexpr int32_t DEFAULT_NOTE = 60;
int32_t cv = 0;
int32_t mod_cv = 0;
int32_t midi_note = (_ctrl.midi_note - DEFAULT_NOTE) * PITCH_PER_SEMITONE;
int32_t midi_pitch = ((float)_ctrl.midi_pitch / 8192 * PITCH_PER_OCTAVE);
if (param_v_oct)
{
get_v_oct(param_v_oct, &cv, &mod_cv); // get the value & mod_cv form v_oct parameter
if ((param_v_oct->mod->src == MOD_RND || param_v_oct->mod->src == MOD_TM) == false)
{
cv += mod_cv;
mod_cv = 0;
}
}
cv += quantizer->Process(midi_note + _ctrl.cv + mod_cv, io->qz_root * PITCH_PER_SEMITONE);
cv += midi_pitch;
cv += io->cv_transpose(); // transpose + finetune |
Hey @eh2k
Yep - the bug seems gone!
No - actually Renaissance Chords are still quantized only in C (and also these are not triads but 7th chords). Here is the chord output in C aeolian. It works. The right notes in C aeolian are C, D, D#, F, G, G#, A# Cmin-chords-works.mp4And here is the weirdness of E aeolian. The right notes for E aeollian should be E, F#, G, A, B, C, D. Emin-chords-wtf.mp4The note controlled by the Colour knob also acts kinda weird - it plays fifths or sixths adding octaves and going very hight but starting from the +1 oct (it neven plays fifth in the basic octave). In the Braids Renaissance documentation says: That is not a very detailed explanation, but seems the chords should be triads with extensions controlled by the Color parameter (I guess it means 7th, 9th etc.).
I had no time to test these up.
Honestly I feel that the one I started is still unsolved, but of course if I should write somewhere else - please move the post. |
@koswir - thanks again for reporting - I have found the bug. in the latest firmware 8c3e8a9, the chord keys are listed on the right now. |
Thank you! @eh2k BTW. In C these chords sound super lovely now! This feature is super dope! I will use them alot!
I love this little chord display! Please do not remove it - this is super helpful! ❤️ |
I also noticed this at first for the 6x chords, as there are quite large offsets if color is in middle position. squares-and-circles/lib/braids/chords_stack.cc Lines 586 to 605 in 8c3e8a9
|
@eh2k The first note of the chord follows the root note right. But the other three (or more) notes follow shapes of the chords but play them in C. Could you please try to transpose the other notes based on the root note settings after quantization (eg. for root note C +0, C# +1, D +2 etc.)? Not sure can I explain it right 😆 |
if you say To verify the whole thing exactly, we need to know the exact CV input in volts (or the midi note), as well as the quantizer settings + transpose and the color paramter. Then it is possible to calculate / test exactly which notes come out at the end. So let's define concrete cases. Case 1:
Case 2:
I have set the CV input internally with a CV/voltage engine. In both cases I have the same output notes - now I don't know what I would have expected 🤯?! EDIT:
squares-and-circles/lib/braids/chords_stack.cc Lines 500 to 510 in 38ab43a
|
@eh2k
yes. It basically means I send a voltage that should give me C or E sound in my speakers.
All the settings are fine here. The difference is what we hear 🎧
Yep these are not notes. These are scale degrees. On the o_c’s display everything is fine but the hearable result is right only in C. I hope I haven't make it even more complex 🤣 |
@eh2k
In the last sentence there is the part about adding a root note value after quantization. |
@eh2k
Cmon please 😅 bring them back! BTW I sent you an email at eh2k◯gmx.de |
@eh2k Switching octaves (e.g., 0, -12, -24, -36, etc.) works perfectly, but when I set the transpose to another value, like -32, the chords don’t sound correct anymore. What’s more frustrating is that I can’t figure out the pattern behind the inconsistency in the chord generation. 😞 For example, in theory, E aeolian should match C aeolian transposed by +4, but that's not happening. The main note of the chord seems correct, but some chords unexpectedly change - like switching from minor to major or vice versa. I do not like that but because of this, I’m starting to think the simplest solution might be to restrict the transpose knob to octaves for chords. |
Let's separate the 2 topics here. There is the general quantization that is the same on all engines with V_OCT parameters and the additional usecase with Renaissance Chords. When testing the quantizer in general, I noticed the following edge case in combination with the root. If I set the quantizer to AEOL and Root C#, for example, the following happens: If CV-In is in 0V, as the root note is subtracted before the quantiser, i.e. CV ( 0V ) - ROOT( 1/12V ) => Here it is actually a matter of luck whether the value swaps to note 0 or note -1 on the AEOL table. If C# (1/12V) is added again after quantising, you have either B3 or C4#. |
@eh2k Happy new year!
Yep I am aware of that. In the general quantization there is a certain threshold cv at which the switch to other note from a scale happens. But I think the one I described previously is something else. Only some notes of a chord are wrong. When I have some time I will record a vid from the Pitchmap plugin's visualisation. |
@koswir - Happy New Year to you too. There has been a small tweak to the general quantiser in the latest version 4b23f97. In any case, you can now test/verify the quantiser quite well with the CV/V_OCT engine. The internal ‘integer’ CV value is displayed now (A semitone corresponds to the value 128): The same code is used for all engines that have a V_OCT parameter. This means that you can see exactly which value is calculated from V_OCT + Modulation + transpose + fine + Midi + CV + Quantizer etc and is passed to the oscillator. constexpr int32_t PITCH_PER_SEMITONE = PITCH_PER_OCTAVE / 12;
constexpr int32_t DEFAULT_NOTE = 60;
int32_t cv = 0;
int32_t mod_cv = 0;
int32_t midi_note = (_ctrl.midi_note - DEFAULT_NOTE) * PITCH_PER_SEMITONE;
int32_t midi_pitch = ((float)_ctrl.midi_pitch / 8192 * PITCH_PER_OCTAVE);
if (param_v_oct)
{
get_v_oct(param_v_oct, &cv, &mod_cv); // get the value & mod_cv form v_oct parameter
if ((param_v_oct->mod->src == MOD_RND || param_v_oct->mod->src == MOD_TM) == false)
{
cv += mod_cv;
mod_cv = 0;
}
}
cv += quantizer->Process(midi_note + _ctrl.cv + mod_cv, io->qz_root * PITCH_PER_SEMITONE);
cv += midi_pitch;
cv += io->cv_transpose(); // transpose + finetune |
A recent thread on the vcv community forum is about the distribution of quantized notes in various quantizers in the VCV plugin library. I may have missed it, but ... What is the distribution of the quantizer outputs in S&C ? https://community.vcvrack.com/t/testing-quantizer-distribution/23447 |
I think the general quantizer, that is processing the CV input is "Normal quantization" If the voltage values are equally distributed over the 1V range (Octave), the probability of randomly getting each note depends on the interval between notes. But the Braids quantizer has an internal state so that small CV differences below a threshold do not change the last note. This makee it more stable if the ADC input is noisy. With SEQ/TuringMachine the Output-Mode NOTE-3...7 should actually be "Equi-likely quantization". Assuming the TM shift register has a normal distribution, in case NOTE-3 to NOTE-7 the bits are used as note index. This means that each note has the same probability regardless of the frequency intervals. However, this is not the case with output mode CV_5V. Here, the value is quantized like a CV signal |
@eh2k
I've been testing the new chord engines and I realised that the build in i/o quantizer is kinda weird.
Am I right that the generator's pitch and i/o's transpose happen before quantization?
If it works like that it means that any set scale is fixed on the note C.
Could you add a setting for quantizer key in the i/o settings?
The text was updated successfully, but these errors were encountered: