```markdown
> **Note:** This is still a work in progress. Some content may be updated before class, but most of it will remain the same. Please take a look and read through it!
```
## From Manual Control to Voltage Control
Now we have two oscillators: the **phase-shift oscillator**, based on amplification and positive feedback, and the **reverse-avalanche oscillator**, based on RC charging and transistor avalanche breakdown. Both of them have **potentiometers** that allow us to change their frequency, and we can hear and see the output. It is very exciting that we can actually make experimental music with these circuits simply by turning a knob. However, what if we want to control three oscillators at the same time? Or ten? Or perhaps one hundred? We only have two hands, so changing the frequencies of many oscillators manually would quickly become difficult. Even if we had enough hands, turning a potentiometer is not a very precise or repeatable way to control a musical sequence. Imagine that we could tell one oscillator to produce $220\text{ Hz}$, another to produce $330\text{ Hz}$, and another to produce $440\text{ Hz}$. We could then change all of them whenever we wanted. We could program a sequence of frequencies. We could synchronize several oscillators. We could create melodies. We could even begin to think about building a **computer-controlled synthesizer**. However, before we think about writing an app, we have to solve a more fundamental problem. Our oscillator currently understands only one kind of instruction: physically turn the potentiometer.
A smartphone or computer cannot physically turn the potentiometer for us. So we need another way to control the oscillator. This leads us to an important question: **Can we control the frequency of an oscillator using voltage?** If the answer is yes, then we can eventually generate that voltage electronically using a **microcontroller**, **digital-to-analog converter**, or another circuit. That would allow us to replace our hands with a program. Before we get there, however, we need to understand what is happening at the electrical level.
## Controlling the Reverse-Avalanche Oscillator
Let's go back to our **reverse-avalanche oscillator** and think about how we changed its frequency before. It was quite simple: we turned the potentiometer, but what was the potentiometer actually doing? The potentiometer was changing the **resistance in the capacitor-charging path**. Changing the resistance changes the current available to charge the capacitor. When the resistance is higher, less current flows and the capacitor charges more slowly. It therefore takes longer to reach the voltage at which the transistor enters **avalanche breakdown**. The oscillator produces fewer cycles per second, so its frequency decreases. When the resistance is lower, more current flows. The capacitor charges more quickly, reaches the avalanche voltage sooner, and the oscillator produces more cycles per second. So the potentiometer is not really controlling the frequency directly. It is controlling the **charging current**, which controls the **charging time**, which ultimately controls the **frequency**. We can therefore think of the process as:
$R \longrightarrow I_{\text{charge}} \longrightarrow t_{\text{charge}} \longrightarrow f$
This gives us a useful idea. **If we can control the charging current electronically, we can control the oscillator frequency electronically.** So, how can we control current without physically turning a potentiometer? One possible answer is: **A transistor.**
## Transistor as a Switch
We have already seen that a **transistor** can be used as a switch. Under appropriate conditions, a voltage applied to the base of a **BJT** (Bipolar Junction Transistor) can control the current flowing between its collector and emitter. This is extremely useful in digital electronics. So, a transistor can be used to represent an **on or off state**, and millions or billions of transistors can be combined to perform computations. However, for our oscillator, simply turning current on and off is not enough. We do not want only:
$I = \text{OFF}$
or:
$I = \text{ON}$
We want something more like:
$\text{small current} \longrightarrow \text{larger current} \longrightarrow \text{even larger current}$
In other words, we want to use the transistor as a **continuously controllable current device**. For a BJT, one useful operating region for this purpose is the **forward-active region**.
## Transistor as a Current-Control Device
A **BJT** (bipolar junction transistor) has three terminals: **Base**, **Collector**, and **Emitter**. When a BJT is operating in the **forward-active region**, its collector current depends approximately exponentially on the base-emitter voltage. An idealized relationship is:
$
I_C \approx I_S\left(e^{V_{BE}/V_T}-1\right)
$
>[!note:]
>When the transistor is conducting substantial forward current, the exponential term is much larger than 1, so we often simplify the equation to $I_C \approx I_S e^{V_{BE}/V_T}$.
where:
* \(I_C\) is the **collector current**
* \(I_S\) is a **transistor-dependent scale current**
* \(V_{BE}\) is the **base-emitter voltage**
* \(V_T\) is the **thermal voltage**
At room temperature:
$
V_T \approx 25.9\text{ mV}
$
The equation may look complicated, but we do not need to understand every detail. The important idea is that **a relatively small change in base-emitter voltage can produce a large change in collector current** because of the exponential relationship. This is particularly interesting for our project because we want to **convert a voltage into a controlled current**. A circuit designed to convert an input voltage into a controlled current is often called a **voltage-controlled current source** (VCCS). A BJT can be used as part of a circuit that converts an input voltage into a controlled current: **the input voltage can influence $V_{BE}$, which in turn controls the collector current**. This nonlinear relationship will become especially useful when we start building a circuit that converts **control voltage (CV) into current**.
## From Potentiometer to Control Voltage
Let's compare what we had before with what we are trying to build. With the potentiometer, we had:
$\text{Knob position} \longrightarrow R \longrightarrow I \longrightarrow t_{\text{charge}} \longrightarrow f$
Now imagine that we replace the physical knob with a voltage:
$V_{\text{control}} \longrightarrow \text{transistor circuit} \longrightarrow I \longrightarrow t_{\text{charge}} \longrightarrow f$
This is a very important change because we have separated the **control signal** from the **physical control mechanism**. The oscillator no longer needs to know whether the control voltage came from a potentiometer, a keyboard, a microcontroller, or a computer. As long as the circuit produces the appropriate control voltage, the oscillator can respond to it. This is the basic principle of a **voltage-controlled oscillator (VCO): a control voltage is used to change a parameter that determines the oscillator's frequency.**
>[!Further Understanding]
# Envelopes and Voltage Control
A musical sound does not remain constant from beginning to end. It **starts, changes, sustains, and ends**. The pattern describing how a sound's properties change over time is called an **envelope**. In analog synthesis, these changes can be produced as **control voltages (CV)** that continuously manipulate parameters such as amplitude, pitch, and harmonic content.
## 1. Amplitude Envelope
The **amplitude envelope** describes how the amplitude of a sound changes over time:
$
A(t)
$
A typical musical sound can be represented as:
$
\text{Attack}\rightarrow\text{Decay}\rightarrow\text{Sustain}\rightarrow\text{Release}
$
The envelope strongly affects the **character and articulation** of a sound. A **transient** is a short, rapid change in a sound, often occurring at its beginning. Examples include a piano hammer striking a string, a drumstick hitting a drum, or a guitar string being plucked. Transients help establish the **identity and articulation** of a sound.
## 2. ADSR and AHDSR
The most common envelope model is **ADSR**:
* **Attack:** Time to rise to the maximum level
* **Decay:** Time to fall from the maximum to the sustain level
* **Sustain:** Level maintained while the note is held
* **Release:** Time to fall from the sustain level to zero
> **Attack, Decay, and Release are time parameters; Sustain is a level.**
**AHDSR** adds a **Hold** stage:
$
\text{Attack}\rightarrow\text{Hold}\rightarrow\text{Decay}\rightarrow\text{Sustain}\rightarrow\text{Release}
$
Hold specifies how long the envelope remains at its maximum level before beginning the decay.
## 3. Envelope Generator and VCA
An **envelope generator** produces a time-varying control signal according to an envelope shape. A **Voltage-Controlled Amplifier (VCA)** uses a control voltage to change the amplitude of an audio signal:
$
V_{\text{out}}=G(V_{\text{CV}})V_{\text{in}}
$
An envelope generator can therefore control a VCA:
$
\boxed{\text{Envelope Generator}\rightarrow\text{VCA}\rightarrow\text{Amplitude}}
$
If the oscillator continuously produces a waveform:
$
x(t)
$
the envelope can shape its amplitude:
$
y(t)=A(t)x(t)
$
The oscillator provides the continuous sound, while the envelope gives it **musical articulation**.
## 4. Voltage Control and VCF
Control voltage can also change the **frequency content** of a sound. A **Voltage-Controlled Filter (VCF)** has a parameter, such as cutoff frequency, that depends on a control voltage:
$
f_c=f_c(V_{\text{CV}})
$
For a low-pass filter:
$
f_c\downarrow \Rightarrow \text{less high-frequency content}
$
$
f_c\uparrow \Rightarrow \text{more high-frequency content}
$
An envelope can therefore control the filter:
$
\boxed{\text{Envelope Generator}\rightarrow\text{VCF}\rightarrow\text{Timbre}}
$
This allows a sound to become brighter during its attack and darker during its decay, for example.
## 5. LFO
An **LFO (Low-Frequency Oscillator)** is another source of control voltage. Unlike an audio oscillator, it is primarily used to produce a **slow periodic modulation signal**:
$
x_{\text{LFO}}(t)=A\sin(2\pi f_{\text{LFO}}t)
$
An LFO can modulate:
* **VCO frequency** → vibrato
* **VCF cutoff** → repeating filter sweep
* **VCA amplitude** → tremolo
Unlike an envelope, which normally follows a one-shot shape for each note, an LFO typically produces a **repeating periodic modulation**.
## 6. Putting the Pieces Together
A basic subtractive synthesizer can be represented as:
$
\boxed{\text{VCO}\rightarrow\text{VCF}\rightarrow\text{VCA}\rightarrow\text{Output}}
$
The:
* **VCO** generates the waveform
* **VCF** shapes its harmonic content
* **VCA** controls its amplitude
* **Envelope generator** provides changing control voltages
* **LFO** provides repeating control voltages
Together, these systems allow us to **generate, shape, and control** sound over time.
---
## Frequency and Musical Pitch
**Frequency** describes how many times a periodic oscillation repeats per second, and we measure it in **Hertz ($\text{Hz}$)**. The musical note $A_4$ is conventionally defined as:
$A_4 = 440\text{ Hz}$
in modern standard tuning. One octave below $A_4$ is:
$A_3 = 220\text{ Hz}$
and one octave above it is:
$A_5 = 880\text{ Hz}$
Notice something interesting. Going from $A_3$ to $A_4$ doubles the frequency:
$220 \longrightarrow 440$
Going from $A_4$ to $A_5$ also doubles the frequency:
$440 \longrightarrow 880$
Another octave gives:
$1760\text{ Hz}$
So the sequence is:
$220,\ 440,\ 880,\ 1760,\ldots$
This is not a **linear sequence**. If frequency increased by a fixed amount for every octave, we might expect:
$220,\ 440,\ 660,\ 880,\ldots$
But that is not how musical octaves work. Every octave corresponds to a **frequency ratio** of:
$2:1$
Therefore:
$f_{\text{next octave}} = 2f$
This means that equal musical intervals correspond to **multiplicative changes in frequency**. That is why an **exponential voltage-to-frequency relationship** can be useful in a musical VCO.
## Linear Control vs. Exponential Control
Suppose our control voltage increases by the same amount each time:
$0\text{ V},\ 1\text{ V},\ 2\text{ V},\ 3\text{ V}$
With a **linear voltage-to-frequency relationship**, we might have:
$100\text{ Hz},\ 200\text{ Hz},\ 300\text{ Hz},\ 400\text{ Hz}$
The frequency increases by the same amount for every additional volt, but suppose we want every additional volt to represent one octave. Then we might want:
$100\text{ Hz},\ 200\text{ Hz},\ 400\text{ Hz},\ 800\text{ Hz}$
Now each additional volt doubles the frequency. This is an **exponential relationship**. So we have arrived at an important idea that **a musical VCO often uses an exponential voltage-to-frequency relationship so that equal voltage intervals can correspond to equal musical intervals.** This is one reason the **exponential behavior of a BJT** is interesting to us. However, before returning to the transistor, let's look at another place where logarithms appear in audio: **decibels**.
## Decibels: Another Use of Logarithmic Thinking
We have just seen that musical pitch is naturally described in terms of **frequency ratios**.
For example:
$\frac{440}{220} = 2$
An octave corresponds to a frequency ratio of $2:1$. A similar idea appears when we describe audio levels using **decibels ($\text{dB}$)**. The decibel is a **logarithmic way of expressing a ratio between two physical levels**. For power:
$L_{\text{dB}} = 10\log_{10}\left(\frac{P_2}{P_1}\right)$
For example, if the power increases by a factor of 10:
$\frac{P_2}{P_1} = 10$
then:
$L_{\text{dB}} = 10\log_{10}(10) = 10\text{ dB}$
If the power increases by a factor of 100:
$L_{\text{dB}} = 10\log_{10}(100) = 20\text{ dB}$
So:
$+10\text{ dB} \longrightarrow 10\times\text{ power}$
and:
$+20\text{ dB} \longrightarrow 100\times\text{ power}$
A smaller change is also useful to remember. For approximately twice the power:
$10\log_{10}(2) \approx 3.01\text{ dB}$
Therefore:
$+3\text{ dB} \approx 2\times\text{ power}$
The important point is that **decibels do not represent an absolute amount of power by themselves**. They describe a **ratio between two levels**.
## Power, Voltage, and Sound Pressure
There is another detail that often causes confusion. For **power ratios**, we use:
$L_{\text{dB}} = 10\log_{10}\left(\frac{P_2}{P_1}\right)$
For quantities such as **voltage** or **sound-pressure amplitude**, we commonly use:
$L_{\text{dB}} = 20\log_{10}\left(\frac{A_2}{A_1}\right)$
where $A$ represents an **amplitude quantity**. Why does the formula use 20 instead of 10? For a resistor with resistance $R$:
$I = \frac{V}{R}$
and therefore:
$P = VI = \frac{V^2}{R}$
If the resistance is the same for both measurements:
$\frac{P_2}{P_1} = \left(\frac{V_2}{V_1}\right)^2$
Substituting this into the power-ratio equation gives:
$L_{\text{dB}} = 10\log_{10}\left[\left(\frac{V_2}{V_1}\right)^2\right]$
Using:
$\log_{10}(x^2) = 2\log_{10}(x)$
we obtain:
$L_{\text{dB}} = 20\log_{10}\left(\frac{V_2}{V_1}\right)$
Therefore, the factor of **20** appears because electrical power is proportional to the **square of voltage** when the relevant resistance remains constant. For example, if voltage doubles:
$\frac{V_2}{V_1} = 2$
then:
$20\log_{10}(2) \approx 6.02\text{ dB}$
Therefore:
$+6\text{ dB} \approx 2\times\text{ voltage amplitude}$
This does not mean twice the perceived loudness. That is an important distinction.
## Decibels Are Not Perceived Loudness
It is tempting to think that because decibels use a logarithm, human hearing must simply be logarithmic. It is not that simple. The **decibel** is a mathematical way of describing a ratio between physical quantities. **Perceived loudness** is a **psychoacoustic phenomenon**. Human hearing responds differently to different frequencies. Two tones can have the same physical sound-pressure level but be perceived as having different loudness. For example, a low-frequency tone and a mid-frequency tone may need different physical sound levels to be perceived as equally loud. This can be visualized using **equal-loudness contours**.

