Before MIDI, and long before USB, different synthesisers used to talk to each other the same way that different parts of a single synthesiser did: using control voltages, gates, and triggers.
Triggers are straightforward enough: they're a short pulse sent when something happens, such as when a key is pressed on a keyboard, or when a drum sound is due to play on a drum machine. Usually, it's a 0V signal when nothing is happening, and a brief burst of +5V when something starts to happen, although there's no one true standard. Some manufacturers use +12V, and some have the voltage applied only when the trigger isn't occurring. I favour products by Roland and Doepfer, however, so 0V with the occasional +5V burst is enough for me to concentrate on.
Gates are like triggers, only they last for the duration of an event. For example, they last as long as a key is being held down on a keyboard, signifying how long a note should last.
Control voltages are used for everything else. They're analogue in the sense that they can be any voltage in a given range, not just on or off. You can use a control voltage to change the value of any one parameter over time, regardless of what that parameter is. It could be anything from the note's velocity, to the filter's cutoff point, or even the pitch of the note itself.
Continuing the theme of no real standards, different manufacturers allow control voltages in different ranges. About the safest is again 0V to +5V, as a lowest common denominator. Even with pitch specifically, there's no real consensus on which voltages represent which frequencies. Some manufacturers (most notably Korg and Yamaha) prefer a linear approach such as representing a set number of hertz per volt, such as 1kHz per volt. Almost everyone else prefers an exponential approach such as a set number of octaves per volt. (Remember that the human ear is exponential in how it perceives the volume and pitch of a sound, resulting in our representation of music being exponential too. Each time you play a note an octave higher, you're doubling its frequency.)
Even amongst the manufacturers embracing octaves per volt, there are several implementations, such as having 1.2 volts per octave (used by Buchla and EML), 0.32 volts per octave (used by EMS), or exactly 1 volt per octave (used by ARP, Doepfer, Moog, Roland, and many others). Again, as I'm primarily interested in equipment made by Roland and Doepfer, and as it's the closest there is to a standard, I'm going to concentrate on 1 volt per octave, or 1V/Oct for short.
Even then, there's still the matter of which pitch is represented by 0V. Almost everyone agrees it should be C (the Minimoog is a notable exception), but disagrees on which C. The most popular choice seems to be that 0V is C2 (embraced by Doepfer and Kenton), but this is by no means universally adopted.
I'm also going to assume we're interested in twelve tone equal temperament, otherwise we're opening a whole other can of worms.
Having settled on this particular version of the standard, it's pretty straightforward to convert a note's pitch into the voltage required, then convert that into an actual frequency. C is always represented by an integral voltage, so C1 is 0V, C2 is 1V, and so on. F♯ (being half way between two Cs) should be x.5V, and D♯ (being half way between C and F♯) should be x.25V, and so on. A range of 0 to +5V is good to aim for. It covers five octaves, and I believe 0 to +5V is the lowest common demoninator range that shouldn't blow anything up, providing you check whether the electricity's flowing from the ring to the tip or vice versa. I'm clearly not an expert at electronics, so this advice comes with absolutely no warranty whatsoever.
Basically, the simple formula to convert pitches into volts is V = P / 12, where V is the voltage to output and P is the pitch, 0 for C, 1 for C♯, and so on. We're literally dividing each octave into twelve equal parts. In Python terms:
for pitch in range(61): voltage = pitch / 12 print(voltage)
The oscillator then has to convert this into a frequency, F. If we use A4 = 440Hz = 2.75V as a reference point, we can use the formula F = 440 / 22.75 * 2V to work out the frequency of any voltage. Again, here's the Python equivalent:
for pitch in range(61): voltage = pitch / 12 frequency = 440 / 2 ** 2.75 * 2 ** voltage print(frequency)
This site's appendix includes a handy table listing the names, MIDI numbers, voltages, and frequencies of a range of pitches.