# Tape Simulation

Fons Adriaensen

► To cite this version:

Fons Adriaensen. Tape Simulation. Proceedings of the 19th Linux Audio Conference, Jun 2025, Lyon, France. hal-05096060v2

HAL Id: hal-05096060

https://hal.science/hal-05096060v2

Submitted on 16 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# TAPE SIMULATION

Fons Adriaensen

Zita Audio

fons@linuxaudio.org

## ABSTRACT

Before the days of digital audio, music was produced using analog magnetic tape recorders. It is sometimes claimed that this gave the result a quality – usually decribed in rather subjective terms – that today’s all-digital production environment doesn’t provide. So there is a market for analog tape emulator plugins. The zita-ts1 tape simulator will be released around the time of the conference. This paper introduces some of the technical aspects of analog magnetic tape audio recording, and relates how these influenced the design of the digital simulation algorithm.

## 1. INTRODUCTION

Analog audio tape recording technology was developed in the period just before and during the second world war. The German Telefunken company created the first recorders that offered sufficient quality for music production and broadcasting. After the war some of these Magnetophon machines were taken to the USA, where the Ampex Corporation picked up the technology and further developed it.

By the early 1950s tape recorders had become standard equipment in all professional audio production environments. The first multitrack machines appeared in the 60s, and ten years later all major music recording studios were using 16 or 24 tracks. Some even synchronised two machines to provide even more tracks.

Apart from quality and performance improvements very little happened until digital technology became available in the early 80s. Some digital audio tape machines were developed, but very soon computer based systems recording on hard disk became the standard.

Today there are still some studios that use analog tape, mainly some big ones that can afford to maintain their legacy machines. Very few audio engineers have the necessary knowledge and skills to keep them aligned and in good working order, and as the author found out, even reliable technical documentation can be hard to find.<fnref n="1" /> This shouldn’t be a surprise considering that most of the theory and technology of analog audio tape recording was developed more than 50 years ago.

## 2. ANALOG MAGNETIC TAPE RECORDING

### 2.1. Magnetisation

Ferromagnetic materials consist of microscopically small domains that can change their magnetic orientation when subjected to an external magnetic field. The stronger the external field, the more domains will align with it and the net result is magnetisation of the material. For almost all ferromagnetic materials the relation between the field strength *H* and the resulting magnetisation *M* is not only nonlinear, it also exhibits a memory effect called hysteresis.

A relation $y = F(x)$ is nonlinear if the derivative $dy/dx$ depends on $x$. It has hysteresis if $dy/dx$ depends on the sign of $dx$.

Figure 1 shows an example. Assume that originally the material is fully demagnetised, point A, and we apply a field *H* proportional to a sine wave starting at zero. As the field strength *H* increases, the magnetisation *M* increases in a non-linear way until it reaches a maximum value at B. In this example *H* is also strong enough to drive *M* into saturation. As *H* returns back to zero *M* will follow the top curve to C. To reduce *M* to zero at D requires a negative *H*. After reaching the maximum negative value, *M* will follow the bottom curve and the cycle repeats.

The magnitude of *M* at C is called the *remanence*. Ferromagnetic materials with a high remanence are called *hard*, those with less or no hysteresis *soft*.

<figure><img src="image_2.png" /><figcaption>Figure 1: Example magnetic hysteresis curve.</figcaption></figure>

To store binary information the response as shown in Fig.1 is near ideal. All that is needed is to apply a positive or negative field which will result in a remanence with the same polarity. The magnetisation can be driven into saturation without any ill effect. This is how digital tape recorders and 'core memory' as used in early computers work. To record analog data a strictly linear relation between the signal and the magnetisation is required. How this can be done will be discussed in the following sections.

### 2.2. The Recording Process

Magnetic tape consist of a long narrow strip of some plastic material, coated on one side with very fine particles of a 'hard' ferromagnetic material, e.g. iron oxyde. The tape is moved at a constant speed over a number of magnetic heads. Professional tape recorders normally have three of these to respectively, erase, record and play back the tape.

Figure 2 shows how a magnetic head is built. The core is made of a 'soft' ferromagnetic material. An electric wire coil is wound around it. At one side there is a narrow gap made of a physically hard non-magnetic material, e.g. ceramic. This is where the tape is in contact with the head.

<footnote n="1">¹Much of the information used in this paper was found in a collection of documents [1] from the early years. Most of these are by Jay McKnight who worked first at Ampex and later founded Magnetic Reference Laboratory.</footnote>
<figure><img src="image_3.png" /><figcaption>Figure 2: Magnetic head and tape geometry (not to scale).</figcaption></figure>

