Guitar connected to the computer

Hi!

I want to write a progam which recognizes which notes i'm playing on my guitar. For this i probably have to connect the guitar to the mic-in of my soundcard. But how can i get access to it by C++?

And when i got access, how can i recognize the frequencies / notes?
Does anyone know how to do this? For answers i would be
very grateful!

Comments

  • : I want to write a progam which recognizes which notes i'm playing on my guitar. For this i probably have to connect the guitar to the mic-in of my soundcard. But how can i get access to it by C++?
    :
    Are you doing this on Windows? If so, to get the sound input you'd probably use the waveIn APIs (look them up in the MSDN). For Linux and some UNIX OSes, you can look to reading from /dev/dsp, though you'll need some ioctl calls to get it set up. The docs are out there. Somewhere. ;-)

    : And when i got access, how can i recognize the frequencies / notes?
    : Does anyone know how to do this? For answers i would be
    : very grateful!
    :
    As a guitar generates many soundwaves (e.g. for the different harmonics) that get super-imposed, you're going to have to break those down into individual waves so you can find the fundemental frequency. For that you'd need a Fourier Analysis algorithm, e.g. FFT.

    Hope this points you in the right direction,

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • The program is for windows and i'm using the Win32 API.
    I will ask google about this alghoritm and take a look at the MSDN.
    So far thank you very much!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories