Depending if your pitch reference is your lowest note or I the middle of the expected range you would take either of two approaches, but in either case you’d take 3 measurements initially. You assume there is a function of some form that represents the relationship between voltage you send and the pitch the oscillator plays. Assuming you are working with a v/Oct oscilator then I’d thing of this function as f(voltage) -> note in fractional octaves wrt a reference. Oscilators often have a reference point of 0V = C0 but sometimes 0V = C3 (the former expects positive pitch voltages, the latter, positive and negative). Let’s pick A4 as our reference; the note has a frequency of 440hz, so if we measure a pitch P then ln(P/440)/ln(2) = pitch in octaves relative to that reference.
So if we know the oscillator tracks over some voltage range (or is expected to) we take N measurements, uniformly distributed in voltage across that range (let’s go with 3: min, max, (Min+max)/2). We then assume a function exists mapping voltage to pitch like av^2 + bv + c = pitch (with pitch as I defined earlier). You now have a function with 3 unknowns (a, b & c) and 3 known values that lie on the curve (your 3 readings). You can therefore solve the equation for your unknowns providing your function that models the oscillator frequency response. Note that you’ll want to be able to make an inverse function (solve the equation) so a quadratic seemed obvious as there exists a closed form general solution.
You might want to pick a different function, to work directly in Hz, to take extra measurements in between to compare to your function, or take extra measurements and use all the measurements to make a line of best fit. In any case, in the end you’ll have an equation which represents the response of the oscillator. You then make the inverse function which now maps from a musical pitch referenced to A4 (or however you chose to represent pitch in the function), to a voltage needed by the oscilator to play that pitch.
Your function could be exponential using Hz, quartic or in whatever functional form you chose. You may also try and find the inverse function directly (it just seemed more intuitive to me the way I discussed). In any case it’s just a matter of matching a curve to a set of samples points: a well studied problem.
EDIT: note, the quadratic with 3 samples will precisely hit those 3 values, if there is a “must match” pitch reference (such as a4), you may chose to carry out this process, use it to predict the voltage at A4, then replace the nearest of the 3 samples reference points with this 4th sample and redo the calculation. This will allow for an exact match at that point. Also, if you use error minimisation methods, you may want to weight points in the “most important” pitch range more highly to avoid sacrificing that for notes on the extremes. Similarly testing at the maximum extents may not prove as accurate across the range as going to the 15th and 85th percentiles or similar. This leaves you extrapolating at the far ends, but this is okay.