qdts
qdts is a package for Max that, through mathematical methods and neural networks, generates Quadratic Difference Tone Spectra with controllable timbral characteristics. In doing so, it enables the creation of rich “absent” sounds—perceptual phenomena that are heard despite not being physically present in the acoustic signal—emerging from a complex of pure tones.
Quadratic Difference Tone Spectra have been an area of intense research and exploration. This webpage condenses different approaches and implementations made throughout the years.
qdts has been featured in several artistic and academic contexts, including album releases, installations, conferences and journals. See some higlighted examples below.
Under certain conditions, when two pure tones are played simultaneously, listeners may perceive a third tone even though no physical sound exists at that frequency. This auditory illusion is known as an Auditory Distortion Product (ADP). Depending on the interaction between the original frequencies, these perceived tones are classified as Quadratic Difference Tones (QDTs) or Cubic Difference Tones (CDTs), both of which have been studied extensively in psychoacoustics.
While a single difference tone is already an intriguing perceptual phenomenon, a Quadratic Difference Tone Spectrum (QDTS) takes the idea much further. Instead of using one pair of tones to generate a single illusory pitch, a carefully designed complex of pure tones is used to evoke an entire harmonic spectrum of difference tones. The remarkable result is the perception of a rich harmonic sound that exists almost entirely inside the listener's auditory system.
The main challenge of QDTS synthesis is that the physical tones required to generate the desired illusory spectrum are not themselves harmonically organized. As a consequence, designing sounds that produce a specific perceived timbre is a difficult nonlinear optimization problem, making QDTS synthesis challenging for musical applications.
Figure 1. Illustrative frequency-amplitude representation of the QDTS model. On the right, the distribution of amplitudes of the carrier complex of pure tones is shown in cyan. On the left, the distribution of amplitudes of the target complex, evoked as a distortion product by the carrier, is shown dashed and in orange. The distortion function $D$, that maps the acoustic signal to the evoked distortion product, is added to illustrate how these signals are connected.
The first practical framework for synthesizing QDTS was proposed by Haworth et al. (2011) and was later formalized by Kendall et al. (2014). In their work, the authors introduced the mathematical model relating physical tones to their perceived difference-tone spectrum. Their method demonstrated the concept, but practical solutions were limited to relatively small spectra (up to four harmonics).
The qdts package extends this work by providing two complementary synthesis algorithms capable of generating QDTS containing up to sixteen harmonics. Each method offers different trade-offs between accuracy, consistency, and real-time controllability.
Figure 2. qdts package. Max patcher using qdts.solver_nn to synthesize QDTS in real-time.
qdts.solver: A numerical optimization approachThe first practical solver for larger QDTS was introduced by Gutiérrez et al. (2023). The method formulates synthesis as a nonlinear optimization problem and solves it using a custom Newton-Raphson algorithm, allowing highly accurate synthesis of spectra containing up to sixteen harmonics. This work received the Best Paper Award at the International Computer Music Conference and was later expanded into a full journal article (Gutiérrez et al., 2024).
This solver is both fast and highly accurate. However, because the optimization landscape contains many valid solutions, small changes in the synthesis parameters can produce perceptually different outputs. For this reason, it is best suited for applications where the target timbre remains relatively stationary rather than changing continuously in real time.
qdts.solver_nn: A neural-network approachTo overcome the limitations of numerical optimization, Gutiérrez et al. (2026) proposed a neural-network-based synthesizer that directly learns the mapping between desired QDTS parameters and the required physical tones. The learned model produces solutions that vary much more smoothly as synthesis parameters change, making the system considerably easier to control interactively.
Although the neural approach can be slightly less accurate than the optimization-based solver for some target spectra, its improved continuity and parameter consistency make it the preferred choice for real-time sound synthesis and dynamic musical applications.
In macOS there is a one-liner that once run in the terminal will install all automatically. On Windows, simply download the latest release from the link below, unzip the file, and move the resulting folder to your Max packages directory (typically \Documents\Max 8\Packages). See more details in the download link.
qdts is available for free on GitHub. You can download the latest release from the link below.
qdts.solver and qdts.solver_nn are also available. Check his GitHub repository below for installation instructions.
If you use qdts, please cite it as (click to copy to clipboard):