[sdiy] Introducing my new M116 Multi-Scale Quantizer !
Jean-Pierre Desrochers
jpdesroc at oricom.ca
Mon Sep 20 22:51:59 CEST 2021
The way I ‘vote’ the good quantized output vs the incoming ADC value is the following way:
Each scales have a number of possible steps so I constructed a lookup table
of 25 elements (scales) with each a number of steps (thresholds).
unsigned char const ADC_step_divisions[25] = {12,6,5,5,7, 7,3,3,3,3, 6,8,7,5,5, 7,7,7,7,7, 7,7,7,7,7};
So if I’m in the 2nd scale I know I’ll have 6 steps to compared with the incoming ADC value
Here is part of my code:
for(x = 0; x < ADC_step_divisions[ScaleCounter]; x++) // ADC_step_divisions[] = 3,5,6,7,8 or 12
{
y = scale_ADC_threshold_values[ScaleCounter][x] + octave;
z = scale_ADC_threshold_values[ScaleCounter][x+1] + octave;
if( (ADCValue >= (scale_ADC_threshold_values[ScaleCounter][x]) + octave ) &&
(ADCValue < (scale_ADC_threshold_values[ScaleCounter][x+1] + octave) ) )
.
.
.
This way I quickly know where the ADC input is located in the scale cells
then I can output the right quantized output.
The selected output then is used to calculate the right MIDI note to send.
JP
De : The SynthiMuse [mailto:synthimuse at gmail.com]
Envoyé : 20 septembre 2021 16:30
À : Didier Leplae
Cc : Jean-Pierre Desrochers; synth-diy mailing list
Objet : Re: [sdiy] Introducing my new M116 Multi-Scale Quantizer !
In the example of a pentatonic scale, the octave range would be divided in to 5 steps.
If the input value was exactly at the midway point, it would take the middle note of the scale.
If the input was half way between 2 notes, it would first look down one step to see if there was an allowable note. If no note was there, it would look up one step. If no note was found it would look down two steps, if no note was found, it would look up two steps and so on. It would keep widening it's search up and down until it found a valid note to output.
In the synthimuse, I added a randomisation to the first step so it didn't always go the same way. Sometimes it would start looking down, other times it would start looking up.
The only thing I didn't like about this approach is that it can take an indeterminate number of steps to get a note.
For a 12 tone chromatic scale : 1 step
For a worst case 1 tone scale, it could take up to 11 steps.
The routine above was some of the cleverest in the design but I can't take credit for it. A colleague gave me the algorithm when I described the problem to him. :-)
Gerry
On Mon, 20 Sep 2021, 20:44 Didier Leplae, <didierleplae at yahoo.com> wrote:
I’m not sure how successive approximation works.
But if you are hunting for the nearest note and some are further apart than others, won’t the result still be that some notes take longer to reach than others?
On Sep 20, 2021, at 2:19 PM, The SynthiMuse <synthimuse at gmail.com> wrote:
Hi Didier
I'm not sure how Jean-Pierre dealt with this issue but in the Synthimuse, I gave each note in the scale equal weight and 'hunted', by successive approximation to find the note that equated closest to the input value.
The SM had ( who knows, it may have again if I can get my finger out :-) ) an analog input so it's similar to the situation that Jean-Pierre is dealing with.
Gerry
On Mon, 20 Sep 2021, 19:45 Didier Leplae via Synth-diy, <synth-diy at synth-diy.org> wrote:
That’s really beautiful! I have a question for you.
I was working on a eurorack quantizer a while back but never finished. On mine, if I were doing like you are in the demo, feeding a slow triangle LFO into the quantizer, and having it set to a scale with some uneven intervals (for example any diatonic scale) then the time that each note holds is also uneven (proportional to the size of the interval.
I’m guessing you have programmed yours to compensate for this. Can you explain a bit about how that works? Also, how does this play out if you input a sequence with uneven durations for example?
> On Sep 20, 2021, at 8:54 AM, Jean-Pierre Desrochers <jpdesroc at oricom.ca> wrote:
>
> Thank you Roman !
>
> JP
>
> ******************************************************
>
> -----Message d'origine-----
> De : Roman Sowa [mailto:modular at go2.pl]
> Envoyé : 20 septembre 2021 05:46
> À : Jean-Pierre Desrochers; synth-diy at synth-diy.org
> Objet : Re: [sdiy] Introducing my new M116 Multi-Scale Quantizer !
>
> Always a pleasure to watch.
> Thanks for posting it.
>
> Roman
>
> W dniu 2021-09-17 o 20:55, Jean-Pierre Desrochers pisze:
>> Hi all !
>>
>> After around 4 months of work..
>>
>> Introducing my new *M116 Multi-Scale Quantizer* !
>>
>> It contains 25 selectable scales listed here:
>>
>> */Semi-Tones/*
>>
>> */Whole-Tones/*
>>
>> */Pentatonic major/*
>>
>> */Pentatonic minor/*
>>
>> */Heptatonic major/*
>>
>> */Heptatonic minor/*
>>
>> */Triad major/*
>>
>> */Triad augm./*
>>
>> */Triad minor/*
>>
>> */Triad dimin./*
>>
>> */Augmented/*
>>
>> */Diminished/*
>>
>> */Athar Kurd/*
>>
>> */Kumoi/*
>>
>> */Hon-Kumoi-Joshi/*
>>
>> */Egyptian/*
>>
>> */Nikriz/*
>>
>> */Persian/*
>>
>> */Hebrew/*
>>
>> */Dorian Mode/*
>>
>> */Phrygian Mode/*
>>
>> */Lydian Mode/*
>>
>> */Mixoydian Mode/*
>>
>> */Locrian Mode/*
>>
>> */Gypsy/*
>>
>> It also offers:
>>
>> 0 to +8.00vdc CV IN / OUT span
>>
>> Lag control on quantized output
>>
>> 12 transpose keys from G to F#
>>
>> Gate IN / OUT connectors
>>
>> MIDI output (16 channels)
>>
>> You can watch a Youtube demo HERE
>> <https://www.youtube.com/watch?v=UxPzGvb0HrQ>.
>>
>>
>> The fact that all generated quantized notes are ‘IN TUNE’
>> makes this module very ‘musical’..
>>
>> I’m very happy !!!
>>
>> Thanks for watching.
>>
>> JP
>>
>>
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
>> Selling or trading? Use marketplace at synth-diy.org
>>
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org
_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy
Selling or trading? Use marketplace at synth-diy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20210920/7e093d6f/attachment.htm>
More information about the Synth-diy
mailing list