Convert fft to .wav file

17 views (last 30 days)
Tim Garrett
Tim Garrett on 6 Dec 2020
Commented: Mathieu NOE on 8 Dec 2020
I want to convert a fft of a geophysical signal to an audible signal or .wav file. The fft has frequency amplitude and phase, all the needed ingredients it seems for a sound. What is the code for the conversion? (I can deal with the frequency shift to an audible frequency range). Thanks.
  5 Comments
Tim Garrett
Tim Garrett on 8 Dec 2020
I understand the above points. Except that an audio signal is fundamentally a tone that has the information contained in an fft, specifically amplitude, phase, and frequency. I imagine I use some combination of audiowrite and sound, but I'm not sure, in particular on the point of what the nature of the input should be. From audiowrite:
writes data Y to an audio file specified by the file name FILENAME, with a sample rate of FS Hz.
What is the nature of the data Y? It sounds like it isn't an fft. Is it just a time series of some periodic function?
Mathieu NOE
Mathieu NOE on 8 Dec 2020
an audio signal can be evrything from a fixed frequency sinus to purely random noise (or colored noise if we add some filtering). the sound of the ocean is closer to a random noise than a tone for example.
if you look at the frequency content of a music file , it changes all the time, there is not much periodicity there - unless you listen to some very specific electronic music (with a looper)
audiowrite is just a way to save your time data (your music, your voice ) into a specific format (wav is just one of them)
it does not do anything in terms of fft or ifft - again this is a completely separate topic.

Sign in to comment.

Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!