blitzbasic

Author Topic: How extract in audio file, the Spectrum of the WaveForm  (Read 320 times)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 2237
  • Integrated Brain
    • View Profile
This question, it´s a contuinity about another post about the time of a sound file.

Well at this point, I like if it´s possible, extract the info of a simple .wav or better .mp3, I need (but not necessary), for the UI of my Level Editor, to have visible the Spectrum of the Sample, so I know when I have to up or down the volume.

Kinds Regards,
Iván J.


Offline Hemlos

  • To boldy go where no pixel has gone before.
  • Global Moderator
  • Prof. Inline
  • ****
  • Posts: 1399
  • Gone Fishin'!
    • View Profile
    • Silver Volumetric Software

WAV file format...you can extract the sample info using glbasic read commands.
How? youll need to learn wav structure format.
Theres images of this on google image section.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

http://silver.binhoster.com/

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 2237
  • Integrated Brain
    • View Profile
HI Hemlos thanks... I think someone comment me about Fourier Transform... Now my Editor, it´s not finished I don´t use in my Game... but I think after make it, I try to make it...

Thanks for the info

Offline Ocean

  • Global Moderator
  • Dr. Type
  • ****
  • Posts: 269
  • I'd rather be flying...
    • View Profile
    • Forex Trading Ideas
as to displaying the spectrum of a (sound or any) signal:  you'd need to program a FFT (fast Fourier Transfer) routine.  A FFT can give you the phase and amplitude of a set of frequencies within your signal's bandwidth.   Google for FFT.... ;)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 2237
  • Integrated Brain
    • View Profile
Thanks ocean I take a look you told me... sometimes it´s more complex know how it´s named the things to do, than make it (I´m sure I´m not capable to do this, but I take a look)...

Thaks for all answers!!!  :good:  :booze:

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1199
    • View Profile
The new FMod does this but sadly offline.
http://www.glbasic.com/forum/index.php?topic=2248.0

Offline Hemlos

  • To boldy go where no pixel has gone before.
  • Global Moderator
  • Prof. Inline
  • ****
  • Posts: 1399
  • Gone Fishin'!
    • View Profile
    • Silver Volumetric Software
New FMOD is 4 years old lol...where is z0r?
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

http://silver.binhoster.com/