Real-time pitch detection using FFT(使用 FFT 的实时音高检测)
问题描述
我正在尝试使用 C++ 进行实时音高检测.我正在测试来自 performous 的一些代码(http://performous.org/),因为其他一切都没有为我工作.我确信这行得通,但我无法让它发挥作用.我已经尝试了几个星期,但我一直无法让任何音高检测代码工作.
I'm trying to do real-time pitch detection using C++. I'm testing some code from performous (http://performous.org/), because everything else hasn't worked for me. I know for sure that this works, but i just cant get it to work. I've been trying this for a few weeks now, and I haven't been able to get any pitch detection code working.
推荐答案
您应该创建一个已知单一频率的数据,并通过程序运行它,看看它是否能得到正确的结果,而不是使用来自麦克风的输入.然后你可以给它添加谐波,看看是否有效.真实世界的数据对于初始测试来说变化太大.
Instead of using input from the mic, you should create data of a known single frequency and run that through the program and see if it gets you the correct result. Then you can add harmonics to it and see if that works. Real world data is just too variable for initial testing.
这篇关于使用 FFT 的实时音高检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 FFT 的实时音高检测
基础教程推荐
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- CString 到 char* 2021-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
