So, you want and oscillator? Something that makes piercing, high-frequency tones to annoy your neighbors? Have I got a circuit for you!

Ok, lets break this down. We have a NOT gate, feeding back into itself, with a capacitor and resistor wired to ground. But what does this do?

The circuit starts with 0v going into the NOT gate, so the output is set to high. The output is limited in flow to the capacitor, due to the resistor. This means that the capacitor takes time to fill. And, while it is filling, the input to the NOT gate is not high enough to trigger an inversion. However, once the capacitor fills enough, the not gate switches off again, and the capacitor discharges into the system for a brief period, before the NOT gate outputs a high once more. And thus, the cycle repeats, and we have a square wave.

Its important to note that the oscillation frequency is determined by both the resistors resistance, and the capacitors capacitance. If either is 0, then we get a frequency of infinity (not actually infinity, but much higher than is useful to us). If we want to vary the frequency, we need to vary either of those 2 variables.

Changing a capacitors capacitance is very difficult, but changing a resistors resistance is a lot easier. By replacing the resistor with a potentiometer (or a transistor for voltage control), we can change the pitch on demand.

Ok, that’s sorted. But square waves get boring after a while. Lets modify the circuit to make a Saw-core oscillator.

We’ve moved the resistor and wired it to ground, and added a diode to prevent a short circuit. But we’ve also added a Schmitt trigger inverter.

Lets break down the cycle. Like before, we start with 0v input, to the Schmitt trigger output a high. The diode ensures the current does not short backwards. The Capacitor will fill up almost instantly, and the Schmitt trigger will deactivate itself. However, it wont be reactivated for a while. Schmitt triggers have a different threshold for low and high signals, so the voltage needs to drop much lower before it will output a high signal. The voltage in the circuit drops slowly as the capacitor drains through the resistor to ground, until the Schmit trigger triggers once again, and the cycle repeats.

And just like before, we can vary the frequency by changing the resistance (either with a potentiometer, or a transistor). If we want to get a square wave as a second output from this, we can simply pass it through 2 NOT gates in series. Due to their low-high thresholds being the same, this will convert any wave into a square wave. We use 2 because the output from the first will be flipped in polarity.

So that’s 2 basic oscillator cores done. But what if you want more? Well, I’m done for today, but I’ll leave you my source for the second circuit: https://www.youtube.com/watch?v=QBatvo8bCa4&t=744s. Check out the rest of his channel for simple filters, waveshapers, envelopes sequencers, you name it.