Thread: Sound Recognition

  1. #1
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428

    Sound Recognition

    Hey guys,
    I started a new project and I'm having an issue finding applicable programming information regarding the project I'm trying to do. I have a lightsnake (1/4 inch sound jack to usb converter) analog to digital converter. I want to write a piece of software that utilizes this sound input in assisting with multiple musical aspects. Translating your songs to sheet music, teaching to read sheet music, ect. The options are really endless for allowing a musician to input a "event" being a note and have a output relate to it onscreen.

    I am not nearly where I need to be as a programmer to make this happen though. I've played with input output through creating text files but I'm not sure where this will start or how to even compare a sound input using regular C++ variables that I am used to. If anyone knows of some tutorial/lib/article ect. That would pertain to this I'd really appreciate a kick in the right direction. My google and forum searches haven't lead me in the right direction yet. Thank you for you time.

    (this software is intended for gaming purposes)

  2. #2
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428
    If I could narrow down my request for information does anyone know how to access a USB stream in windows 7 via a C++ command. I've already found out I cannot read this stream without creating a file for it(which I don't neccessarily trust.. shouldn't there be a way to set up a "network" between it and your computer or a buffer that you just compared and then deleted). Which already makes the task more complicated than I had planned, but I think I'll be able to work through it if I can just find a way to save a bianary file from a USB stream. Is there an address for the object that I can use to access it? I'm hoping for a #include from somebody that allows you to access to streams from USB "plug and play" via C++.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    If you're trying to read input from an audio device, there's probably a directX library that can do it (probably DirectInput, DirectShow or DirectSound). Other than that, I have no idea.

  4. #4

    Join Date
    May 2005
    Posts
    1,042
    Getting and recording the sound isn't too terribly difficult, as the Direct* libraries mentioned above carry this functionality, as well as FMOD (search for FMOD GET SPECTRUM())

    The more difficult part actually comes with the math involved, you're going to need a math library that can take the time domain data (the stuff you hear as you listen to music) and convert it to frequency domains (see FFT, energy spectrum, nyquist frequency, 'CEPSTRUM').
    I'm not immature, I'm refined in the opposite direction.

  5. #5
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    428
    Thnx for the info I'll search in that direction. Spent 3 hours in Barnes and Noble and didnt find anything in a book about it. I figure I'm just looking for the wrong words.... frustrating.

  6. #6

    Join Date
    May 2005
    Posts
    1,042
    I took courses in calculus, differential equations and engineering mathematics but didn't really feel comfortable with the topics I mentioned above until I did work for a professor using MatLab. If you're a student, you can get a copy for like a $100, but there's also an open source equivalent called Octave. They both implement routines you'd need to get started with signal processing.

    http://www.gnu.org/software/octave/

    http://www.fmod.org/

    Note that you can load the FMOD library (or any other library provided you supply the proper interface) into Octave/MatLab to test your routines.
    Last edited by BobMcGee123; 07-25-2010 at 05:39 AM.
    I'm not immature, I'm refined in the opposite direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 01:58 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  3. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 04:33 PM
  4. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM
  5. Sound Tone Recognition?
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 05-19-2002, 11:13 PM