I am wondering if there is a way to read an audio file to determine when the beat is greater than a given Hz? Such as every time the bass drum hits it will tell me.

I do not have any code yet, I know how to play a simple audio file I just am not sure how to read the data to determine the spikes.

Thanks
-magic

Seems like an interesting project. I don't actually know anything about this myself, except that you might have to do some hardware interfacing (with the soundcard).

This book looks like it has a lot of material on the subject:
http://www.pearsonhighered.com/educator/academic/product/0,3110,0201419726,00.html

Other than that, all I can suggest is that you run some google searches to see what you can find.

Note: Hertz has to do with the frequency of the sound wave (i.e. pitch), I didn't know if you meant volume (decibel) spikes or changes in pitch...And you may have to do some research on how sound is stored digitally

Thanks!

I am trying to make a game based around beats of a song. I need my program to output every time the most prominent beat (not sure if right wording) occurs.

Thanks!

I am trying to make a game based around beats of a song. I need my program to output every time the most prominent beat (not sure if right wording) occurs.

Sounds like you are looking more for volume than pitch.

Some ideas: you may want it to output everytime a beat exceeds a certain sound level (or pitch if you decide to use that instead). If not this, then you will likely need to specify a time period (for example, one bar length) for your program to search (however this works) to output...i.e. most prominent beat every bar. This way it will continue to output whatever it is you are outputting...

Goodluck though! Let me know whatever you figure out (I'd be interested in seeing your source code when your done).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.