比较简单的声音-最近的频率是多少 [英] Comparing Simple Sounds - What is the Closest Frequency

查看:97
本文介绍了比较简单的声音-最近的频率是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我有一个很有趣的问题要解决.

我想采用一种非常简单的声音(在钢琴上弹奏一个音符)并尝试以某种方式进行处理,以便我可以打印出最有可能弹奏的音符.

通过一些谷歌搜索和搜索,我遇到了快速傅立叶变换,但不确定如何使用它来分析wav文件中的数据.

我的另一个想法是,每次演奏时,音符应大致相同.如果是这样的话,将两个WAV文件中的百分比匹配转换为字节数组是否有用?

思想和想法将不胜感激.

更新:
我是否认为我需要专用的声卡才能使用Accord是正确的吗?当我运行示例程序并单击开始"时,它说正在等待声卡",然后停止工作.

Hello everyone!

I have a rather interesting problem to solve.

I want to take a very simple sound (one note played on the piano) and try to process it in such a way that I can print out which note is most likely being played.

From some googling and searching I have come across the fast fourier transform but am not entirely sure how I would use this to analyze data from a wav file.

Another thought I had was that a note should be more or less the same each time it is played. If that is the case could a percentage match on two wav files turned into byte arrays be of any use?

Thoughts and ideas would be much appreciated.

UPDATE:
Am I correct in thinking I will need a dedicated sound card to use Accord? When I run the sample programs and click start it says "waiting for sound card" then stops working.

推荐答案

我想说一看Autotune.Net

http://channel9.msdn.com/coding4fun/articles/AutotuneNET [
I''d say have a look at Autotune.Net

http://channel9.msdn.com/coding4fun/articles/AutotuneNET[^]

As you''ll see, pitch detection is obviously vital to an autotune program, so that will help you with what you''re trying to do.


每个钢琴键都有独特的频率.因此,频域即傅立叶变换有助于从噪声中识别纯声音的模式.您可以使用该模式比较声音.

另一个我想到的是,每次演奏时,音符应该大致相同.如果是这样的话,将两个wav文件中的百分比匹配转换为字节数组会有用吗?"

这种想法仅适用于固定设置的一架钢琴.例如,如果钢琴的音量增加/减少又取决于记录器设备的距离,则字节数组每次都不会具有可比性.然后,您需要对各种此类参数的数据进行归一化.

相反,频率将保持不变.音调,音色等其他重要参数也很重要.

迪伦·莫利(Dylan Morley)提供了有关音高检测的链接.您可能还会从其他人那里获得更多信息.

这是一个免费库的链接,该库具有将音频转换为傅立叶和希尔伯特变换的功能

http://accord-net.origo.ethz.ch/wiki/features [ ^ ]

祝你好运
Each piano key has unique frequency. So the frequency domain i.e fourier transformation helps to identify the pattern of the pure sound from noise. That pattern you could use compare the sound.

"Another thought I had was that a note should be more or less the same each time it is played. If that is the case could a percentage match on two wav files turned into byte arrays be of any use?"

This idea works only for one piano with constant setting. For example if the volume of the piano increase/ decrease which again depends on the distance of the recorder device then the byte array will not be comparable every time. Then you need to normalize the data for various such parameters.

Instead frequency will remain same. Well other things like pitch, timbre also important parameters.

Dylan Morley given a link about pitch detection. You may get more information from other people as well.

Here is a link for a free library which has functionality to transform audio to fourier and Hilbert transforms

http://accord-net.origo.ethz.ch/wiki/features[^]

Good luck


这篇关于比较简单的声音-最近的频率是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