使用 VB.net 进行宣传

发布于 2024-10-31 14:48:11 字数 181 浏览 3 评论 0原文

我想在任何时候获得歌曲的音高。我计划稍后存储这些音调。我怎样才能读取... mp3 文件或 wav 文件来在某个点播放音调?

这是一个视觉示例: 在此处输入图像描述 假设我想获得歌曲^此时的音调。

如果可以的话谢谢!

I want to get the pitch of a song at any point. I plan on storing the pitches later. How can I read say... an mp3 file or wav file to get the pitch played at a certain point?

Here is a visual example:
enter image description here
Say I wanted to get the pitch that is here at ^this point of the song.

Thanks if you can!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2024-11-07 14:48:11

事情比你想象的要复杂一些。

虽然存在时域方法(即直接处理 PCM 数据的方法),但频域基音检测将更加准确。您可以在此处阅读非常简化的概述。

您可能想要的是 傅里叶变换,它可用于将信号块从时域到频域(即给定信号跨度上的频率内容分布)。从那里,您需要分析该块内的频谱。这个问题变得更加困难,因为在一般情况下没有最佳方法从采样的频谱中推断音调。上述维基百科文章应该为您研究这些算法奠定基础。

最后,值得注意的是,这实际上是一个与语言无关的问题,除非您的主要兴趣是 阅读 WAV 文件 专门使用 VB.NET。

The matter is a tad more complicated than you may be anticipating.

While time-domain approaches exist (that is, approaches which work with the PCM data directly), frequency-domain pitch detection is going to be more accurate. You can read a very simplified overview here.

What you probably want is a Fourier Transform, which can be used to transform blocks of your signal from time-domain to frequency-domain (that is, a distribution of frequency content over a given span of the signal). From there, you would need to analyze the frequency spectrum within that block. The problem becomes even harder still, because there is no best way to deduce pitch from a sampled frequency spectrum in the general case. The aforementioned Wikipedia article should give you a foundation for looking into those algorithms.

Finally, it's worth noting that this is really a language-agnostic question, unless your primary interest is in reading a WAV file specifically using VB.NET.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文