<story><title>Highres Spectrograms with the DFT Shift Theorem</title><url>https://soundshader.github.io/hss/gallery/index.html</url></story><parent_chain><item><author>andai</author><text>I&amp;#x27;ve been wondering about the apparent contradiction between the limitations of spectrograms and the remarkable fidelity of MP3 files, which I thought operated along similar lines.&lt;p&gt;When you convert a spectrogram back into sound it sounds like crap, but then how does MP3 store the frequency information (and why can&amp;#x27;t we use that for visualizations)?&lt;p&gt;The math is beyond my understanding, can anyone give some kind of analogy maybe?</text></item><item><author>LeegleechN</author><text>It&amp;#x27;s unfortunate that the article doesn&amp;#x27;t get into the fundamental limits of spectrogram resolution which are based on the famous uncertainty principle(&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Fourier_transform#Uncertainty_principle&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Fourier_transform#Uncertainty_...&lt;/a&gt;). For example there is a fundamental tradeoff between frequency resolution and time resolution similar to the position&amp;#x2F;momentum tradeoff in quantum mechanics. The Continuous Wavelet Transform which is alluded to in the article is a way to tune that tradeoff by frequency bin to best align with human sound perception.</text></item></parent_chain><comment><author>jcelerier</author><text>&amp;gt; When you convert a spectrogram back into sound it sounds like crap&lt;p&gt;fft gives you the spectrum + the phase. if you only use the spectrum to resynthesise you&amp;#x27;re missing half the information. temporal domain &amp;lt;-&amp;gt; spectral domain is a 99.9999999% lossless (not 100% I believe because of floating-point shenanigans, but enough to not matter at all) transform in both directions.</text></comment>
<story><title>Highres Spectrograms with the DFT Shift Theorem</title><url>https://soundshader.github.io/hss/gallery/index.html</url></story><parent_chain><item><author>andai</author><text>I&amp;#x27;ve been wondering about the apparent contradiction between the limitations of spectrograms and the remarkable fidelity of MP3 files, which I thought operated along similar lines.&lt;p&gt;When you convert a spectrogram back into sound it sounds like crap, but then how does MP3 store the frequency information (and why can&amp;#x27;t we use that for visualizations)?&lt;p&gt;The math is beyond my understanding, can anyone give some kind of analogy maybe?</text></item><item><author>LeegleechN</author><text>It&amp;#x27;s unfortunate that the article doesn&amp;#x27;t get into the fundamental limits of spectrogram resolution which are based on the famous uncertainty principle(&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Fourier_transform#Uncertainty_principle&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;Fourier_transform#Uncertainty_...&lt;/a&gt;). For example there is a fundamental tradeoff between frequency resolution and time resolution similar to the position&amp;#x2F;momentum tradeoff in quantum mechanics. The Continuous Wavelet Transform which is alluded to in the article is a way to tune that tradeoff by frequency bin to best align with human sound perception.</text></item></parent_chain><comment><author>bad_username</author><text>I implemented a simple clone of mp3 and it was not that hard. If you do a discrete Fourier transform of the audio (in small overlapping windows), quantize the resulting coefficients, and compress them losslessly using the Huffman codes, you will end up with something not that far from mp3. The human ear is quite forgiving to the effects of quantization in frequency domain.&lt;p&gt;MP3 does not have remarkable fidelity though. MP3, and my clone of it, suffers from time domain artifacts. Quantization in the frequency domain causes distortion in the time domain as well, negatively affecting high frequency transient sounds like cymbals. That is more noticeable. Newer generation codecs like AAC handle transients much better, but they are considerably more advanced, and often use different transforms like wavelet transform.</text></comment>