A real vacuum tube is not required to experiment with tube-like harmonic coloration. With carefully controlled DSP, the ESP32 can add subtle warmth while still keeping the effect fully adjustable and bypassable.
Vacuum tubes produce a distinctive retro—yet highly prized—"warm" and musical sound that remains the top choice for many audiophiles and musicians today. Unlike modern transistors, tubes alter the audio signal in a way that the human ear perceives as pleasing. The main characteristics defining the sound of vacuum tubes are:
- Even-order harmonics – These harmonics are one octave higher than the original tone and are perceived by the human brain as natural, rich, and "warm."
- Soft clipping, which prevents unpleasant distortion.
- Natural compression and dynamics, as tubes respond more slowly to sudden changes in volume compared to transistors.
- And deep soundstage.

Unfortunately, nowadays tube amplifiers are extremely expensive and out of reach for the average audio enthusiast. In this project, I will describe a relatively simple and inexpensive way to build a device that processes audio to closely mimic the authentic sound of a vacuum tube. For this purpose, I used an ESP32 microcontroller board, a WM8960 audio codec board, a color display, and three rotary encoders.
In fact, the hardware is identical to that of one of my previous projects, the "Parametric Equalizer". . A significant portion of the software has also been reused from that earlier project. Accordingly, I am using the same libraries this time as well: TFT_eSPI and SparkFun_WM8960_Arduino_Library.h (v1.0.6).

This project is sponsored by PCBWay. From September 1, 2026, to January 24, 2027, PCBWay is hosting its 9th Project Design Contest. You can enter in five different categories: Edge AI & IoT, Robotics, Power, Open Theme, and Mechanical. Valuable prizes—including cash, coupons, and single-board computers—await the winners, while every participant will receive a Raspberry Pi Pico. Don't miss this opportunity to share your work and win great prizes. Make PCBWay your first choice!

Now, let me describe the setup process and the device's functions. Upon power-up, the display shows a curve representing the degree of processing—specifically, the sound distortion. To the left of the graph, you can see the current values for the OUTPUT, TONE, and DRIVE functions.
- Rotating the top encoder (Output) adjusts the output signal level within a range of -xx dB to +xx dB. A short click toggles between MID BOOST and MID CUT; as the names imply, this function affects the tonal character of the mid-range frequencies. A long click accesses the dedicated PRESETS menu, just like in the previous project. Here, there are five slots reserved for saving specific settings. Within this menu, a short click recalls the selected saved state, while a long click saves the current state.

- Rotating the middle encoder (Tone) controls—or rather, alters—the sound's tonal character: turning it to the left adjusts the sound from 0 to 100 towards a "warm" tone, while turning it to the right adjusts it from 0 to 100 towards a "bright" tone. These are linear tone adjustments rather than harmonic ones, affecting the low and high frequencies. This means that this encoder, too, has no direct impact on the so-called "tube sound." A short click changes the rate of change for a specific parameter, while a long click activates the factory defaults.
- Finally, the first (Drive) encoder directly affects sound nonlinearity—specifically, the "tube effect." Rotating this encoder alters the influence of odd and, especially, even harmonics, which are the primary source of the characteristic sound of tube amplifiers. It is worth noting that these are forms of distortion (artificially generated in this instance) that the human ear perceives as a pleasant, soft, and warm sound. The level of this distortion can be adjusted between 0 and 24 dB; in my personal, subjective experience, the optimal setting is around 14 to 16 decibels. Indeed, spectral analysis later reveals that the second harmonic is strongest at this level. A short click on this encoder toggles the tube effect between active and bypass modes, allowing for a comparison between the original and processed sound. The device features input and output clipping detectors that manifest as the input and output indicators turning red.
Now, let's briefly look at how these controls affect the sound under real-world conditions.
After this, I listened to the recorded material, and it is fair to say that you would hardly notice any significant difference in the sound on the recording—except for the distortion that appears at 24dB of drive. However, the experience is completely different when listening live; you can really feel the difference.
To demonstrate what I am describing, I analyzed the output signal in both the time and frequency domains. For this purpose, I connected an oscilloscope and a spectrum analyzer to one of the audio outputs. On the oscilloscope, increasing the "Drive" setting reveals a significant effect on the input sine wave, specifically a "rounding off" of the sharp transitions.

The picture is much clearer in the frequency domain, allowing us to precisely track the generation and intensity of even and odd harmonics. Naturally, the first even and first odd harmonics—the second and third harmonics—have the greatest impact on the sound. The stronger the second harmonic, the more pleasant the sound is to the ear.

And finally a short conclusion: The final processor shows that an ESP32 can create a clearly measurable and audible tube-like character by carefully controlling nonlinear distortion and harmonic content. For my system, the most natural result occurs around 14–16 dB of Drive, where the second harmonic becomes especially prominent.











