COPPER

A PS Audio Publication

Issue 18 • Free Online Magazine

Issue 18 QUIBBLES AND BITS

Transformation

What is the biggest, most fundamental difference between Mathematics and Physics?  I would say that it is the fact that Mathematics is absolute.  Let me put it this way, our present understanding of Physics allows – in principle – for there to exist an infinite number of parallel universes, and for the laws of Physics in each of those universes to be different.  However, in each of those universes, the exact same rules of Mathematics would still apply.  Bizarre notions like these cause many people to look askance at hard science and prefer a simpler home-spun approach to life.  It is perhaps more comforting to simply dismiss Einstein’s theory of relativity, and the many mind-bending paradoxes it entails, while at the same time being prepared to rely unquestioningly on your GPS system, which would not work at all if not for a strict implementation of relativistic principles.  At least Mathematics tends to avoid the apparent paradoxes of advanced Physics.

The Fourier Transform is a nice example of a simple, yet powerful mathematical proof.  It arose from the realization that many continuous functions (a description that applies perfectly to an audio waveform) can be perfectly decomposed into a sum of individual pure-tone sine waves.  The Fourier Transform provides the exact mathematical relationship between the continuous function and its sine wave frequency components.  It is a relatively simple equation, but its use requires analyzing the continuous function over all time, from the infinite past to the infinite future, which clearly introduces some practical limitations.  For this reason, Fourier Transforms on real data can only ever be done in the digital domain.

The digital version of a Fourier Transform is called a Discrete Fourier Transform (DFT), and requires that the continuous function is sampled at regular intervals – which is good for digital audio.  However, the underlying principle still applies – the continuous function (the waveform) must still be processed over all time, including the infinite past and infinite future.  The way the DFT gets around this is that it takes a single finite snippet of the waveform and makes the assumption that this snippet is repeated ad infinitum into both the infinite past and future.

If this snippet does in fact repeat infinitely, then it must follow that any individual frequencies which comprise the waveform must also repeat infinitely.  In fact, they must more than just repeat.  Their phase relationships must also repeat.  In other words, during the specific duration of the waveform snippet, each frequency must go through an exact integer number of oscillations, so that the frequency component is at exactly the same phase of its oscillation at the end of the snippet as it was at the beginning.  That way, each repeating snippet, extending into the infinite past and future, must be exactly the same.

The lowest frequency F1 that fulfills this criterion is given by F1 = (Fs/N), where Fs is the sampling frequency, and N is the number of samples in the snippet.  All of the other frequencies that fulfill the criterion are its harmonics:  Fn = nF1.  Now, if we set n= N/2 then we get Fn = Fs/2 which is the Nyquist frequency.  Finally, I must add F0 =0 to the list, because we need to account for a DC component.  Therefore, in summary, a waveform comprising N data points at a sampling frequency Fs, and repeating infinitely, can comprise ONLY (N/2 + 1) frequencies given by:

Fn = (n/N)Fs,  where n = 0, 1, 2, 3, … N/2.

And this is exactly what a DFT delivers.  It transforms the N waveform values into (N/2 + 1) equally spaced frequencies from DC to the Nyquist frequency.  For each of these frequencies it tells you both the amplitude and the phase of the original waveform’s component at that frequency.

But can we relate what the DFT tells us about the waveform to the actuality of the waveform itself?  Can we relate it to what a proper Fourier Transform would have told us?  Are they the same thing?  Well, not quite.  Remember that the snippet of waveform we selected is assumed to repeat ad infinitum.  The problem is that where the end of each of those repeating segments joins up to the start of the succeeding segment, there is no guarantee that the join with be smooth.  In fact, it is almost assured that there will be an abrupt discontinuity at each of those boundaries.  Those discontinuities are not part of the original waveform, but they will by definition be fully represented within the DFT analysis.

Standard practice is to artificially fade out the signal at the start and the end of the snippet so that there is de facto no discontinuity at the join.  What this achieves is to replace an uncontrolled discontinuity with a controlled one.  This process is called ‘windowing’, and there are a large selection of useful windowing functions that can be gainfully employed.  Each of those different windowing functions will affect the way in which the resultant DFT relates to the original waveform itself, but other than introducing the concept, it is beyond the scope of this article to elaborate further.

Bear in mind that what the DFT tells us about the data snippet is not merely an approximation – it is a full and complete representation.  It tells you everything there is to know about the data that you feed it with.  In particular, anything that is not in the DFT is not in the data.  Similarly, anything that cannot be accommodated within the DFT representation cannot be encoded or captured within the data.  Despite what you might think, the data contains only the frequencies which the DFT spits out, and no others.

So, what happens if the original waveform from which we took our snippet contains a frequency which lies between two of the permitted frequencies spat out by the DFT (whose frequencies, you’ll recall, are determined by the number of samples in the DFT)?  Well, such a frequency will not fit neatly into the repeating DFT snippet with an exact number of cycles.  Therefore it will produce a discontinuity at the boundaries, and will therefore result in spurious data appearing within the DFT.  Managing this issue is the reason why windowing functions are important.  They control how that spurious data is distributed.  Those characteristics of windowing functions have been thoroughly analyzed, and are well understood, although it is a deeply technical subject.  Depending on what you are using the DFT to achieve, one windowing function may be a better choice than another.

I want to conclude by clarifying the relationship between a DFT and a FFT (Fast Fourier Transform).  The DFT is a transform – a relationship between two sets of numbers governed by a set of equations.  On the other hand, FFT is an algorithm, a methodology for implementing a DFT in practical terms by breaking the DFT down into progressively smaller pieces.  There is nothing, for example, that limits the number of samples on which a DFT can be performed.  But the most efficient FFT algorithms rely on the number of samples being an integer power of two, which is a limitation imposed only by the algorithm itself, and not by the underlying theorem.

More from Issue 18

View All Articles in Issue 18

Search Copper Magazine

