# CV QUANTIZER idea?

**URL:** <https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468>\
**Category:** Uncategorized\
**Created:** [March 28, 2020, 6:17pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468 "2020-03-28T18:17:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [March 28, 2020, 6:17pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/1 "2020-03-28T18:17:53Z")

</div>

I everybody (so sorry for my english i’m french, and i am struggling a little with this forum, but i like it and i try )  
is anyone have a way for a CV QUANTIZER diy with arduino nano please ?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [March 28, 2020, 6:23pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/2 "2020-03-28T18:23:13Z")

</div>

I’m working on ideas for exactly that, but it’ll be a while before I do it, I think!

Depends on what you want, of course — if you just want to quantize to an equal temperament chromatic scale that’s one thing, if you want to be able to select from various scales that’s another.

This

> **[Synapse - A DIY-friendly CV I/O shield for Arduino](http://www.shaduzlabs.com/blog/21/synapse-a-diyfriendly-cv-io-shield-for-arduino.html)**
>
> Synapse is a simple, diy-friendly Arduino shield that will allow you to expand your modular synthesizer in new and creative ways. Here's the hardware features:
> 
> 	
> 2 x control voltage inputs, 0 to 5V with diode protection
> 	
> 2 x control voltage...

  
looks like it could be useful for a lot of things, including quantizing, but I’m thinking about a modified version, among other things having more inputs and outputs.

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [March 28, 2020, 10:01pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/3 "2020-03-28T22:01:16Z")

</div>

thanks for your answer !

it will be better with some scales 😉

like this : [http://www.bartonmusicalcircuits.com/cvquant/](http://www.bartonmusicalcircuits.com/cvquant/)

the schematic seems very simple to make

but with an arduino will be better, to make it myself, because Pic ?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [March 28, 2020, 10:10pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/4 "2020-03-28T22:10:23Z")

</div>

Stop having those thoughts, those are MY thoughts! 😆

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [March 28, 2020, 10:21pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/5 "2020-03-28T22:21:44Z")

</div>

… I mean, yes, that’s a simple schematic, but you only get the one scale. Also it apparently uses PWM output and a filter, whereas I’d rather rely on a 12-bit DAC. If you dig a little you learn that quantizer’s virtue is simplicity but it’s not very accurate. (20 cent errors in places.) Barton does a couple other more accurate quantizers but they’re more complex.

Anyway presumably Synapse can do what the simple quantizer can do, but more accurately, and it has another analog input by which you could switch-select one of a number of scales. Given that the DAC has two channels, though, I’m thinking in terms of a dual quantizer, for which additional inputs would be needed.

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [March 28, 2020, 10:33pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/6 "2020-03-28T22:33:08Z")

</div>

ok, what’s Synapse please ?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [March 28, 2020, 10:35pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/7 "2020-03-28T22:35:21Z")

</div>

See previous post [CV QUANTIZER idea?](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/2)

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [March 28, 2020, 10:38pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/8 "2020-03-28T22:38:11Z")

</div>

yes sorry , i’m tired …

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [March 28, 2020, 11:27pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/9 "2020-03-28T23:27:22Z")

</div>

Do you need a quantizer for your modular setup?

---

<div class="post-metadata">

**Author:** ![antoine.pasde2](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/antoine.pasde2/32/326_2.png) [@antoine.pasde2](https://lookmumnocomputer.discourse.group/u/antoine.pasde2)\
**Post date:** [March 28, 2020, 11:54pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/10 "2020-03-28T23:54:31Z")

</div>

If PWM is good enough for the MIDImuso MIDI-to-CV converter, it is probably good enough for a quantizer, especially if you only want 1V/oct half step quantization where you need only 7-bit of resolution or less.  
In the Arduino you will need an analogue input (10 or 12bit ADC, is more than enough as you are reducing the resolution anyway) and an analogue output (7-bit PWM ).  
In the loop, you read the analogue input, round it to the nearest 7-bit value and output that.  
For a 12 bit ADC, something like this:  
Qout = min( 127, (Ain + 16) \>\> 5);

Edit: The circuit could probably fit in an ATTINY.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [March 29, 2020, 12:53am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/11 "2020-03-29T00:53:53Z")

</div>

True, if all you want is equal temperament semitones then to cover 10 octaves you need 120 values, equally spaced, which you can do with 7 bits as long as you calibrate carefully.

But there are a couple of other things you might want.

You might want to be able to turn quantization off, or as with Barton’s less-simple quantizers “soften” the quantization, i.e. morphing from unquantized to quantized.

Or you might be interested in tunings other than 12-equal temperament. (I am.)

Then it’s probably reasonable to demand precision of somewhere in the ballpark of 3 cents, or around 1/4000 of the full range, requiring 12 bit resolution.

---

<div class="post-metadata">

**Author:** ![Dud](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/dud/32/610_2.png) [@Dud](https://lookmumnocomputer.discourse.group/u/Dud)\
**Post date:** [March 29, 2020, 1:17am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/12 "2020-03-29T01:17:26Z")

</div>

i’ve just find this … but it’s in french  
[http://www.ozoe.fr/articles.php?lng=fr&pg=413&mnuid=316&tconfig=0](http://www.ozoe.fr/articles.php?lng=fr&pg=413&mnuid=316&tconfig=0)

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [March 29, 2020, 9:31am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/13 "2020-03-29T09:31:45Z")

</div>

I found this, and first thought maybe that is interesting:

[DIY CV Quantizer](https://www.youtube.com/watch?v=fsCPDR3WyNs)

The link below the video refers to a page in Japanese, after translation this leads to several dead dropbox pages but luckily the author used a repository that has preserved the code here:

[CVtoOSCConverter](https://os.mbed.com/users/casiotone401/code/CVtoOSCConverter/)

I’ve not found the schematic yet, however.

But then I had a look at [QUAD QUANTIZER](http://www.ozoe.fr/articles.php?lng=fr&pg=413&mnuid=316&tconfig=0) as well, and man o man, isn’t this all you ever wanted in terms of quantisation of control voltages?

---

<div class="post-metadata">

**Author:** ![philippejadin](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@philippejadin](https://lookmumnocomputer.discourse.group/u/philippejadin)\
**Post date:** [March 29, 2020, 10:55am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/14 "2020-03-29T10:55:32Z")

</div>

I made a quick test that works just fine based on this project : [https://github.com/elkayem/midi2cv](https://github.com/elkayem/midi2cv)

The CV output can be calibrated and uses an DAC. You could make a 4 output CV if you multiply the CV output circuit.

I added a CV input directly to the arduino analog input (it means it needs additional protection to not exceed the max 5v this input can take). The some very simple changes in the code.

Basically, you map the analog input (0-1023) to let’s say 0-88 (notes)  
Then you output the signal to the DAC

This is work in progress, but it worked fine in my testings. I will at some point release a complete project but I’m far from the lab currently :-/

Here is the interesting art of code :

```
// read 3 times to smooth out
cv = analogRead(A0) + analogRead(A0) + analogRead(A0);
cv = cv / 3;
Serial.println(cv);
delay(1); 
note = map(cv, 0, 900, 30, 70);
commandNote (note);
```

---

<div class="post-metadata">

**Author:** ![Jos](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/jos/32/151_2.png) [@Jos](https://lookmumnocomputer.discourse.group/u/Jos)\
**Post date:** [March 29, 2020, 11:26am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/15 "2020-03-29T11:26:56Z")

</div>

Hmm, the github project implements midi2cv, not a quantiser as such. However it could be the basis of a quantiser, but then you could loose the midi part and need to change the code quite a bit.

---

<div class="post-metadata">

**Author:** ![philippejadin](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@philippejadin](https://lookmumnocomputer.discourse.group/u/philippejadin)\
**Post date:** [March 29, 2020, 12:14pm UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/16 "2020-03-29T12:14:47Z")

</div>

yes that’s what I was trying to say :-). I made a fork of the code but it’s work in progress and I don’t have the schematic at hand curently. But if there is interest I can add more explanations. It’s more a proof of concept curently but it works fine already.

---

<div class="post-metadata">

**Author:** ![Farabide](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Farabide](https://lookmumnocomputer.discourse.group/u/Farabide)\
**Post date:** [April 1, 2020, 9:08am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/17 "2020-04-01T09:08:41Z")

</div>

Re-reading this thread I’m sure I came across a multi scale quantizer on github or someplace. I’ve found a reference in one of my many notebooks that also mentioned it’s of the PIC mcu variety, which probably meant I took it no further as I was never good at assembly language. That said if a hex file exists or code, then these days compilation and uploading to a PIC is just a little bit more difficult than a nano and no need to reinvent the wheel.  
Sorry I can’t find the project. It may be gone.  
I do have a superb MIDI merge PIC project on my to do list that I found on githib.

---

<div class="post-metadata">

**Author:** ![devicex](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/devicex/32/28_2.png) [@devicex](https://lookmumnocomputer.discourse.group/u/devicex)\
**Post date:** [April 1, 2020, 9:32am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/18 "2020-04-01T09:32:28Z")

</div>

[https://shop.musicfromouterspace.com/cart/Catalog%20MFOS/MFOS%20Voltage%20Quantizer%20Synth%20Module%20Bare%20PCB?limit=100](https://shop.musicfromouterspace.com/cart/Catalog%20MFOS/MFOS%20Voltage%20Quantizer%20Synth%20Module%20Bare%20PCB?limit=100) much easier than coding , at least for me .

---

<div class="post-metadata">

**Author:** ![Farabide](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Farabide](https://lookmumnocomputer.discourse.group/u/Farabide)\
**Post date:** [April 1, 2020, 9:40am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/19 "2020-04-01T09:40:18Z")

</div>

Ray to the rescue again!

---

<div class="post-metadata">

**Author:** ![devicex](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/devicex/32/28_2.png) [@devicex](https://lookmumnocomputer.discourse.group/u/devicex)\
**Post date:** [April 1, 2020, 10:04am UTC](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468/20 "2020-04-01T10:04:13Z")

</div>

dam that it has to be R.I.P. Mr Wilson.

[Next page](https://lookmumnocomputer.discourse.group/t/cv-quantizer-idea/468.md?page=2)
