-1

I want to write a program that will read sound files of different instruments playing the same note, and show the different signature frequencies.

The library I am using to do so is JTransforms, since it seemed to be the one that was recommended the most to perform FFTs in java. I have not found any clear explanations on how to use this library, but from what I can gather, I need to pass in an array of real and complex numbers into the methods provided by the library. How do I get these numbers from my audio clips? I have very basic knowledge of sound processing, since this is only my term project for my first computer science class.

  • typically your audio data is a floating point array which you send into a fft call which will return a new array of complex numbers ... the real skill is in ability to make sense of the array returned from the fft call ... see details at https://stackoverflow.com/a/55699449/147175 – Scott Stensland Apr 23 '19 at 20:47
  • help your self - with a classmate https://stackoverflow.com/questions/55782983/understanding-fft-output-from-jtransform-and-columbiafft – gpasch Apr 23 '19 at 23:43

1 Answers1

0

As you can see in this or this question you need to read file as array of bytes. Don't worry about complex numbers, because you need only real part and can fill imaginary part with 0 (you can see it also in questions I linked above).

Iwo Kucharski
  • 3,735
  • 3
  • 50
  • 66