When recording, an electric current in the coil will generate a magnetic field *H* concentrated at the gap and this will locally magnetise the tape coating. The playback head senses the magnetisation *M* and an electrical signal proportional to *dM/dt* is generated by the coil.

For the record and playback heads the gap size must be very small. It acts as a rectangular window in the time domain, resulting in a $sin(x)/x$ shaped frequency response. In practice the gap size must not be much larger than half the signal wavelength on tape. To put this in perspective, at a tape speed of 19 cm/s (the lowest one used professionally) a 20 kHz signal has a wavelength of less than 10 micrometer.

## 2.3. HF Bias

As explained in 2.1, the relationship between the magnetisation and the field that creates it is highly nonlinear, and trying to record an analog waveform on magnetic media will result in severe distortion.

It was discovered quite early on that adding a strong high frequency component to the signal to be recorded would remove most of the nonlinearity, with only a high amplitude saturation effect remaining [2]. A typical frequency for this *bias* signal would be around 100 kHz.

The way bias works is sometimes explained in an informal context by pointing out that if the bias amplitude is high enough this forces the signal peaks to fall in the more or less linear regions of the hysteresis curve, and assuming that the average magnetisation will be linear as well. While this explanation appeals to intuition, it is wrong and it doesn't explain what is actually observed.

What happens in reality is a bit more complicated. While the magnetic field at the record head is certainly concentrated at the head gap, it does extend a bit on both sides. How fast it decays as a function of distance depends on the head geometry near the gap and on the thickness of the tape coating.

Now imagine recording a low frequency audio signal that can be assumed to be constant during the time a small fragment of the tape passes near the recording head gap. The top part of Fig.3 shows the magnetic field this fragment is subjected to, with zero on the time axis corresponding to passing the gap. The bottom plot show the resulting magnetisation. In this example the bias frequency is 100 kHz, and the constant signal amplitude is half the bias amplitude. Figure 4 shows the trajectory in the *H*, *M* plane, starting at time zero in Fig.3.

The signal that finally remains on the tape is the value the magnetisation converges to as the tape fragment moves away from the recording head and the field strength decreases to zero, at around 150 microseconds in this example. Note that this is not at all the average of *M* when near the gap.

Note that the high values of *M* at the gap completely obliterate whatever came before – only the part after passing the head

<figure><img src="image_4.png" /><figcaption>Figure 3: Simulated magnetic field (top) and magnetisation (bottom) as a tape fragment moves past the recording head gap. The magnetisation converges to its final value around 150 µs after passing the recording head gap.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Figure 4: Trajectory in the *H*, *M* plane corresponding to Fig.3, starting at time zero.</figcaption></figure>

matters. Erasing the tape before recording is based on the same principle: the erase head is driven by a high amplitude HF signal and as the tape moves away from it and the field strength decreases, the magnetisation converges to zero.

The example shown in Fig.3 illustrates what happens for a relatively low frequency audio signal. At higher audio frequencies, the signal can not be considered constant during the time the record head field decreases, and things become again a lot more complicated.

It is of course possible to simulate this.<fnref n="2" /> Fig.5 shows magnetisation level as a function of signal amplitude for a set of signal frequencies. Fig.6 show the same data as a frequency re-

<footnote n="2">²For all the simulations shown in this section, the intensity of the *H* field is assumed to be proportional to the inverse square of the distance from the record head gap, decaying to half its maximum value at 0.012 mm. This values was obtained by trial and error, comparing the results to published HF loss data.</footnote>
sponse for a set of signal amplitudes.

<figure><img src="image_6.png" /><figcaption>Figure 5: *Simulated magnetisation level as a function of signal level for a set of frequencies, tape speed 381 mm/s.*</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 6: *Simulated magnetisation level as a function of frequency for a set of signal levels, tape speed 381 mm/s.*</figcaption></figure>

Several observations can be made from these plots. Magnetisation is reduced significantly at higher audio frequencies. These also saturate at a lower amplitude. The resulting compression is not really 'soft', but it is clearly very frequency dependent. What actually matters is not frequency, but wavelength on tape, so these effects will be stronger at lower tape speeds.

Other effects are revealed by examining the actual magnetisation waveforms. Low frequency signals saturate by clipping softly. Higher frequencies don't, they are just attenuated. This is called the *self erasure effect*.

High level, high frequency signals also produce considerable amounts of aliasing due to signal harmonics mixing in a non-linear way with the bias signal.

### 3. TAPE RECORDING STANDARDS

A practical requirement when using tape recorders is of course that a tape recorded on one machine should play back correctly on any other one using the same tape format, track layout and speed. Two more things need to be standardised for this to be the case:

* The absolute magnetic flux on tape corresponding to some reference output level (e.g. 0 VU) and frequency.

* The frequency response of the output signal relative to the magnetic flux on tape.

Standards have evolved over time, but by the 1970s the most popular ones where the NAB<fnref n="3" /> one used by American manufacturers, and the IEC<fnref n="4" /> one used in Europe and Japan. Both cover the 7.5 and 15 IPS (19 and 38 cm/s) tape speeds. At the higher speed of 30 IPS (76 cm/s) the AES<fnref n="5" /> standard was often used.

The absolute flux level (measured in Weber/meter) is not relevant for a software emulation, but the equalisation certainly is. As shown in section 2.3, higher frequencies saturate at a lower magnetisation level. That means that they must be boosted on playback – it would not be possible to obtain a reasonable output level otherwise. This is contrary to e.g. FM radio which uses HF pre-emphasis in the transmitter and de-emphasis in the receiver. The consequence of this is that any playback EQ will be compromise between signal to noise ratio and the capability to handle high level HF signals.

All standards define the required high frequency equalisation as the response of a first order analog filter. Such a filter is fully defined by a time constant *T* or by its 3 dB frequency *F* = 1/(2π*T*). The table below lists these parameters and Fig.7 shows the corresponding frequency responses.

<table><thead><tr><td>Standard</td><td>T</td><td>F</td></tr></thead><tbody><tr><td>NAB 19 and 38 cm/s</td><td>50 us</td><td>3180 Hz</td></tr><tr><td>IEC 19 cm/s</td><td>70 us</td><td>2275 Hz</td></tr><tr><td>IEC 38 cm/s</td><td>35 us</td><td>4550 Hz</td></tr><tr><td>AES 76 cm/s</td><td>17.5 us</td><td>9100 Hz</td></tr></tbody></table>

The NAB standard also specifies a low frequency roll off on playback with *T* = 3180 us, *F* = 50 Hz. To compensate, bass frequencies are boosted when recorded, leading to a more pronounced compression effect at high levels. For the IEC and AES standards the +3 dB frequencies are proportional to tape speed and hence to wavelength. Up to around 10 kHz they are actually quite close to the inverse of the high frequency recording losses for small amplitude signals at all three speeds. The higher speed of 76 cm/s provides the best HF response and was sometimes used for master tapes, but it had its own problems in the form of irregularities in the very low frequency range.

<figure><img src="image_8.png" /><figcaption>Figure 7: *Playback equalisation standards.*</figcaption></figure>

<footnote n="3">³National Association of Broadcasters</footnote>

<footnote n="4">⁴International Electrotechnical Commission</footnote>

<footnote n="5">⁵Audio Engineering Society</footnote>
Note that the actual playback equaliser in any machine will be quite different from what these standards specify. It also needs to compensate for the +6 dB per octave response of the playback head, and for any losses due to the finite head gap size. The record equalisation is not standardised, it should be whatever is required to have an end-to-end flat frequency response.<fnref n="6" />

Professional tape recorders needed quite a lot of care and maintenance. Apart from cleaning and de-magnetising the tape path and checking the mechanical alignment of the record and playback heads, this included periodic tuning of the recording and playback levels and equalisers. Playback EQ was adjusted using a *test tape* with carefully calibrated magnetisation levels. On most machines this involved adjusting the playback gain and HF response. Test tapes were produced by standard laboratories and could be quite expensive. Record alignment depended on the type of tape, and had to be redone at least each time a new batch of tape was used. Usually three parameters needed to be set: bias level, record gain, and HF response. So for a 24-track machine the complete alignment procedure would require at least 120 adjustments for each tape speed.

## 4. REAL-TIME IMPLEMENTATION

For low signal frequencies it would be possible to precompute the resulting magnetisation as function of the signal amplitude and turn this into a form that can be evaluated efficiently, once for each output sample. This, plus some equalisation, is in fact all that typical tape simulation plugins actually do. The high frequency effects are then simulated by a static lowpass filter.<fnref n="7" /> Clearly this is not very realistic.

The only way to accurately simulate the high frequency effects is to go through the entire process illustrated by Figs. 3 for each output sample. With a bias frequency of 100 kHz and since the process is highly nonlinear, the sample rate would need to be around 1 MHz. Then, using the same parameters as for Fig. 4 each sample would require around 150 evaluations of a function that computes the magnetisation, and double that number at the lower tape speed of 190 mm/s. There are several mathematical models of hysteresis, but they all are share one quality – they are not simple, and doing this in real time on a general purpose computer seems out of the question.

The simulations that produced Figs. 5 and 6 were done using Python and Numpy, but with the inner loop – a simplified version of the Preisach [4] magnetic hysteresis model – coded in optimised C++. On the author's 3.6 GHz CPU this was running around 15 times slower than real-time. So clearly some pragmatic alternative solution is required.

Several potential solutions have been examined, and at the time of writing this paper it is not at all clear which one will be used for *zita-ts1*. It's not too difficult to create a relatively simple algorithm – a combination of filters and a non-linear element – that produces results similar to those shown in Figs. 5 and 6. Figure 8 shows one example, this should be compared to Fig. 5. But this only covers the case of simple sine waves, and how accurate this is for more complex signals remains to be seen.

One interesting potential solution would be to use a neural network trained by data created using the slow full simulation. Assuming this could run at 48 kHz sample rate, it would need to take around 14 samples of input and produce a single floating

<figure><img src="image_9.png" /><figcaption>Figure 8: Response of a relatively simple algorithm emulating high frequency magnetisation loss.</figcaption></figure>

point output. Finding out how far this could go would certainly be an interesting future project.

## 5. OTHER TAPE ARTEFACTS

*Tape noise* is not just additive, it is also dependent on the signal, i.e. there is a multiplicative component. Still this is relatively easy to emulate.

*Wow* refers to periodic and random tape speed variations, resulting in perceptible pitch modulation. It is not really an issue on professional tape machines.

*Flutter* is the result of small defects in the tape coating, or of dirt or dust affecting the contact of the tape with the head gap. It manifest itself as random short 'dropouts' affecting mainly high frequency content. It's not a nice effect, not even in small quantities, so one may question if there is any point at all in simulating it.

## 6. CONCLUSIONS

As should be clear by now, simulating the exact characteristics of analog magnetic tape recording by digital signal processing is not an easy exercise. All solutions known to the author (including *zita-ts1*) provide only an approximation of the 'real thing'. Probably the easiest *practical* solution in case such processing is wanted is to just use a real analog tape recorder.

The question remains: *is it worth it?* Opinions are divided. Some will tell you it's magic while others will say the whole thing is just superstition and hype.

The author was a sound engineer at the time when the music recording and broadcasting world made the transition from analog to digital, and still remembers the enthusiastic reaction of many musicians when hearing a digital recording of themselves for the first time. They just loved the fidelity and quality that digital provided, and all the talk of it being 'cold' and 'clinical' only came much later. Most of that actually originated in *audiophile* circles before creeping into the professional world.

During the analog tape era audio engineers did not adjust their machines to obtain a 'softly compressed warm sound' – they calibrated them for maximum quality. Individual tracks (guitar, bass, drums, ...) were sometimes recorded at very high level because the resulting compression could actually be beneficial and sound nice. But today there are much simpler ways to achieve that effect.

<footnote n="6">⁶For some examples of the actual frequency response of professional machines, see https://www.endino.com/graphs/</footnote>

<footnote n="7">⁷ This includes the well known *Chow Tape*. Although the paper [3] about this plugin gives the impression of describing a real physical model, it completely fails to consider the process described in section 2.3 and how this affects higher frequencies.</footnote>
Even the term 'compression' itself is somewhat misleading. A real audio compressor has attack and release times. The gain changes, even if they can be fast, are a smooth functions of time. No such thing happens with tape, whatever is done to the signal depends only on its intantaneous value. In other words, what you get is distortion, not compression.

Also consider that compression or limiting will only bring any benefit if the original signal has some nontrivial dynamic range to start with. At the time the *loudness wars* had not yet escalated to the really insane level we see today. What makes absolutely no sense is to first squeeze all dynamics out by aggressive compression and limiting and then sending the result through a tape emulator plugin – it’s a sure way to ruin your mix.

## 7. ACKNOWLEDGMENTS

Many thanks to the anonymous reviewers for their comments and suggestions for improving this paper.

## 8. REFERENCES

[1] Jay McKnight e.a., “MRL documents online,” http://mrltapes.com/mrl-documents-online.html.

[2] Jay McKnight, “Biasing in magnetic tape recording,” *Electronics World*, pp. 34–37, Aug. 1967, http://mrltapes.com/#Tech%20Papers.

[3] Jatin Chowdhury, “Real-time physical modelling for analog tape machines,” in *Proc. of DAFx-19, Birmingham UK*, Sept. 2019, https://archive.org/details/dafx-2019-paper-3.

[4] Gustav Mörée and Mats Leijon, “Review of hysteresis models for magnetic materials,” *Energies*, vol. 16, May 2023, https://www.doi.org/10.3390/en16093908.