Blog

How it works

Let’s follow a single piece of tape as it passes the record and playback heads, tracing how audio becomes a magnetic pattern and then sound again.

¼×4×
Audio becomes current, magnetic memory, voltage, and audio again An old magnetic pattern fades at the erase head, then audio becomes current, a new magnetic pattern, playback voltage, and audio again. Arrows show the lasting recording at each coating depth, with rapid reversals hidden. The sine-wave circle represents the bias source. The faint output curve shows the earlier input for comparison. Tape moves continuously, and the highlighted piece is enlarged below. Audio in Current Voltage Audio out EQ + drive EQ + gain Earlier input EraseRecordPlaybackTape → Coating close-up SurfaceDeeper
Follow sound into the coating and back out again. The close-up follows one piece of tape through its eight depths. Swipe the diagram to see the full path.

The animation above is a teaching model: its outlined piece moves with the tape, and the close-up shows the retained recording at eight illustrated depths, with rapid bias reversals hidden. The faint output curve shows the earlier input for comparison. It assumes effective erasure, uses independent magnetic histories and idealized head fields, and matches waveform levels. Its speed control changes the viewing pace; it plays no sound.

The walkthrough below describes the current V1 audio engine, which is separate from the animation and uses the cell spacing and depth count given here.

The simulation represents the tape as a series of cells. At a cassette reference speed of 47.625 mm/s and a 105 kHz bias, the refined profile spaces them about 55 nanometres apart along the tape. Each cell has four weighted depth samples through the coating, and each depth has a separate magnetic history for the left and right channels.1

We’ll follow one cell at one depth in the left channel. Recording is on, speed is steady, and we’ll leave out noise and control ramps so the main path is easier to see. Fields and magnetization are measured in amperes per metre (A/m); currents are measured in amperes (A).

The process begins with your audio waveform, x(t). The recording electronics filter and amplify it, then turn it into current through the record head’s coil.2 The model’s driver has a finite current limit: increasing the input eventually compresses the peaks.

iaudio(t)=Imaxtanh(Grecℛ[x](t)Imax)
ℛ is the recording filter, Grec sets drive, and Imax is the driver’s current limit.

A much faster alternating current rides alongside the music. This is bias. It repeatedly pushes the tape’s magnetization in both directions; the audio changes the balance of those pushes. Bias helps the recording respond more smoothly to the signal, although its level and the material still affect distortion.3

ihead(t)=iaudio(t)+Ibcos(2πfbt)
Ib is the bias amplitude and fb its frequency. The cassette reference uses 105,000 cycles per second.

The coil turns current into a magnetic field, H. As this piece of tape approaches the head gap, the field at the cell grows, then fades as it moves away. The field also varies with depth through the coating. Tape uses a Karlqvist approximation to describe that shape around an idealized head gap.4

H(t)=ηNgihead(t)K(s,d+z)
N is the coil’s turn count, η its effective efficiency, and g the gap width. s is the cell’s distance along the tape from the gap; d + z is the sampled depth’s distance below the head.

The two gap edges contribute through an arctangent. Writing their angles as A+ and A− keeps the expression compact:

K(s,h)=A+−A−πA±=arctan(s±g/2h)
Here h = d + z. Head geometry and position shape the field before the cell’s magnetic state is updated.

The cell’s response depends on both the current field and the fields it has already experienced. The model represents that memory with populations of idealized magnetic switches, called Preisach hysterons.5

At each depth, the refined profile uses eight coercivity rows. A row fixes a switching strength, r, while the switches within it have different centers, b. A switch turns positive when the field reaches b + r, turns negative when it reaches b − r, and keeps its previous state between those thresholds. For example, a switch with b = 0 and r = 20 kA/m switches at +20 and −20 kA/m.

The switches in a row stay ordered: centers below a remembered boundary p point positive, and centers above it point negative. One number can therefore describe the whole population. Each field update moves that boundary only as far as necessary:

pnew=clamp(pold,H−r,H+r)
Clamp leaves pold unchanged if it lies within the interval. Otherwise, it moves it to the nearest edge.

A strong positive field turns more of a row positive; a sufficiently negative field reverses that change. Small excursions can leave the boundary untouched. The eight rows have different switching strengths, so they respond differently to the same local field. The calculation is repeated independently at all four depths and in both channels: 64 row-boundary values per active cell.

The engine combines those populations into a magnetization, M. Tape chooses a continuous logistic distribution of switching centers, which gives this compact expression:

M=Ms∑j=18wjtanh(pjHw)
Ms sets saturation; wj are weights that sum to one; Hw sets the spread of switching centers. This tanh evaluates remembered populations; the earlier one models the recording amplifier’s current limit.

As the tape leaves the record head, the field weakens. At zero field, each boundary can still lie anywhere between −r and +r, so the cell’s magnetization can remain nonzero. That lasting magnetization is called remanence.6 Neighboring cells experienced slightly different moments of the audio. Together, their magnetization forms a pattern along the tape.

One complete cycle occupies a length set by tape speed and signal frequency:7

λ=vf
At 47.625 mm/s, a 20 kHz cycle spans about 2.38 µm: roughly 43 of these cells. At one-quarter speed, the same cycle spans about 11 cells.

More cells capture finer changes along the tape. More Preisach rows capture a finer distribution of switching strengths. Those are two different kinds of detail.

The tape then reaches a separate playback head downstream. The cell’s magnetization contributes to the magnetic flux linked through its coil. The head combines this contribution with those of nearby cells and all their depths:8

Λ(t)=∑i∑ℓ=14Wiℓ(t)Miℓ
W is a pickup weight that includes position, head geometry, coating depth, track width, and coil turns. Λ is flux linkage through the complete winding.

The cell’s contribution grows and fades as it passes the head. Faraday’s law relates that changing flux linkage to the induced voltage, e.9

e(t)=−dΛdte[n]≈−Λ[n]−Λ[n−1]Δt
Δt is the interval between internal samples. The coil’s turn count is already included in Λ.

The resulting voltage contains the combined influence of a moving neighborhood of tape. Each cell contributes a small part of the recording.

Playback electronics amplify and equalize the induced voltage. This matters because induction and the head’s geometry make the raw playback response frequency-dependent.10 Output filtering and sample-rate conversion then produce the audio you hear.

y[n]=Gout𝒟{𝒫[e]}[n]
𝒫 represents playback electronics, 𝒟 the output filter and decimator, and Gout the listening-volume gain.

On the next lap, the process continues. In the current V1 instrument, the reproduced audio is saved before listening-volume gain and returned according to accumulated tape travel. Reading between stored positions uses interpolation.11 With recording enabled, that return joins the fresh input for another magnetic recording pass. Playback-only passages use the stored waveform.

The full Preisach histories live in the active recording region. Later laps retain audio rather than a permanent microscopic history for every cell around the loop; feedback attenuation is also an approximation to erasure.12 The local magnetic models do not solve neighboring cells’ stray fields together, and 55 nm describes longitudinal numerical spacing, not individual grains or overall physical accuracy.

Notes & references

These papers, manuals, and textbook chapters come from the research behind Tape. The notes connect each source to the walkthrough and identify the numerical choices made for this model.

  1. Nakamichi, Dragon Service Manual (PDF). A hardware reference for three-head cassette recording and 105 kHz bias. The 55 nm grid, four depths, and eight coercivity rows are Tape’s numerical choices; they are not specifications from this manual or a claim to emulate this deck. ↩
  2. Studer Revox, B77 Mk I / Mk II Service Instructions (PDF). Recording-amplifier, bias-oscillator, and playback circuits show the electrical stages around the heads. The smooth current-limit equation above is Tape’s approximation. ↩
  3. John G. McKnight, “Biasing in Magnetic Tape Recording” (1967, PDF). Explains AC bias and the tradeoffs between sensitivity, distortion, and short-wavelength response. ↩
  4. C. Tannous, “The Karlqvist Approximation Revisited” (PDF). Derives the idealized gap field and examines its limitations near the head edges. Jatin Chowdhury, “Real-Time Physical Modelling for Analog Tape Machines” (2019, PDF) connects head fields and playback to an audio simulation. Its Jiles–Atherton hysteresis differs from the Preisach model used here. ↩
  5. Ferenc Preisach, “Über die magnetische Nachwirkung” (1935, publisher record). The historical foundation of Preisach hysteresis. Tape’s eight-row quadrature, logistic switching-center distribution, and boundary update are explicit model choices. ↩
  6. National Bureau of Standards, Basic Magnetic Quantities and the Measurement of the Magnetic Properties of Materials (1962, PDF). Section 3.4 explains hysteresis and remanence; the opening sections define magnetic quantities and units. ↩
  7. John G. McKnight, “Speed, Pitch, and Timing Errors in Tape Recording and Reproducing” (1968, PDF). Relates recorded wavelength to recording speed and frequency, and distinguishes playback pitch from accumulated timing error. ↩
  8. W. K. Westmijze, Studies on Magnetic Recording (1953, PDF). Develops head-field and recording theory, including the reciprocity argument that relates recorded magnetization to playback flux. Read its gap-loss expression with the corrigendum in note 10. ↩
  9. John G. McKnight, “Tape Flux Measurement Theory and Verification” (PDF). Connects Faraday’s law, head response, and measured playback voltage to tape-flux measurement. ↩
  10. Texas Instruments / National Semiconductor, AN-390: DNR Applications of the LM1894 (PDF). Its tape-playback section explains integration and 70/120 µs equalization. John G. McKnight’s “Gap-length Response in Magnetic Reproducers: Calculation, Measurement, and Compensations” (1977, PDF) and “Corrigendum: To the Gap Loss Formula” (1991, PDF) examine the head’s wavelength-dependent response and limits of simple gap-loss formulas. ↩
  11. Julius O. Smith III, “Delay-Line and Signal Interpolation,” Physical Audio Signal Processing. Explains interpolated reads and writes, variable delays, and interpolation error in feedback loops. Tape’s return addressed by accumulated tape travel is its own implementation choice. ↩
  12. John G. McKnight, “Erasure of Magnetic Tape” (1963, PDF). Describes erasing fields and residual recordings in physical tape. V1’s feedback attenuation approximates fading repeats; it does not simulate this AC erasure process. ↩