These contours show the sound-pressure levels required at different frequencies for tones to be perceived as approximately equally loud. The important lesson is:
$\text{physical level} \neq \text{decibel value} \neq \text{perceived loudness}$
A roughly $10\text{ dB}$ increase is sometimes used as a rough rule of thumb for a perceived doubling of loudness under particular conditions, but this is not a universal law. Perceived loudness depends on **frequency, level, duration, spectrum, and the listener**. Therefore, when we say that logarithms are useful in audio, we should not conclude that "the ear is simply logarithmic." Instead, logarithms are useful because many important relationships in audio involve **ratios and multiplicative changes**.
>[!Further Understanding]
# Sound Level and Distance
When we talk about the physical strength of a sound wave, we must distinguish between several related quantities: **sound power, sound pressure, and sound intensity**.
- **Sound power** ($W$) is the total acoustic energy radiated by a sound source per second. It is measured in **watts ($\text{W}$)** and is an intrinsic property of the source under specified operating conditions, somewhat like the total optical power emitted by a light source.
- **Sound pressure** ($p$) is the local pressure fluctuation in the air caused by the sound wave. It is measured in **Pascals ($\text{Pa}$)** and is the physical quantity that directly acts on an eardrum or microphone diaphragm.
- **Sound intensity** ($I$), measured in **watts per square meter ($\text{W/m}^2$)**, describes the acoustic power flowing through a unit area. Unlike sound power, which describes the total acoustic output of a source, sound intensity describes how that acoustic energy is distributed through space.
Because human hearing spans an enormous dynamic range, we often describe sound pressure using a logarithmic scale called **Sound Pressure Level (SPL)**:
$
L_p = 20\log_{10}\left(\frac{p}{p_0}\right)
$
where:
$
p_0 = 20\,\mu\text{Pa}
$
is the standard reference sound pressure used for sound-pressure-level measurements in air. This reference is approximately associated with the threshold of hearing for a young, healthy listener around $1,\text{kHz}$, although the actual threshold of hearing varies with frequency and from person to person. As sound propagates away from an ideal point source in an open, unbounded environment, or **free field**, its energy expands across an approximately spherical wavefront. The surface area of a sphere increases with the square of its radius:
$
A = 4\pi r^2
$
This geometric expansion leads to two important relationships. For an ideal point source in a free field, **sound intensity** decreases according to the inverse-square law:
$
I \propto \frac{1}{r^2}
$
while **sound pressure amplitude** decreases approximately in proportion to the inverse of distance:
$
p \propto \frac{1}{r}
$
These relationships are connected because, under appropriate conditions, acoustic intensity is proportional to the square of sound pressure. The pressure relationship also gives us the familiar **6 dB per doubling of distance** rule. If the distance from an ideal point source doubles, the pressure becomes approximately half as large:
$
\frac{p_2}{p_1} = \frac{1}{2}
$
Therefore:
$
\Delta L_p=20\log_{10}\left(\frac{1}{2}\right)\approx -6.02\,\text{dB}
$
So, in an ideal free field, **doubling the distance from a point source reduces the sound pressure level by approximately $6,\text{dB}$.** This rule should not be applied blindly to every real-world environment. Nearby surfaces, source directionality, atmospheric effects, reflections, and other sources can all change the actual result.
## Sound in Enclosed Spaces
In an enclosed space, boundary reflections change how sound behaves with distance. Close to the source, the **direct sound** usually dominates over reflected sound. This region is often called the **direct field**. In this region, the sound pressure generally follows the inverse-distance relationship more closely, although the exact behavior depends on the source and environment. As the source continues to radiate acoustic energy into the room, sound reflects from walls, ceilings, floors, and other surfaces. These reflections can occur repeatedly, causing acoustic energy to build up in the room until the average energy supplied by the source is balanced by the energy absorbed or otherwise lost by the room. Farther from the source, the reflected sound can become comparable to or greater than the direct sound. When many reflections overlap, the room can develop a more diffuse **reverberant field**. In an idealized diffuse reverberant field, the average sound pressure level is approximately independent of distance from the source. This is very different from the direct field, where sound pressure generally decreases as distance from the source increases. The spatial distance at which the direct sound energy and reverberant sound energy are approximately equal is called the **critical distance**. The concept can therefore be visualized as:
$
\boxed{\text{Source}\rightarrow\text{Direct field}\rightarrow\text{Critical distance}\rightarrow\text{Reverberant field}}
$
The boundaries are not perfectly sharp in a real room, but this model is extremely useful for understanding how direct and reflected sound interact. We don't study these spatial relationships merely as textbook formulas. They determine how we position microphones, design listening environments, place loudspeakers, and evaluate audio equipment. A microphone placed close to a sound source is usually dominated by the **direct sound**, producing a relatively dry recording with less influence from the room. Moving the microphone farther away generally increases the relative contribution of reflected sound, allowing more of the room's acoustic character and reverberation to become part of the recording. Ultimately, understanding sound level and distance means understanding how **acoustic energy is distributed through space** and how the environment changes what reaches our ears or a microphone.
---
## Why Is the Transistor Exponential?
Now let's return to our project. We have seen that musical pitch and frequency have an **exponential relationship**. Interestingly, a BJT also has an approximately exponential relationship between **collector current** and **base-emitter voltage** under appropriate operating conditions:
$I_C \approx I_S e^{V_{BE}/V_T}$
This is potentially very useful. If we can use a control voltage to change $V_{BE}$, and the transistor converts that voltage into a changing current, then we have a way to create a **voltage-controlled current**. However, we should be careful because we cannot simply say, "the transistor is exponential, therefore the oscillator frequency will be exponential." There are several steps between the transistor current and the oscillator frequency. The transistor changes a current, and that current affects how quickly a capacitor charges. Then, the capacitor voltage changes with time, and the oscillator reaches a threshold. The capacitor then discharges. The process repeats. So the complete chain is more like:
$V_{\text{control}} \longrightarrow V_{BE} \longrightarrow I_C \longrightarrow \frac{dV_C}{dt} \longrightarrow t_{\text{cycle}} \longrightarrow f$
We need to understand each of these steps.
## Current Controls Capacitor Charging
One of the most useful equations for understanding our oscillator is:
$
I = C\frac{dV}{dt}
$
where:
* $I$ is **current through the capacitor**
* $C$ is **capacitance**
* $V$ is the **voltage across the capacitor**
* $t$ is **time**
Rearranging:
$
\frac{dV}{dt} = \frac{I}{C}
$
This tells us something very important. For a fixed capacitor, increasing the charging current increases the rate at which the capacitor voltage changes.
Therefore:
$
I\uparrow \quad\implies\quad \frac{dV}{dt}\uparrow
$
The capacitor voltage rises more quickly.
So:
$
I\uparrow
\quad\implies\quad
t_{\text{charge}}\downarrow
\quad\implies\quad
f\uparrow
$
Likewise:
$
I\downarrow
\quad\implies\quad
t_{\text{charge}}\uparrow
\quad\implies\quad
f\downarrow
$
This gives us a much cleaner way to think about the oscillator. Instead of directly controlling frequency, we can control the **current** that determines how quickly the capacitor moves toward its threshold.
## From Charging Time to Frequency
Suppose, for simplicity, that the capacitor needs to change by a fixed voltage:
$
\Delta V
$
and that it is charged by an approximately constant current $I$. Starting with:
$
I = C\frac{dV}{dt}
$
we can write approximately:
$
I \approx C\frac{\Delta V}{\Delta t}
$
Rearranging:
$
\Delta t \approx \frac{C\Delta V}{I}
$
If the capacitance $C$ and voltage change $\Delta V$ remain fixed, then $C\Delta V$ is a constant. Therefore:
$
t_{\text{charge}}\propto\frac{1}{I}
$
> [!NOTE]
> When we use the proportionality symbol ($\propto$), we omit the **constant of proportionality** because we are focusing on the relationship between the variables. We are **not** assuming that the constant is equal to $1$.
For example, the equation
$
t = \frac{C\Delta V}{I}
$
can be written as:
$
t = \frac{K}{I}
$
where:
$
K=C\Delta V
$
Since $K$ is constant:
$
t\propto\frac{1}{I}
$
In other words, if the charging current doubles, the charging time is approximately cut in half. Because frequency is the inverse of the period:
$
f=\frac{1}{T}
$
we need to relate the charging time to the oscillator's period. In our simplified model, we assume that the charging time dominates the period:
$
T\approx t_{\text{charge}}
$
Therefore:
$
f=\frac{1}{T}
\propto
\frac{1}{t_{\text{charge}}}
$
Since:
$
t_{\text{charge}}\propto\frac{1}{I}
$
we obtain:
$
\boxed{f\propto I}
$
under this **simplified constant-current model**. This result is extremely useful because it means that if we can make the charging current increase exponentially with our control voltage:
$
I\propto e^{V_{\text{control}}/V_T}
$
then the frequency can also become approximately exponential:
$
f\propto e^{V_{\text{control}}/V_T}
$
under the appropriate oscillator assumptions. Now the connection between the transistor and musical pitch becomes much clearer:
$
\boxed{
V_{\text{control}}
\rightarrow
I_{\text{charge}}
\rightarrow
\frac{dV_C}{dt}
\rightarrow
t_{\text{charge}}
\rightarrow
T
\rightarrow
f
}
$
The transistor provides a possible **voltage-to-current relationship**. The current controls the **capacitor charging rate**. The charging rate controls the **timing** of the oscillator, and the timing controls its **frequency**. This is the basic principle that allows a voltage to control the frequency of an oscillator.
## But There Is a Problem
At this point, it may look as though we have solved everything.
We have:
* a **control voltage**
* a **transistor**
* a **changing current**
* a **capacitor**
* an **oscillator**
* an **exponential relationship**
However, a real circuit is more complicated. The BJT relationship depends on **temperature** and **transistor characteristics**. The transistor also has finite output resistance and other non-ideal behavior. Our reverse-avalanche oscillator is not an ideal constant-current timing circuit either. Its frequency can depend on several factors, including:
* **supply voltage**
* **transistor avalanche characteristics**
* **capacitor value**
* **charging current**
* **discharge behavior**
* **leakage currents**
* **temperature**
* **component tolerances**
Therefore, we should not expect to connect a BJT to our existing oscillator and automatically obtain a perfectly calibrated musical VCO. Instead, we have learned something more important. The transistor gives us a possible way to **convert a control voltage into a controlled current**, and that is the principle we want to explore experimentally.
## Our Goal: A Somewhat Working VCO
The goal of this experiment is not to build a professionally calibrated synthesizer VCO. Commercially available VCOs can have different tuning systems and a variety of additional functions. Instead, we want to build something much simpler: a circuit where **changing a control voltage changes the oscillator frequency**. If the circuit works reasonably well, we should be able to turn a potentiometer, observe the control voltage with a multimeter, and hear the oscillator frequency change. This is already a significant step. We are moving from:
$\text{hand} \longrightarrow \text{knob} \longrightarrow \text{resistance}$
toward:
$\text{control voltage} \longrightarrow \text{transistor} \longrightarrow \text{current} \longrightarrow \text{frequency}$
Eventually, the control voltage does not have to come from our hand. It could come from another circuit, or it could come from a microcontroller. It could come from a digital-to-analog converter, or eventually, it could come from a computer. That is where this experiment starts becoming a bridge between **analog electronics**, **synthesis**, and **computation**.
>[!Further Understanding]
## Equal Temperament
When we divide an octave into smaller musical intervals, we need a system for deciding the exact frequency ratio between notes. One widely used system is **equal temperament**, in which the octave is divided into 12 equal semitone steps. This system is called **12-tone equal temperament (12-TET)**. An octave is the interval between two frequencies where the higher frequency is exactly twice the lower frequency:
$
\frac{f_2}{f_1} = 2
$
In 12-TET, this octave is divided into 12 equal logarithmic intervals. A semitone is therefore associated with the frequency ratio:
$
1\text{ semitone} = 2^{1/12}
$
Numerically,
$
2^{1/12} \approx 1.05946
$
A whole tone consists of two semitones, giving a ratio of:
$
2^{2/12} = 2^{1/6} \approx 1.12246
$
The important point is that **equal temperament divides the octave equally in frequency ratio, not by equal differences in Hz**. Each semitone multiplies the frequency by the same factor.This allows the same interval structure to be transposed to different keys without retuning the instrument. Because the intervals are mathematically adjusted rather than based entirely on simple natural frequency ratios, this system is called **tempered tuning**.
## Just Intonation
An alternative tuning system is **just intonation**, sometimes called natural tuning or harmonic tuning informally. Instead of dividing the octave into equal logarithmic steps, just intonation chooses intervals using simple whole-number frequency ratios that are closely related to the harmonic series. For example, the octave has a ratio of:
$
\frac{2}{1}
$
and the perfect fifth has a ratio of:
$
\frac{3}{2}
$
These simple ratios produce strongly consonant just intervals because the frequencies have simple relationships with one another. The main difference is that **equal temperament prioritizes consistent spacing between all keys**, while **just intonation prioritizes simple harmonic relationships between particular notes**.
## Just vs. Equal Temperament
| Interval | Just Intonation | 12-TET | Approx. difference |
|---|---:|---:|---:|
| Octave | $2/1=2.0000$ | $2^{12/12}=2.0000$ | 0 cents |
| Fifth | $3/2=1.5000$ | $2^{7/12}\approx1.4983$ | −2 cents |
| Fourth | $4/3\approx1.3333$ | $2^{5/12}\approx1.3348$ | +2 cents |
| Major third | $5/4=1.2500$ | $2^{4/12}\approx1.2599$ | +14 cents |
| Minor third | $6/5=1.2000$ | $2^{3/12}\approx1.1892$ | −16 cents |
Here, a **cent** is a logarithmic unit used to describe small musical intervals. One semitone in 12-TET contains 100 cents, so an octave contains 1200 cents. The octave is identical in both systems, but the smaller intervals differ. The differences are particularly noticeable for the major and minor thirds. This is one reason why the two tuning systems can produce subtly different harmonic colors.
---
## Build It as Shown in the Schematic
![[Quasi Exponential Converter.png]]
To build our somewhat working VCO, we need:
* $1 \times$ NPN transistor (**2N3904** or similar)
* $1\times 1\text{ k}\Omega$ **potentiometer**
* $1\times 41.2\text{ k}\Omega$ **resistor**
* $1\times 3\text{ k}\Omega$ **resistor**
* $1\times 470\Omega$ **resistor**
* **Wires**
* **Breadboard**
Connect the components as shown in the VCO schematic above. Connect the VCO transistor to the appropriate points in the reverse-avalanche oscillator, according to the schematic, and then power the circuit. Now slowly turn the potentiometer. If everything is connected correctly, you should be able to hear the oscillator frequency change as you turn the knob. This is our first experimental **VCO**, so it may not be perfectly linear. It may not have a perfectly exponential response either, and it may not be stable or accurately calibrated. Anyway, that is all okay. The important thing is that we have changed the **control method**. Instead of directly changing the resistance in the oscillator's timing path, we are using a voltage to influence a transistor, which changes the current and therefore changes the oscillator's behavior. Now let's look more closely at where that control voltage comes from.
## The Role of the Potentiometer
Look closely at how the potentiometer is connected compared with how we used it in the previous oscillator. Previously, we used only two of the three terminals because we were using the potentiometer as a **variable resistor**. This time, we are using all three terminals. This configuration allows the potentiometer to act as a **voltage divider**. Before learning about voltage dividers, let's think about what the potentiometer is actually doing. When we turn the potentiometer, the resistance between the **wiper** and each end terminal changes. Because the two ends of the potentiometer are connected to different voltages, the wiper produces a voltage that changes as we turn the knob. The middle terminal is called the **wiper**. Depending on its position, the wiper voltage moves between the voltages established at the two ends of the potentiometer. This gives us a convenient way to generate a **variable control voltage**. In our circuit, this control voltage is connected to the transistor's base. If the transistor is biased appropriately, changing the base voltage changes the **base-emitter voltage**:
$V_{BE} = V_B - V_E$
and therefore changes the transistor current. So the conceptual chain is:
$V_{\text{control}} \longrightarrow V_{BE} \longrightarrow I_C \longrightarrow \text{capacitor charging} \longrightarrow f$
The potentiometer therefore gives us a simple manual way to generate the **control voltage**. Later, we will use the voltage from this potentiometer as a **bias voltage** that keeps the transistor turned on. This means that when we connect an external CV (control voltage) device, even the lowest CV value (0 V or near 0 V) can still keep the transistor turned on. So, eventually, we want to combine this bias voltage with an electronically generated control voltage from another device.
## Voltage Divider
A **voltage divider** uses resistances to produce an output voltage that is a fraction of an input voltage. For an ideal voltage divider consisting of two resistances:
$V_{\text{out}} = V_{\text{in}} \frac{R_2}{R_1+R_2}$
where $R_1$ is the resistance between the supply and the output, and $R_2$ is the resistance between the output and ground. The important idea is that the output voltage depends on the **relative resistance above and below the output point**. At first, we might think that placing a $1\text{ k}\Omega$ potentiometer in the middle would give us half of a $9\text{ V}$ supply:
$V_{\text{out}} = 9 \times \frac{500}{1000} = 4.5\text{ V}$
But that would only be true if the potentiometer were connected directly between $9\text{ V}$ and ground. Our circuit is different. We also have a $41.2\text{ k}\Omega$ resistor and a $3\text{ k}\Omega$ resistor connected to the two ends of the potentiometer. These resistors therefore become part of the **voltage-divider network**. When the $1\text{ k}\Omega$ potentiometer is approximately in the middle, its resistance is divided into two approximately equal sections:
$R_{\text{pot,upper}} \approx 500\ \Omega$
and:
$R_{\text{pot,lower}} \approx 500\ \Omega$
Therefore, the approximate resistance above the wiper is:
$R_1 = 41,200 + 500 = 41,700\ \Omega$
The approximate resistance below the wiper is:
$R_2 = 3,000 + 500 = 3,500\ \Omega$
Therefore:
$V_{\text{out}} = 9 \times \frac{3500}{41700+3500}$
which gives:
$V_{\text{out}} \approx 0.70\text{ V}$
So even though the potentiometer is physically in the middle, we should expect the wiper voltage to be around $0.70\text{ V}$ rather than $4.5\text{ V}$, and this gives us something interesting to investigate with our multimeter. Will the real circuit actually give us approximately $0.70\text{ V}$?
## Using a Multimeter
If you are eager to learn, you may already have your multimeter out and be measuring the voltage between the potentiometer's **wiper** and ground. You may find that the measured voltage is somewhat different from our calculation. Why? Our calculation assumed an ideal, **unloaded voltage divider**. In the real circuit, the transistor is connected to the wiper and can draw current from the divider. This means that the transistor **loads the voltage divider**. When the divider is loaded, the simple two-resistor equation no longer gives the complete picture. There are also other possible sources of differences, including **resistor tolerances**, **potentiometer tolerances**, **transistor characteristics**, **temperature**, **battery voltage**, and the measurement instrument itself. Therefore, the actual voltage at the wiper may differ from our simple prediction. This is a good moment to use the multimeter and actually measure what is happening. Rather than assuming that the circuit behaves exactly like our simplified calculation, let's measure it and find out. That is one of the important habits we are trying to develop in this book. The circuit diagram gives us a **model** of what we expect to happen, but the real circuit gives us something we can **measure, compare, and investigate**.
## Measuring the Voltage Divider Without the Transistor
We can make the voltage-divider behavior easier to understand by temporarily removing the transistor from the circuit. Now the voltage divider is essentially **unloaded**, so the simple voltage-divider equation should give us a much better prediction. With the potentiometer adjusted toward one end, the resistance distribution changes. At one endpoint, the resistance above the wiper is approximately:
$R_1 = 41,200\ \Omega$
while the resistance below it is approximately:
$R_2 = 3,000 + 1,000 = 4,000\ \Omega$
Therefore:
$V_{\text{out}} = 9 \times \frac{4000}{41200+4000}$
which gives:
$V_{\text{out}} \approx 0.80\text{ V}$
At the other endpoint, the resistance above the wiper is approximately:
$R_1 = 41,200 + 1,000 = 42,200\ \Omega$
while the resistance below it is approximately:
$R_2 = 3,000\ \Omega$
Therefore:
$V_{\text{out}} = 9 \times \frac{3000}{42200+3000}$
which gives:
$V_{\text{out}} \approx 0.60\text{ V}$
So the unloaded voltage divider should produce a **control-voltage range** of approximately:
$0.60\text{ V} \sim 0.80\text{ V}$
The exact direction of increase depends on which potentiometer terminal is connected toward the $41.2\text{ k}\Omega$ resistor and which is connected toward the $3\text{ k}\Omega$ resistor.
## From Control Voltage to Transistor Current
Now we can see why this voltage range is interesting. The voltage measured at the wiper is the transistor's **base voltage relative to ground**. However, we should not immediately call it $V_{BE}$. The base-emitter voltage is:
$V_{BE} = V_B - V_E$
where $V_B$ is the **base voltage** and $V_E$ is the **emitter voltage**. Therefore, to know the actual $V_{BE}$, we also need to know the voltage at the emitter. If the emitter is approximately at ground, then the wiper voltage will be approximately equal to $V_{BE}$. But if the emitter is at another voltage, the relationship is different. This distinction is important. The transistor's current depends on the **base-emitter voltage**, not simply on the base voltage relative to ground. Under appropriate **forward-active conditions**, the collector current can be approximated by:
$I_C \approx I_S e^{V_{BE}/V_T}$
where $I_S$ is a transistor-dependent scale current and $V_T$ is the thermal voltage. At room temperature:
$V_T \approx 25.9\text{ mV}$
This means that a relatively small change in $V_{BE}$ can produce a significant change in collector current. However, a base voltage between roughly $0.60\text{ V}$ and $0.80\text{ V}$ is not by itself proof that the transistor is operating in the forward-active region. The actual operating region depends on the **collector voltage, emitter voltage, base voltage, collector current, transistor type, temperature, and the rest of the circuit**. So rather than assuming that the measured voltage tells us everything about the transistor, we can measure the circuit and investigate what is actually happening. The conceptual chain is now:
$V_{\text{control}} \longrightarrow V_{BE} \longrightarrow I_C \longrightarrow \text{capacitor charging rate} \longrightarrow f$
This is the key idea behind our **experimental VCO**. Instead of using our hands to directly change the resistance of the oscillator, we are using a voltage to influence the transistor, which changes the current and, ultimately, changes the oscillator's frequency. Also, note that there is no direct relationship between CV and frequency in our circuit. The relationship is built from several smaller relationships:
$
V_{\text{control}}
\rightarrow
V_{BE}
\rightarrow
I_C
\rightarrow
\frac{dV_C}{dt}
\rightarrow
t_{\text{cycle}}
\rightarrow
f
$
The control voltage changes the transistor's base-emitter voltage, which changes the collector current. The collector current determines how quickly the capacitor charges, which determines the time required for each cycle, and therefore determines the oscillator's frequency.
**Our goal is to create a sound-generating device whose frequency can be controlled by voltage.**
## Connecting a CV Keyboard
When you turn the potentiometer, if you hear the frequency of your oscillator changing, you are ready to experiment with other CV devices. You may find that the potentiometer does not work effectively when you turn it all the way to one side or the other. At some point, the frequency may also stop changing even though you continue turning the potentiometer. This is because the transistor is no longer operating in its useful **forward-active region**. If the control voltage is too low, the **base-emitter voltage $V_{BE}$** may be too low for the transistor to conduct the desired current, so it approaches the **cutoff** region. If the control voltage is too high, the transistor may enter **saturation**, where increasing the base voltage no longer produces the expected increase in collector current. That is why you may hear the oscillator over only part of the potentiometer's range. However, this is not a problem for us. We actually do not want to use the potentiometer to manually change the frequency. The main reason we built this device is to control frequency with **voltage rather than our hands**. This allows us to use other devices, such as a **CV keyboard**, **CV sequencer**, or even a MIDI device with a suitable MIDI-to-CV converter, to control the oscillator's frequency. So, then, we may wonder: **Why do we still need the potentiometer and voltage divider?**
## The Output Voltage of a CV Keyboard
A common analog CV convention is **1 V/octave**, meaning that an increase of 1 V corresponds to an increase of one octave. So, let's imagine that we have a hypothetical two-octave keyboard whose output CV ranges from 0 V to 2 V. If one octave corresponds to 1 V, then each semitone corresponds to:
$
\frac{1\text{ V}}{12} \approx 0.083\text{ V}
$
If the lowest key is C and you press C♯, the keyboard outputs approximately 0.083 V. If you press D, it outputs approximately 0.167 V, and so on. As we learned, the voltage applied to the transistor's base affects $V_{BE}$, which in turn affects the transistor's collector current. Therefore, different CV voltages can produce different currents and, consequently, different oscillator frequencies.
However, there is a problem. Remember that A silicon BJT can conduct appreciable current when $V_{BE}$ is in the neighborhood of 0.6–0.7 V under typical operating conditions. However, there is no precise “turn-on voltage.” The collector current changes continuously and approximately exponentially with $V_{BE}$. Also, notice that this is **$V_{BE}$, the voltage between the base and emitter—not simply the voltage at the base relative to ground**. Therefore, if we directly connect our 0–2 V keyboard CV to the transistor's base, the lower part of the keyboard's voltage range may not provide enough $V_{BE}$ to put the transistor into the desired operating region. For example, a CV of 0 V, corresponding to the lowest C, may leave the transistor near cutoff if the emitter is near 0 V. However, if we press B♭, which corresponds to approximately 0.833 V, the transistor may begin conducting enough current for the oscillator to produce an audible frequency.
**That is actually great news! Our keyboard is already partially controlling the oscillator.** We have demonstrated that changing the keyboard's CV changes the transistor's current and, as a result, changes the oscillator's frequency. The problem is simply that the lower part of the keyboard's range is not yet working. However, we want to use the **entire keyboard range**, including the lowest notes. To do this, we need to shift the transistor's operating point so that even a low external CV can produce a useful collector current. One way to do this is to provide a **bias voltage** and combine it with the external CV through an appropriate circuit. The potentiometer can establish the transistor's operating point, while the external CV provides the changing control signal. Designing the circuit that properly combines these two voltages is an interesting topic in its own right, but we will not explore that circuit design in this class. It goes beyond our focus on the fundamentals of music technology and into more advanced circuit design. In other words, the potentiometer is no longer the thing we use to play the notes. Instead, it establishes the transistor's **operating point**, while the external CV provides the voltage that changes the transistor's current—and therefore the oscillator's frequency. Turn the potentiometer slowly until you begin to hear the oscillator. Then measure the voltage between the transistor's **base and emitter**:
$
V_{BE}=V_B-V_E
$
You should initially find a value in the approximate range of **0.6–0.7 V**. This gives us a useful starting point for establishing the transistor's operating point.