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

    Evalutating frequency of sound input

    Hi,

    I have a question about analyzing sound input in real time. I am essentially designing a program that will allow a person to play Frets on Fire (a Guitar Hero Clone) with a real electric guitar with sound wired into the sound card input. The program needs to evaluate the tone of sound input in real time and simulate a button press based on that tone. I am running into problems getting the frequency of incoming sound. I have been looking at Waveform and DirectSound, but most of what I'm finding deals with reading sound from wav file storage, and also I can't find anything to actually analyze the frequency. Just about all the references I can get my hands on have to do with simply recording and playing back sound. I'm not a particularly experienced coder, so forgive me if this is a really fundamental concept, but how would you recommend going about analyzing sound input like this?

    Thanks very much.
    Last edited by RoughitforGreen247; February 5th, 2008 at 07:35 PM.

  2. #2
    Join Date
    Feb 2008
    Posts
    48

    Re: Evalutating tone of sound input

    Fast Fourier Transforms will get you from a signal to a spectrum analysis, from which you can figure out which note is being played.

  3. #3
    Join Date
    Feb 2008
    Posts
    2

    Re: Evalutating tone of sound input

    Okay, I can see how a Fast Fourier Transform could get me from a time value to a frequency value. That makes sense. But how can I retrieve some time value from sound input in the first place?

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