Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 367 Vote(s) - 3.61 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to extract frequency out of WAV sample data?

#1
I'm developing an application in c to read simple PCM WAV files. My question is, how should I interpret the samples from the data chunk, so that I can extract the sample's frequency?

Given a WAV example, how can the original data represent frequencies. E.g. this data chunk, 24 17 1e f3, for stereo, 16 bits, the left channel sample is, 0x1724 = 5924d, means 5924Hz ? How can that be, for samples that are signed or frequencies that humans can´t hear?
Reply

#2
Your assumption is incorrect.
The sample data is simply a digital representation of the actual sound wave. The numbers represent wave amplitude, the array offset represents time.

I would suggest reading about [How Audio is Represented](

[To see links please register here]

), specifically
[PCM](

[To see links please register here]

).

To convert this data (amplitude-vs-time) to frequency data, you need to understand the basic concepts of [The Fourier Transform](

[To see links please register here]

)

I really suggest taking the time to read these before trying to do any audio processing.
Reply

#3
You can extract the sample rate in the WAV header, but if you need the actual frequency data of the audio that was recorded, i.e. how much energy at 200Hz, how much at 2kHz, how much at 8kHz, etc. you need to do an FFT, or run it through a spectrogram.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through