Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
970 views
in Technique[技术] by (71.8m points)

android - Determine the audio frequency of sound received via the microphone

I am trying to understand how to go about determining the frequency of various sounds captured on the phone via microphone.

I am attempting to display a graph plotting the frequency of the note.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The "notes" produced by most musical instruments may contain spectral content at a large number of frequencies. Furthermore the frequency spectrum of a "note" may or may not contain significant peaks at what a human would call the musical pitch of the note. So you may not even be asking the correct question.

There's more commentary on this issue in one answer to this stackoverflow question.

A spectrograph (via repeated usage of an FFT or other filter bank) is a common technique for displaying, in graphic form plotted against time, the frequencies contained in captured sound, with a trade-off in time response versus frequency resolution.

There's example spectrograph code in Apple's aurioTouch sample app available from the iOS Developer web site.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...