TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Highres Spectrograms with the DFT Shift Theorem

124 点作者 ssgh大约 4 年前

13 条评论

LeegleechN大约 4 年前
It&#x27;s unfortunate that the article doesn&#x27;t get into the fundamental limits of spectrogram resolution which are based on the famous uncertainty principle(<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fourier_transform#Uncertainty_principle" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fourier_transform#Uncertainty_...</a>). For example there is a fundamental tradeoff between frequency resolution and time resolution similar to the position&#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.
评论 #27032293 未加载
评论 #27032474 未加载
评论 #27031621 未加载
gbh444g大约 4 年前
Hello HN! Author here. I was thinking to call the post &quot;The underappreciated complexity of musical sounds&quot; but decided to stick with the DFT one as it would probably get more attention. This is a small discovery I came across this weekend. FFT-based spectrograms of musical instruments isn&#x27;t a novel thing do, but I thought what if I do a super highres spectrogram with a continuum of freqencies, instead of the N fixed ones FFT gives. Turns out, FFT &quot;supports&quot; such frequency shifting by multiplying the input by a specially constructed complex exponent. As a result, I&#x27;ve found out that musical instruments produce sophisticated ornaments in between the harmonic levels.
评论 #27031503 未加载
评论 #27031042 未加载
评论 #27043700 未加载
评论 #27030973 未加载
kazinator大约 4 年前
&gt; <i>A typical FFT-based spectrogram uses 1024 bins on a 48 kHz audio, with about 50 Hz step per pixel. Most of the interesting audio activity happens below 3 kHz, so 50 Hz per pixel gives only 60 pixels for that area.</i><p>That seems misleading. First of all, how often do you take a 1024 sample FFT? In theory, you could calculate it every sample, in which case you have 60 pixels, but 48,000 times per second.<p>Secondly, you can make use of frame-over-frame phase information. If you are looking at signals with mostly periodic content in that 3 kHz band, the phase information can indicate how much the signal in a given band deviates from that band&#x27;s center frequency.<p>If the signal is dead on the frequency, then the phase component is stable frame-over-frame; the value does not move. If the signal is off, the phase angle shifts, kind of like a CRT television that is out of vertical sync. Each frame finds catches the signal in a different phase compared to the previus frame due to the frequency drift. The farther the signal is from the FFT band&#x27;s frequency, the faster the phase angle rotates.<p>If you analyze the movement of phase of the same bin between successive frames, you can get a higher resolution estimate of the frequency than what you might think is possible from the 50 Hz resolution of that bin.<p>What you can&#x27;t resolve is the situation when multiple independent signals clash into that same frequency bin. The assumption has to holds that the the bin has caught one periodic signal.
crazygringo大约 4 年前
This looks cool! But really needs &quot;before&quot; and &quot;after&quot; comparison images -- lo-res vs hi-res.<p>Seeing the hi-res images only gives me no idea what kind of improvement this is showing...<p>@gbh444g Hope you could maybe add some lo-res versions :)<p>(Would also be cool to have audio clips next to each image as well, but that&#x27;s less important.)
评论 #27036357 未加载
zihotki大约 4 年前
I wonder how can we make assumptions about the bird songs while not taking into account how birds perceive the sound.<p>For humans it&#x27;s easier, there were a plenty of studies done in that regards and there is even a separate science field for studying the human sound perception - Psychoacoustics. Humans perceive sound in bands (a band is a range of frequencies), not separate frequencies. And the size of bands vary per frequency so that in the voice range it&#x27;s more narrow than, for example, high frequencies. The FFT fits very nicely into that picture and codecs were designed considering the human perception.<p>As for animals, I don&#x27;t know any studies in that regards. I would assume that the way of perception should be very similar to the one human has, at least on the mechanics level. As for the sensitivity and the size of bands as well as dynamic range - it&#x27;s hard to say. I&#x27;d love to see some studies that dig into details there but it seems that it&#x27;s very hard to do them. Animals don&#x27;t give you a direct feedback.
bobowzki大约 4 年前
The spectrograms on this site have a lot of spectral leakage. This can be improved a lot by applying a window function (blackman, hanning etc). It doesn&#x27;t seem like the author does this.
评论 #27041636 未加载
neogodless大约 4 年前
Some of my family and I have been enjoying playing with the BirdNET[0] app which seems to use the ideas presented here to identify birds from recordings, utilizing machine learning.<p>[0] <a href="https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=de.tu_chemnitz.mi.kahst.birdnet" rel="nofollow">https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=de.tu_chemnitz...</a>, <a href="https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;birdnet&#x2F;id1541842885" rel="nofollow">https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;birdnet&#x2F;id1541842885</a>
andai大约 4 年前
Just a heads up, you have to click the images to see the full resolution version! I spent a good while confused about not being able to see the details mentioned in the images.
tantalor大约 4 年前
&gt; as if birds “draw” with sound something that’s flying backwards in time<p>huh?
crazygringo大约 4 年前
&gt; <i>Smoothness in the time direction is easier to achieve: the 1024 bins window can be advanced by arbitrarily small time steps.</i><p>It appears you&#x27;re doing just that, but the time &quot;width&quot; is still readily apparent in many of the spectrograms, most obviously on the birdsong ones -- almost like a horizontal motion blur.<p>Would a deconvolution filter be able to meaningfully horizontally &quot;deblur&quot; the spectrograms? So the birdsongs didn&#x27;t appear to be drawn with a wide-tip marker, but rather a ballpoint pen? So not just hi-res, but hi-focus.
评论 #27035393 未加载
Lichtso大约 4 年前
On that note, also checkout wavelets to generate spectrograms: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wavelet" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Wavelet</a><p>I have some implementations here: <a href="https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;CCWT" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;CCWT</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;WebSpectrogram" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Lichtso&#x2F;WebSpectrogram</a>
评论 #27032126 未加载
jmpeax大约 4 年前
&gt; Despite this CWT implementation runs on GPU and this “advanced” FFT runs on JS, CWT is about 50-100x slower.<p>Sounds like a really crappy implementation of CWT. Besides this, the mother wavelet used was not specified, so maybe the author doesn&#x27;t really know much about CWT.
efnx大约 4 年前
I love this and have been looking for a program that&#x27;s like Photoshop for sound.
评论 #27032120 未加载
评论 #27032210 未加载
评论 #27031178 未加载