CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Question Microphone and pitch/frequency of input

    I'm fairly new to C++ in generally, and I was wondering how to go about receiving input from a microphone and using it to determine the input's frequency/pitch? I'm not certain how I should start doing this, so if anybody has any pointers that would be great. If there are any libraries, tutorials or anything that could get me started I would appreciate it. Thanks!

  2. #2
    Join Date
    Jul 2002
    Location
    Portsmouth. United Kingdom
    Posts
    2,727

    Re: Microphone and pitch/frequency of input

    "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
    Richard P. Feynman

  3. #3
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: Microphone and pitch/frequency of input

    And if you are writing code for customers (who generally are not using Vista), take a look at DirectSound. Besides kernel mode audio (which nobody seems to know how to use and it is undocumented), it is the best for latency and doing stuff like frequency counting. It is also backwards compatible to XP.

    One big kudos, 95% of the soundcards out there have frequency problems, being up to 2-3% off. A simple 8KHz sine wave may come in at 7895 up to 8136 in the basic testing I have done. I actually have not personally seen one that is accurate, although I have friends with fancy digital I/O soundcards that claim that they are accurate.

    -Erik

    P.S. Don't bother with ASIO - it only supports 1 soundcard at a time and requires special drivers.

  4. #4
    Join Date
    Sep 2006
    Posts
    3

    Re: Microphone and pitch/frequency of input

    That was a good help. Thankyou!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured