CV Integer Voltage Adder - Patch or Module Ideas?

Alright, wizards, I’ve got one for you.

Now that I’ve got my extremely excellent @analogoutput Expression Pedal Interface working, I’d really like to compliment my playing with an idea I’ve got in mind…

I’m looking for a either a module or a patch which will add integer-value voltages to an input signal, where the value of the integer is proportional to an input control voltage. The idea being that I could be playing the keyboard with my hands and then use the foot pedal to change octave (this trick also works really good with envelopes, at least in VCV rack). Ideally, I’d like to do this without an arduino.

One thought is to use precise voltage dividers on the +12V line to make the +1/+2/+3/+4/+5 lines, then a VCA into a mixer… but wouldn’t that only work for two of the lines, and crossfade them? Hm, maybe that wouldn’t work. Is there a way to “round” a voltage? Maybe an ADC?

Any ideas?

4 Likes

Using an Arduino would be far easier than any non-microcontroller approach I can think of.

There are lots of precision adder modules out there but none voltage controlled that I happen to know of. What that entails is essentially a quantizer with two inputs, one gets quantized to integer rather than integer/12 voltages, and then it gets added to the other, non-quantized input. You could try to adapt a non-Arduino quantizer design but those tend to be gawdawful complicated. An Arduino version would be almost trivial by comparison.

5 Likes

Dang, I was hoping there was some magic way of rounding voltages that all properly trained electrical engineers knew about. I’ve been avoiding using any ardiunos in my box so far, but I think I’ll have to bite the bullet finally… thanks for your reply!

3 Likes

I guess you could rig up something with a chain of comparators limited by varying Zener diodes? I will ponder this thought.

4 Likes

Do you mean something like an analogue harmonizer?

1 Like

Wouldn’t a keyboard do the trick?
Each key adds some value to some starting voltage, doesn’t it?

4 Likes

are there github files for having these made ?

1 Like

Actually, now that I think about it, there’s an existing Kosmo module that I think would do almost exactly what you want. My Dual Quantizer. Set it to quantize to octaves, put the pedal CV into CV1, put the CV you want to add it to into CV2… well, CV2 has an attenuator which you don’t really want on a 1 V/oct signal. But maybe if you left that out?

But you’d have to get the board and panel fabbed, and it does have an Arduino, and it does way more than what you need (for starters, it has two quantizers), which means there are a lot more components than necessary, and at 10 cm wide it is kinda chunky for this job.

5 Likes

You could take inspiration from a VU meter:

Instead of driving leds you’d drive an R-2R DAC or something similar.
That’d do the integer value bit, then you’d just need to mix in whatever signal you’re trying to offset.

Good luck, keep us posted!

2 Likes

I have had a little think, If I was going to try I would

  • Use an ADC on the cv input,
  • The result of the ADC becomes the address for a multiplexer
  • Each input channel of the multiplexer has the required quantized values, ie 0v 1v 2v
  • Precision adder

I would hope this could be used to get a linear set of steps, they won’t step with inputs at exactly 1v, 2v 3v, but the spacing should be linear.

ADCs usually require additional clock and trigger signals that would also need to be included. I have found the easiest and cheapest way is just to use a microcontroller. The output of the microcontroller is used as the address lines for the multiplexer.

I’m not sure if my proposal gives any advantages over a microcontroller with a DAC, with the need to generate the reference voltages, a multiplexer, and a precision adder it would have a higher component count, not too sure of cost implications, the DAC needs to be very accurate to be used for pitch so maybe a little more expensive. By the time you have added input buffers and protection, I think both of these solutions may be overkill.

My next idea, for the output, you could try using PWM, and a lowpass filter on the output, you may be able to bo the whole thing with just a uController and a tl074, it would be easy to breadboard this and see if it suits your needs.

Sorry for pre coffee brain dump

2 Likes

This one

Vumeter

uses op amp comparator outputs to light up the LEDs. Those voltages will depend on the +12V rail, so will be unlikely to be suitable for 1 V/oct purposes. @Sonosus mentioned using Zeners to set the voltages — that might work, adding trim pots for tuning and an op amp buffer, or you could maybe even use TL431 adjustable voltage references. For a few octaves that might be reasonable, for more than a few it seems like it gets to be a lot of parts.

MCP4822 is $4.32 at Mouser, not the world’s cheapest chip but cheaper than a Big Mac, right? And you only need one. R2R is cheaper but good luck getting it precise enough. Or… maybe? If you only need 3 bits resolution for 8 octaves… sure, R2R might be the way to go. (Need a voltage reference though.)

With an Arduino I don’t think inputs need anything but a series resistor, probably a 1M pulldown, and maybe a pair of Schottkys to ground and +5 V if you don’t want to rely on the internal diodes. The DAC can send 0–+4 V directly to output, but you’d probably want an op amp buffer and an in-loop current limiting resistor. Only a couple resistors more to increase the voltage range if you want more octaves.

Might work, you just have to make sure you’re filtering hard enough to get the ripple down below audible level. In the writeup of the Kassutronics quantizer it says “Filtering the PWM signal properly is challenging, but using a 4th order buffered passive filter the results were satisfactory.”

Seems a little more complicated to me than a 4822 but apparently filtered PWM is more linear. You’d need the same input setup as above.

3 Likes

Check Sam’s 123ADC project for using an ADC without a microcontroller. He uses an external clock but an onboard 40106 oscillator ought to work fine. Maybe just send that straight to a 3-bit R2R, buffer the output, and you’re done? (Hm, I guess a TL074 would be enough to buffer output and generate a clock with two of the other op amps, no 40106 needed.)

2 Likes

This does sound like the simplest solution, eliminates the PWM ripple, and due to only 3 stages in the R2R could be really accurate. This solution would still need a precision adder, that could have been eliminated by using two ADC inputs on a microcontroller and doing the summing digitally, but with most microcontrollers only having a usable 8-bit conversion, this would somewhat limit the range of the incoming cv.

If I was to make this, I think I would be looking into your solution with an ADC, R2R, and a precision adder.

4 Likes