0

this is my first post. I want to create a .wav file from an array of amplitude and frequencies. How can I do this ? Thank you I am able to get the spectrum too.

ChaosPredictor
  • 3,777
  • 1
  • 36
  • 46
nvoul
  • 1
  • "Amplitude and frequencies": do you mean that what you have is a the result of an FFT transform ? Can you tell us how was this array generated ? – Gabriel Devillers Dec 19 '18 at 17:45
  • that's it, and i've made some transformations on my signal, so i have one array containing amplitude and one list containing frequencies. – nvoul Dec 19 '18 at 18:00

1 Answers1

0

Use the write function to create a wav file. Make sure that the array is in integers as well.

  • https://stackoverflow.com/questions/10357992/how-to-generate-audio-from-a-numpy-array if you do not understand here is a link to someone's post who is more knowlegdeable then I. – Sebastian Bourgoin Dec 19 '18 at 17:35
  • Ok but what should my array contain ? The amplitude of the signal ? – nvoul Dec 19 '18 at 17:58