Current sources
A supply holds a voltage. A current source holds a current instead: the same current from one point to another, whatever the voltage across it. Into a capacitor, that makes a straight ramp, the heart of a sawtooth.
New words

A current source pushes a fixed current from one point to another (I1 a b 100uA), however hard it has to push.

A sawtooth core charges a capacitor at a steady rate, then empties it fast: a ramp up, a drop, again and again.
1Writing one
Write a current source as I, the two points and the current. The current leaves the first point, goes through the source and into the second.
I1 a b 100uA
- Amps as a parts list writes them:
1mA,100uA,100 µA,2.5mA,-50uA, up to 1 A. - It is a fixed input, as a supply's volts are, so it adds no work for each sample.
- It doesn't count as a connection: a point reached only through a current source is refused, as a point joined to nothing would be. It can't be an op-amp's feedback, and can't touch
inor a named input.
One use is a bias: a steady current through a diode sets where it sits on its curve, and so how it treats a sound coming in through a resistor.
I1 gnd a 100uA
R1 in a 10k
D1 a gnd 1N4148
2A straight ramp
In Current Ramp, I1 draws a steady 100 µA out of the point n. The op-amp U1 holds n at 0 V, so that current can only come from C1, and C1 charges at a steady rate: the op-amp's out rises in a straight line. At the top, the comparator U2 flips, Rr sends a bigger current back, and the out falls fast until U2 flips back. V1 sets where U2 flips, so the ramp sits either side of 0 V.
With C1 at 100 nF it runs at about 258 Hz. A bigger capacitor rises more slowly: tune turns C1.
# A sawtooth core. I1 draws a steady 100 uA out of n, whatever the voltage, and U1 keeps n at 0 V, so C1 charges at a# steady rate: out rises in a straight line. When it reaches the top, the comparator U2 flips, Rr sends a bigger current# back, and out falls fast until U2 flips back. V1 sets where U2 flips, so the ramp sits either side of 0 V. tune turns# C1: a bigger C1 rises more slowly. R0 gives the unused input, in, a way to ground.circuit Ramp setting output: 2.6 V, from 0.26 V to 26 V setting tune: 100n, from 470n to 22n R0 in gnd 1k V1 r gnd 1.75V I1 n gnd 100uA C1 n out tune U1 gnd n out opamp rails 13V R1 out p 10k R2 p sq 27k U2 p r sq comparator rails -0.5V 13.5V Rr sq n 10kend

3Its limits
- A circuit holds up to 4 current sources.
- Its current is written in the parts list, not turned by a knob.
- It is ideal: it keeps its current at any voltage, where a real one runs out of room near its supply.
Try it
- Open Current Ramp and hold a key.
- Turn
tunetoward 470n: the note falls, since C1 takes longer to fill. - In the parts list, change
I1 n gnd 100uAto200uA: the ramp rises faster, and the note goes up.
Remember
- A current source is
I1 a b 100uA: that current from a to b, whatever the voltage. - It adds no work for each sample, and doesn't count as a connection on its own.
- Into a capacitor, a fixed current makes a straight ramp.