简体   繁体   English

在C#中从和弦中提取音符

[英]Extracting notes from chords in C#

At the moment I have no code to help me, but the Fast Fourier Transform probably has something to do with my goal. 目前,我没有代码可以帮助我,但是快速傅立叶变换可能与我的目标有关。

I would like to take microphone input and 'extract' the notes from the chords, whether they are spoken vowels or instrumental. 我想使用麦克风输入,并从和弦中“提取”出音符,无论它们是口语元音还是乐器。 I want to display the values of the extracted frequencies in a list after a certain cue. 我想在某个提示后在列表中显示提取频率的值。 The cue is not important. 提示并不重要。

Thanks for any help, I'll add more if needed 感谢您的帮助,如有需要,我会添加更多

This has been covered many times on SO already, but essentially you do this: SO已经对此进行了多次讨论,但实际上您可以这样做:

  • apply window function (eg Hanning) 应用窗口功能(例如汉宁)
  • calculate FFT to get complex spectrum 计算FFT以获得复杂频谱
  • calculate magnitude ( sqrt(re*re+im*im) ) to get power spectrum 计算幅度( sqrt(re*re+im*im) )以获取功率谱
  • find peaks in power spectrum 在功率谱中找到峰值

As others already mentioned there are great questions on SO addressing this in great detail. 正如其他人已经提到的,关于SO的详细解决方面存在很大的问题。 It should be noted however, that in most of those questions you will read that it is very difficult to extract the notes that make up a chord and will not be exact. 但是,应该指出的是,在大多数这些问题中,您会读到,提取构成和弦的音符非常困难,而且不够精确。 You will probably have to end up making an educated guess at best. 您可能最多只能进行有根据的猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM