I like the thing, but it misses what I enjoyed teaching about these most: phase. Many people know white noise is nominally 'all frequencies at the same intenisty', yet those taught Fourier mathematics are also taught that the same recipe makes a pulse. The difference is all in the phase information, and why I maintain to this day the Nyquist-Shannon sampling theorem, as typically applied, is incorrect.
Yes phase information is really important. Try this:
1. Fourier Transform an Image
2. Set all magnitues the the spectrum to 1.0, but do not change the phase
3. Inverse Transform and look at the result
4. Now try the same, but this time keep the maginutes unchanged but change all phases to 0°
Spoiler: When changing all amplitudes the image is still regocognizable, when changing all phases, it is not. See example: [1]
But in what sense are you saying the Nyquist-Shannon theorem is incorrect (when applied)? It only says something about the most general case of perfectly reconstructing a signal.
For getting an playful and intuitive understanding of time/frequency transformations my fourier-cube visualization might be useful [2]
Phase information is important, but as far as I understand it, it is not important in audio: our ears are insensitive to phase.
(Phase is important when combining different sinuses of the same frequency, because the sum of those will be different depending on their relative phase, but that's a different matter and not relevant here.)
Changing the phases of the different frequencies will result in a waveform that looks different, but it will sound the same. Our ears are like a spectrum analyzer that only records the volume of each frequency, and is unable to record the phase.
To expand on the other comment. You wouldn't be able to tell the difference in a single sine wave with phase set to either 0 or 180 degrees. But if you add in another sine wave at 0 degrees, the two 0's will add up and the 0 and 180 will completely cancel.
Phase makes a huuuuge difference in audio engineering. There isn't a single song that gets mixed without intense consideration of phase interactions between the different tracks. Getting it wrong can result in catastrophic damage to the audio signal that reaches your ears. If you have a speaker capable, try switching the leads that feed the signal on one of the speakers and see how it sounds! Everything that's exactly the same between the two speakers will sound hollow and tinny, the frequency balance will completely degrade
It's insensitive to individual phase of audible frequencies, but the concept of phase itself is very important in audio in the form of time delays/echoes, if you are dealing with long sample lengths.
See my sibling comment explaining how translation corresponds to ramping phase shift/"fast-forwarding" each frequencies such that the shifted distance are the same across the spectrum.
The fun video The Other Square Wave plays them with phases all out of whack and funny looking, and they sound just the same: https://youtu.be/Ffka-hPzug0
Phase is hugely important and is part of how we perceive a sound in space. Making sure the phase is correct when using multiple mics to mic a drum kit, for example, is critically important.
Explaining concretely: a uniform spatial displacement of the image corresponds to a ramping phase shift across the frequency spectrum.
i.e. if you shift an image by 1cm, then the 1 rad/cm frequency component gets its phase "fast forwarded" by 1rad, the 1.5 rad/cm component forwarded by 1.5rad, and 2 rad/cm by 2rad and so on.
By subtracting each frequency's phase from their original distribution, you are basically displacing them each by a different distance from one another, decohering the image entirely.
Typically the Nyquist Shannon theorem is stated to say that you need to sample at twice the maximum frequency for complete reproducibility. Applying this to a digital signal, that does indeed work with a discrete Fourier transform. Applying this in the perspective of a sample rate (i.e. *.wav file of a recorded audio signal) does not hold true though in my opinion as the discrete signal has become a scalar, not a vector of the Fourier example.
If we take the highest reproducible frequency, two samples per wave, we find we could perfectly sample at the highest and lowest values of that wave, but we could have equally sampled the zero-crossing point, all depending on where in the phase the sample rate aligns with a given wave form. As the sampling has lost significant information, I believe a sample rate should be much higher than what Nyquist-Shannon would suggest for a high degree of reproducibility.
If your source is a digital signal, and you only need to reproduce that signal, of course 2x is ample.
Actually the Theorem states, that you must sample with a rate strictly GREATER THAN (not equal) than twice the highest frequency. Exactly because sampling only the zero crossings is not enough.
Ofcourse depending on how exactly you want to process your samples it might be convenient to have an even higher sampling rate. And if you know your signal does not contain low frequencies (=not using the full bandwidth) you might get away with even lower sampling rates.
But the general case is: you must sample with a rate strictly greater than twice the highest frequences.
I'm not sure the original poster meant, but the sampling theorem is often misunderstood, there's a good article I recommend to most anyone who has the choose a sampling rate which goes into those misconceptions: https://neuron.eng.wayne.edu/auth/ece4330/practical_sampling...
Comments
I like the thing, but it misses what I enjoyed teaching about these most: phase. Many people know white noise is nominally 'all frequencies at the same intenisty', yet those taught Fourier mathematics are also taught that the same recipe makes a pulse. The difference is all in the phase information, and why I maintain to this day the Nyquist-Shannon sampling theorem, as typically applied, is incorrect.
Yes phase information is really important. Try this:
1. Fourier Transform an Image 2. Set all magnitues the the spectrum to 1.0, but do not change the phase 3. Inverse Transform and look at the result 4. Now try the same, but this time keep the maginutes unchanged but change all phases to 0°
Spoiler: When changing all amplitudes the image is still regocognizable, when changing all phases, it is not. See example: [1]
But in what sense are you saying the Nyquist-Shannon theorem is incorrect (when applied)? It only says something about the most general case of perfectly reconstructing a signal.
For getting an playful and intuitive understanding of time/frequency transformations my fourier-cube visualization might be useful [2]
[1]: https://static.laszlokorte.de/phase.png [2]: https://static.laszlokorte.de/frft-cube/
Phase information is important, but as far as I understand it, it is not important in audio: our ears are insensitive to phase.
(Phase is important when combining different sinuses of the same frequency, because the sum of those will be different depending on their relative phase, but that's a different matter and not relevant here.)
Changing the phases of the different frequencies will result in a waveform that looks different, but it will sound the same. Our ears are like a spectrum analyzer that only records the volume of each frequency, and is unable to record the phase.
To expand on the other comment. You wouldn't be able to tell the difference in a single sine wave with phase set to either 0 or 180 degrees. But if you add in another sine wave at 0 degrees, the two 0's will add up and the 0 and 180 will completely cancel.
Phase makes a huuuuge difference in audio engineering. There isn't a single song that gets mixed without intense consideration of phase interactions between the different tracks. Getting it wrong can result in catastrophic damage to the audio signal that reaches your ears. If you have a speaker capable, try switching the leads that feed the signal on one of the speakers and see how it sounds! Everything that's exactly the same between the two speakers will sound hollow and tinny, the frequency balance will completely degrade
It's insensitive to individual phase of audible frequencies, but the concept of phase itself is very important in audio in the form of time delays/echoes, if you are dealing with long sample lengths.
See my sibling comment explaining how translation corresponds to ramping phase shift/"fast-forwarding" each frequencies such that the shifted distance are the same across the spectrum.
The fun video The Other Square Wave plays them with phases all out of whack and funny looking, and they sound just the same: https://youtu.be/Ffka-hPzug0
Phase is hugely important and is part of how we perceive a sound in space. Making sure the phase is correct when using multiple mics to mic a drum kit, for example, is critically important.
Explaining concretely: a uniform spatial displacement of the image corresponds to a ramping phase shift across the frequency spectrum.
i.e. if you shift an image by 1cm, then the 1 rad/cm frequency component gets its phase "fast forwarded" by 1rad, the 1.5 rad/cm component forwarded by 1.5rad, and 2 rad/cm by 2rad and so on.
By subtracting each frequency's phase from their original distribution, you are basically displacing them each by a different distance from one another, decohering the image entirely.
Typically the Nyquist Shannon theorem is stated to say that you need to sample at twice the maximum frequency for complete reproducibility. Applying this to a digital signal, that does indeed work with a discrete Fourier transform. Applying this in the perspective of a sample rate (i.e. *.wav file of a recorded audio signal) does not hold true though in my opinion as the discrete signal has become a scalar, not a vector of the Fourier example.
If we take the highest reproducible frequency, two samples per wave, we find we could perfectly sample at the highest and lowest values of that wave, but we could have equally sampled the zero-crossing point, all depending on where in the phase the sample rate aligns with a given wave form. As the sampling has lost significant information, I believe a sample rate should be much higher than what Nyquist-Shannon would suggest for a high degree of reproducibility.
If your source is a digital signal, and you only need to reproduce that signal, of course 2x is ample.
Actually the Theorem states, that you must sample with a rate strictly GREATER THAN (not equal) than twice the highest frequency. Exactly because sampling only the zero crossings is not enough.
Ofcourse depending on how exactly you want to process your samples it might be convenient to have an even higher sampling rate. And if you know your signal does not contain low frequencies (=not using the full bandwidth) you might get away with even lower sampling rates.
But the general case is: you must sample with a rate strictly greater than twice the highest frequences.
Tangential: Your Fourier Cuboid is very cool project. I have added it to awesome-interactive-math [1] list.
[1]: https://github.com/ubavic/awesome-interactive-math/
I'm not sure the original poster meant, but the sampling theorem is often misunderstood, there's a good article I recommend to most anyone who has the choose a sampling rate which goes into those misconceptions: https://neuron.eng.wayne.edu/auth/ece4330/practical_sampling...
In the domains that I'm familiar with we never get to measure phase, only intensity. (https://en.wikipedia.org/wiki/Phase_retrieval)
Without entering the broader discussion in the comment. I've also missed the ability to change phase for each harmony.