#225 Capital Audiofest 2025: Must-See Stereo, Part One by Frank Doris Dec 01, 2025 #225 Otis Taylor and the Electrics Delivers a Powerful Set of Hypnotic Modern Blues by Frank Doris Dec 01, 2025 #225 A Christmas Miracle by B. Jan Montana Dec 01, 2025 #225 T.H.E. Show New York 2025, Part Two: Plenty to See, Hear, and Enjoy by Frank Doris Dec 01, 2025 #225 Underappreciated Artists, Part One: Martin Briley by Rich Isaacs Dec 01, 2025 #225 Rock and Roll is Here to Stay by Wayne Robins Dec 01, 2025 #225 A Lifetime of Holiday Record (and CD) Listening by Rudy Radelic Dec 01, 2025 #225 Little Feat: Not Saying Goodbye, Not Yet by Ray Chelstowski Dec 01, 2025 #225 How to Play in a Rock Band, Part 18: Dealing With Burnout by Frank Doris Dec 01, 2025 #225 The People Who Make Audio Happen: CanJam SoCal 2025 by Harris Fogel Dec 01, 2025 #225 Chicago’s Sonic Sanctuaries: Four Hi‑Fi Listening Bars Channeling the Jazz‑Kissa Spirit by Olivier Meunier-Plante Dec 01, 2025 #225 From The Audiophile’s Guide: Controlling Bass Frequencies Through Membrane Absorbers (and How to Build Your Own) by Paul McGowan Dec 01, 2025 #225 Your Editor’s Tips for Attending Audio Shows by Frank Doris Dec 01, 2025 #225 PS Audio in the News by Frank Doris Dec 01, 2025 #225 Back to My Reel-to-Reel Roots, Part 24 by Ken Kessler Dec 01, 2025 #225 Holiday Music by Frank Doris Dec 01, 2025 #225 Puppy Prognostication by Peter Xeni Dec 01, 2025 #225 How to Post Comments on Copper by Frank Doris Dec 01, 2025 #225 Living Color by Rudy Radelic Dec 01, 2025 #224 T.H.E. Show New York 2025, Part One: A New Beginning by Frank Doris Nov 03, 2025 #224 Fool’s Leap of Faith is the Extraordinary Octave Records Debut from Singer/Songwriter Tyler Burba and Visit by Frank Doris Nov 03, 2025 #224 The Beatles’ “Aeolian Cadences.” What? by Wayne Robins Nov 03, 2025 #224 Persona Non Grata by B. Jan Montana Nov 03, 2025 #224 Talking With Recording Engineer Barry Diament of Soundkeeper Recordings, Part Two by Frank Doris Nov 03, 2025 #224 B Sides, B Movies, and Beware of Zombies by Rudy Radelic Nov 03, 2025 #224 The Burn-In Chronicles: 1,000 Hours to Sonic Salvation by Olivier Meunier-Plante Nov 03, 2025 #224 A Conversation With Mat Weisfeld of VPI Industries by Joe Caplan Nov 03, 2025 #224 Blues-Rocker Kenny Wayne Shepherd Celebrates 30 Years of Ledbetter Heights by Ray Chelstowski Nov 03, 2025 #224 Playing in a Rock Band, 17: When Good Gigs Go Bad, Part Two by Frank Doris Nov 03, 2025 #224 From The Audiophile’s Guide: Dealing with Odd-Shaped Rooms by Paul McGowan Nov 03, 2025 #224 TEAC’s TN-3B-SE Turntable Plays Bob Dylan by Howard Kneller Nov 03, 2025 #224 PS Audio in the News by Frank Doris Nov 03, 2025 #224 Lost in Translation by Peter Xeni Nov 03, 2025 #224 Reel-to-Reel Roots, Part 23: Better Than Rice Krispies by Ken Kessler Nov 03, 2025 #224 I Bring Joy! by Frank Doris Nov 03, 2025 #224 Screen Test by Rich Isaacs Nov 03, 2025 #224 How to Post Comments on Copper by Frank Doris Nov 03, 2025 #132 Dr. Patrick Gleeson: The Interview, Part Two by Rich Isaacs Oct 07, 2025 #223 World Fusion Meets Flamenco in Gratitude from Steve Mullins and Rim of the Well by Frank Doris Oct 06, 2025 #223 Judging Albums by Their Covers by Rich Isaacs Oct 06, 2025 #223 Recent Arrivals and 12-inch Royalty by Rudy Radelic Oct 06, 2025 #223 Summer of Creem, Part Two by Wayne Robins Oct 06, 2025 #223 Recording Engineer Barry Diament of Soundkeeper Recordings: Striving for Natural Sound by Frank Doris Oct 06, 2025 #223 Tea on the Terrace by B. Jan Montana Oct 06, 2025 #223 How Good Can Car Audio Get? by Joe Caplan Oct 06, 2025 #223 The Advantages of a Dedicated Listening Room by Paul McGowan Oct 06, 2025 #223 1! 2! 3! 4! Surrounded by the Ramones in Dolby Atmos! by Frank Doris Oct 06, 2025

Transformation

What is the biggest, most fundamental difference between Mathematics and Physics?  I would say that it is the fact that Mathematics is absolute.  Let me put it this way, our present understanding of Physics allows – in principle – for there to exist an infinite number of parallel universes, and for the laws of Physics in each of those universes to be different.  However, in each of those universes, the exact same rules of Mathematics would still apply.  Bizarre notions like these cause many people to look askance at hard science and prefer a simpler home-spun approach to life.  It is perhaps more comforting to simply dismiss Einstein’s theory of relativity, and the many mind-bending paradoxes it entails, while at the same time being prepared to rely unquestioningly on your GPS system, which would not work at all if not for a strict implementation of relativistic principles.  At least Mathematics tends to avoid the apparent paradoxes of advanced Physics.

The Fourier Transform is a nice example of a simple, yet powerful mathematical proof.  It arose from the realization that many continuous functions (a description that applies perfectly to an audio waveform) can be perfectly decomposed into a sum of individual pure-tone sine waves.  The Fourier Transform provides the exact mathematical relationship between the continuous function and its sine wave frequency components.  It is a relatively simple equation, but its use requires analyzing the continuous function over all time, from the infinite past to the infinite future, which clearly introduces some practical limitations.  For this reason, Fourier Transforms on real data can only ever be done in the digital domain.

The digital version of a Fourier Transform is called a Discrete Fourier Transform (DFT), and requires that the continuous function is sampled at regular intervals – which is good for digital audio.  However, the underlying principle still applies – the continuous function (the waveform) must still be processed over all time, including the infinite past and infinite future.  The way the DFT gets around this is that it takes a single finite snippet of the waveform and makes the assumption that this snippet is repeated ad infinitum into both the infinite past and future.

