Has anyone implemented a pitch quantizer in Csound?
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Do you mean pitch quantizing aka autotune? Jeanette C. has a good one in the “Voice Processor UDOs” found here http://juliencoder.de/sound/index.html
Hi Dave and Thorin,
Thorin, thanks for the promotion.
Dave, in case you meant the quantiser as in the module to quantise continuous voltage to fixed pitches, I have something like that as well:
http://juliencoder.de/sound/scale_quantiser-1.1.zip
I think I have another implementation somewhere, with slightly different features. This set should have more than scale (including chromatic) quantisation. Namely, linear and possibly exponential. Sorry, I haven't looked at them in ages. ![]()
Best wishes,
Jeanette
I thought that you could just use cpsoct? It will do 1V per octave.
Ah, it won’t quantise. Too early in the morning.
Thanks, all! I should have been a little more specific – I’m looking for quantization of CV, specifically to microtonal scales, as opposed to auto-tune, which is quantization of audio. Thorin, thanks for reminding me of Jeanette’s collection of treasures, which I’ve been meaning to explore for quite a while. I think her Control Signal Quantizer is probably along the lines of what I’m looking for, but I will look at the Voice Processor code as well. As always, thanks to Jeanette for your expertise, and your generosity!
- Dave
Hi Dave,
I think you can adapt the control signal quantiser to use a microtonal scale. But I'm not entirely sure how much extra logic this would take. I use a logic of logarithms and exponentiation to achieve the modern 2^(1/12) grid. A microtonal scale with arbirary note distances would need some kind of table lookup and another mechanism to pull values to the closest table value.
I hope that this makes sense and gives you an idea.
Best wishes,
Jeanette
Thanks, Jeanette, I think that makes sense. I was just taking a quick look at the code, and I see what you’re talking about. If I come up with any modifications to enable microtonal scales, I will of course share them.
- Dave
Hi Dave,
I just had an idea: if you are working with modular systems, using an arbitrary CV signal, you could achieve something in an easier way. You can say that every 1/nth step equals one note, depending on how many notes you have in your scale. You can then use simple multiplication and rounding to get whole numbers:
kNote = round:k(kCV * iGradesPerOctave)
and then use the cpstun opcode. You can create microtonal scales with that that map whole number indicies to grades.
My quantisers assume an actual frequency in Hz coming in. These are then quantised to the nearest equal-tempered note frequency. With direct CV input, you can just introduce stepping, linear quantisation, which you can also find among the quantisers and use that to find a pitch in Hz.
My apologies for a slightly obfuscated description. It just came to me. ![]()
Best wishes,
Jeanette
Thanks, Jeanette, I think that makes sense. I do work with modular systems, sometimes together with Csound. It will be a while before I can actually dig into this (I’m preparing for a series of gigs), but I think this will really be helpful with a compositional idea I had last night and that I will eventually pursue.
I appreciate your help!
- Dave