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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Granular Audio Synthesis

153 点作者 unsatchmo大约 7 年前

9 条评论

jedimastert大约 7 年前
I&#x27;ve seen a lot of people commenting about the artifacts you hear when the samples are stretched. These happen because of phasing issues, where frequencies in each of the grains are interfering with one another.<p>I&#x27;m surprised I don&#x27;t see it mentioned here, but there&#x27;s a rather interesting extension to this technique made by Paul Nasca[0], which midigates these artifact by (1)carefully choosing the size and placement of grains and (2)randomly changing the phase of each grain before recombining. You can see the algorithm here[1].<p>The results are absolutely incredible. You can end up slowing a sample down by 800% or more with no artifacts. For example, here[2] is the Windows 95 startup sound extended to be a little over 6 minutes long. The reverb you hear isn&#x27;t added, that&#x27;s just what is sounds like.<p>Also, if you didn&#x27;t notice from the page, it&#x27;s one of the default plug-ins in Audacity.<p>[0]: <a href="http:&#x2F;&#x2F;www.paulnasca.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.paulnasca.com&#x2F;</a> [1]: <a href="http:&#x2F;&#x2F;www.paulnasca.com&#x2F;algorithms-created-by-me#TOC-PaulStretch-extreme-sound-stretching-algorithm" rel="nofollow">http:&#x2F;&#x2F;www.paulnasca.com&#x2F;algorithms-created-by-me#TOC-PaulSt...</a> [2]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FsJdplLB1Bs" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FsJdplLB1Bs</a>
评论 #16540070 未加载
mgeorgoulo大约 7 年前
Very good results and embarrassingly easy to implement!<p>The very stretched waveform did contain some audible artifacts, but I think other methods like FFT would introduce some as well.<p>This kind of trick works because our hearing is frequency-based. So the crucial thing is to preserve the frequencies and it is going to sound exactly the same.<p>Spatial mapping of frequencies in the human ear here: <a href="https:&#x2F;&#x2F;www.ncbi.nlm.nih.gov&#x2F;pmc&#x2F;articles&#x2F;PMC2394499&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ncbi.nlm.nih.gov&#x2F;pmc&#x2F;articles&#x2F;PMC2394499&#x2F;</a> (see fig 5.)<p>Trying this with an image for example wouldn&#x27;t work, because our vision is sample-based. Imagine splitting an image in tiny fragments and repeating&#x2F;interpolating them on top of one another.
jancsika大约 7 年前
&gt; What this does is make it so you can put any grain next to any other grain, and they should fit together pretty decently. This gives you C0 continuity by the way, but higher order discontinuities still affect the quality of the result. So, while this method is fast, it isn’t the highest quality. I didn’t try it personally, so am unsure how it affects the quality in practice.<p>It&#x27;s not just about continuity. It also removes an entire set of concerns from the process.<p>For example-- suppose someone analyzes an audio recording, splits it into grains, then does some fancy re-organization based on the timbral content of the recording&#x2F;grains.<p>Now suppose they are subjectively unhappy with the result. Perhaps it sounds &quot;wimpy,&quot; &quot;fluttery,&quot; or some other such vague complaint. Is that sound due to a) their process of re-organizing the grains, b) the quality of the original recording, c) the envelopes they used, or d) something else entirely?<p>If instead one uses grains which begin and end at zero, the answer can&#x27;t be C because it doesn&#x27;t exist. I can say that the quality sounds fine in the few examples I&#x27;ve heard that use this technique.<p>I&#x27;d imagine the reason the latter isn&#x27;t used as often is because it&#x27;s simply more difficult to program if each grain can be an arbitrary size (or at least not quantized).
aidenn0大约 7 年前
I think the speed-up sounds <i>much</i> better than the slow-down. With the slow-down there are very noticable artifacts; I&#x27;m not sure if it&#x27;s because of the envelope they choose or just because repeating a grain adds harmonics.
vladimirralev大约 7 年前
As far as I see this is basically naive TDHS (Time Domain Harmonic Scaling). It&#x27;s a great starter project as an intro to audio-effect coding, since you can visually observe where you go wrong and where the noise comes from at the edges. Just great for learning how audio works for beginners. It&#x27;s very rare to have an audio effects algorithm so cool and so easy to observe without special analysis tools.<p>Some more famous algorithms that work this way and are similarly easy to implement are TDHS and PSOLA. They all work in the time domain but find different ways to smooth out the discontinuities and to make more extreme shifts sound better.
amelius大约 7 年前
Perhaps a better way of looking at it is this. Basically, a sound triggers hair cells in the ear. A single harmonic tone triggers a single group of hair cells. Through modeling, you can compute which hair cells are triggered at what moment for a given signal. Your task is then to compute a new signal for which the same haircells are triggered but faster.
评论 #16541008 未加载
jeffreyrogers大约 7 年前
This is pretty neat. One frustrating thing I found while doing some audio programming recently is how hard it was working with different audio formats. Most of the libraries I found for doing so were GPL or required a commercial license.
评论 #16537830 未加载
评论 #16538183 未加载
recentdarkness大约 7 年前
Title should be “Granular Audio Synthesis”<p>Couldn’t find anything about C++ in that article on a quick scan - feel free to correct me
评论 #16536173 未加载
评论 #16537504 未加载
luk32大约 7 年前
How does granular analysis differ from pcm representation, Fournier transformation and sampling? Or is it a different name for the same thing. I think it&#x27;s natural to whoever worked with sound on a Pc.<p>It&#x27;s probably debatable, but I don&#x27;t agree with the statement that shortnening the &quot;sound&quot; changes pitch. It depends on your representation of the sound. If you represent it as a function of amplitude vs time then scaling the time axis does change pitch.<p>This makes a sensational tone about a fallacy. No instrument plays sound faster or slower to make it shorter or longer.... It just stops playing it or doesn&#x27;t. If one thinks about the phenomenon this way, it becomes natural why you cannot compress time, to play shorter sounds.
评论 #16537017 未加载
评论 #16536446 未加载
评论 #16537954 未加载