If this snippet does in fact repeat infinitely, then it must follow that any individual frequencies which comprise the waveform must also repeat infinitely.  In fact, they must more than just repeat.  Their phase relationships must also repeat.  In other words, during the specific duration of the waveform snippet, each frequency must go through an exact integer number of oscillations, so that the frequency component is at exactly the same phase of its oscillation at the end of the snippet as it was at the beginning.  That way, each repeating snippet, extending into the infinite past and future, must be exactly the same.

The lowest frequency F1 that fulfills this criterion is given by F1 = (Fs/N), where Fs is the sampling frequency, and N is the number of samples in the snippet.  All of the other frequencies that fulfill the criterion are its harmonics:  Fn = nF1.  Now, if we set n= N/2 then we get Fn = Fs/2 which is the Nyquist frequency.  Finally, I must add F0 =0 to the list, because we need to account for a DC component.  Therefore, in summary, a waveform comprising N data points at a sampling frequency Fs, and repeating infinitely, can comprise ONLY (N/2 + 1) frequencies given by:

Fn = (n/N)Fs,  where n = 0, 1, 2, 3, … N/2.

And this is exactly what a DFT delivers.  It transforms the N waveform values into (N/2 + 1) equally spaced frequencies from DC to the Nyquist frequency.  For each of these frequencies it tells you both the amplitude and the phase of the original waveform’s component at that frequency.

But can we relate what the DFT tells us about the waveform to the actuality of the waveform itself?  Can we relate it to what a proper Fourier Transform would have told us?  Are they the same thing?  Well, not quite.  Remember that the snippet of waveform we selected is assumed to repeat ad infinitum.  The problem is that where the end of each of those repeating segments joins up to the start of the succeeding segment, there is no guarantee that the join with be smooth.  In fact, it is almost assured that there will be an abrupt discontinuity at each of those boundaries.  Those discontinuities are not part of the original waveform, but they will by definition be fully represented within the DFT analysis.

Standard practice is to artificially fade out the signal at the start and the end of the snippet so that there is de facto no discontinuity at the join.  What this achieves is to replace an uncontrolled discontinuity with a controlled one.  This process is called ‘windowing’, and there are a large selection of useful windowing functions that can be gainfully employed.  Each of those different windowing functions will affect the way in which the resultant DFT relates to the original waveform itself, but other than introducing the concept, it is beyond the scope of this article to elaborate further.

Bear in mind that what the DFT tells us about the data snippet is not merely an approximation – it is a full and complete representation.  It tells you everything there is to know about the data that you feed it with.  In particular, anything that is not in the DFT is not in the data.  Similarly, anything that cannot be accommodated within the DFT representation cannot be encoded or captured within the data.  Despite what you might think, the data contains only the frequencies which the DFT spits out, and no others.

So, what happens if the original waveform from which we took our snippet contains a frequency which lies between two of the permitted frequencies spat out by the DFT (whose frequencies, you’ll recall, are determined by the number of samples in the DFT)?  Well, such a frequency will not fit neatly into the repeating DFT snippet with an exact number of cycles.  Therefore it will produce a discontinuity at the boundaries, and will therefore result in spurious data appearing within the DFT.  Managing this issue is the reason why windowing functions are important.  They control how that spurious data is distributed.  Those characteristics of windowing functions have been thoroughly analyzed, and are well understood, although it is a deeply technical subject.  Depending on what you are using the DFT to achieve, one windowing function may be a better choice than another.

I want to conclude by clarifying the relationship between a DFT and a FFT (Fast Fourier Transform).  The DFT is a transform – a relationship between two sets of numbers governed by a set of equations.  On the other hand, FFT is an algorithm, a methodology for implementing a DFT in practical terms by breaking the DFT down into progressively smaller pieces.  There is nothing, for example, that limits the number of samples on which a DFT can be performed.  But the most efficient FFT algorithms rely on the number of samples being an integer power of two, which is a limitation imposed only by the algorithm itself, and not by the underlying theorem.

0 comments

Leave a comment

0 Comments

Your avatar

Loading comments...

🗑️ Delete Comment

Enter moderator password to delete this comment: