Best way to set 1V/Oct CV out?

Hey all! I’m a novice to VCV development with a couple basic modules under my belt, trying to level up. I am trying to make a chord sequencer and I’m curious the best / most idiomatic way to set 1/V oct CV out based on note frequencies. I’ve looked at the quantizer example but the Euclidean division is a bit beyond me, unfortunately.

I could use a table and hardcode the values, but I suspect there’s a relatively simple formula (or VCV capability) to convert a note, e.g. A4, to a 1V/oct CV. I’ve tried reading the documentation but either I can’t find the right thing or I’m not understanding what I’m reading correctly. I think it has something to do with 2^x and logs, but I’m having a hard time getting over the conceptual hump / applying it in practice.

This is also defying my google skills. Anyone know/have opinions on the best way to do this in VCV, or can point me in the right direction?

Thank you!

Two things to keep in mind with notes:

1V/Oct standard means that notes are placed with 0.0833… volt intervals in the ±5V range.

If the frequency of a given note is known, the same note an octave up will exist at double that frequency, and an octave down at half that frequency.

To get the frequency of a voltage note, use:

dsp::FREQ_C4*simd::pow(2,Voltage);

C4 is commonly represented as 0V in the 1V/Oct standard.

Aha! Feel a bit silly, since that’s way simpler than i expected. So the voltage / note ratio is linear - the exponential scale is in the corresponding frequency.

Exactly. 1V/Oct is a linear mapping of the exponential frequency scale. Converting back and forth between them is a simple matter of exponentials and logarithms.