title: How do I create a ComplexSignal object from a Signal object in Accord.NET?
body: <p>I am trying to perform an FFT on a Signal produced by a .wav file that has 1 channel and 64064 samples (approximately 4 seconds long at 16k). I am using Accord.NET and the following code to attempt to create a ComplexSignal object, which is required to perform an FFT.</p>
  
  <pre><code>string fileName = "mu1.wav"; //the name of my wave file
  WaveDecoder sourceDecoder = new WaveDecoder(fileName); //Accord.Audio.Formats.WaveDecoder
  Signal s = sourceDecoder.Decode(); //SampleFormat says Format32bitIeeeFloat
  ComplexSignal = s.ToComplex(); //This throws the following exception:
  
  //InvalidSignalPropertiesException 
  //Signals length should be a power of 2. 
  </code></pre>
  
  <p>Reading the source code of Signal, this should only be thrown if the Signal.SampleFormat isn't Format32bitIeeeFloat, which it is.</p>
  
  <p>I'm really surprised it isn't easier to manipulate the audio features (specifically the frequencies) of a wav file in C#.</p>