如何分析音频文件的输出频率和持续时间?

发布于 2024-09-29 09:02:06 字数 190 浏览 1 评论 0原文

我有一个可以播放设定频率的功能。该函数的输入是频率和持续时间。如何分析声音文件,以便获得每毫秒音频的输出频率。

例如: 质谱、频率
1, 400
2, 401
3, 402
等等。

如果有基于 Mac 的软件可以做到这一点,我可以对音频文件进行预处理并仅输入频率/持续时间组合。

谢谢!

I have a function that can play set frequencies. The function's inputs are frequency and duration. How can I analyze a sound file so that I have the output frequency for every milisecond of audio.

e.g.:
MS, Frequency

1, 400

2, 401

3, 402

etc.

If there is Mac based software that can do this, I'd be fine with preprocessing the audio files and only inputing the frequency/duration combos.

Thanks!

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

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

发布评论

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

评论(1

浅忆流年 2024-10-06 09:02:06

大多数声音文件(除简单正弦波之外的任何内容的录音)都没有单一的输出频率,因此您想要做的事情基本上是不可能的。 可以确定声音文件的主频基频,但这变得越困难(并且越不准确)该文件是。 CD 品质(单声道)声音的一毫秒片段仅包含 441 个样本。

您是否可能尝试将录音转换为其组成音符,然后使用播放频率的功能再现曲调?要了解这项任务有多么困难,请尝试在谷歌上搜索“wav-to midi”。

Most sound files (recordings of anything other than a simple sin wave) do not have a single output frequency, so what you're trying to do is essentially impossible. It is possible to determine the dominant or fundamental frequency of a sound file, but this becomes more difficult to do (and less accurate) the shorter the file is. A one-millisecond snippet of CD-quality (mono) sound consists of only 441 samples.

Are you perhaps trying to convert a recording into its component notes, and then reproduce the tune with your function that plays frequencies? To see how fundamentally difficult this task is, try googling "wav-to-midi".

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