Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8835469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:16:04+00:00 2026-06-14T09:16:04+00:00

I need to perform FFT and I have a sound sample .wav format. The

  • 0

I need to perform FFT and I have a sound sample .wav format.
The function needs double[] xRe, double[] xIm, REAL PART and imaginary part How to convert the sound file into double[]?
I have never seen something like that. Could not find in the internet that kind of operation.
This is this sound sample:
http://www.speedyshare.com/fFD8t/e.wav

Please help, cause I used Pascal and now don’t know what to do here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:16:06+00:00Added an answer on June 14, 2026 at 9:16 am

    It’s a simple stream operation.

    1. You have to read wav file header.
    2. You have to read data bytes.

    Paste from MSDN:

    BinaryReader reader = new BinaryReader(waveFileStream);
    
    //Read the wave file header from the buffer. 
    
    int chunkID = reader.ReadInt32();
    int fileSize = reader.ReadInt32();
    int riffType = reader.ReadInt32();
    int fmtID = reader.ReadInt32();
    int fmtSize = reader.ReadInt32();
    int fmtCode = reader.ReadInt16();
    int channels = reader.ReadInt16();
    int sampleRate = reader.ReadInt32();
    int fmtAvgBPS = reader.ReadInt32();
    int fmtBlockAlign = reader.ReadInt16();
    int bitDepth = reader.ReadInt16();
    
    if (fmtSize == 18)
    {
        // Read any extra values
        int fmtExtraSize = reader.ReadInt16();
        reader.ReadBytes(fmtExtraSize);
    }
    
    int dataID = reader.ReadInt32();
    int dataSize = reader.ReadInt32();
    
    
    // Store the audio data of the wave file to a byte array. 
    
    byteArray = reader.ReadBytes(dataSize);
    
    // After this you have to split that byte array for each channel (Left,Right)
    // Wav supports many channels, so you have to read channel from header
    

    Here this is more detailed explanation:

    http://msdn.microsoft.com/en-us/library/ff827591.aspx

    And here you can read about WAV file format:

    https://ccrma.stanford.edu/courses/422/projects/WaveFormat/

    And something about WAV as complex numbers and FFT:

    How to convert wave data into Complex numbers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to perform an action after a session times out. However I have
I need to perform queries in a ADO.NET model by using LINQ. I have
I need to perform send photo functionality. I have a web service method which
I need to perform an action on double click of a text box, but
I need to perform the following on MySQL/InnoDB. Assume I have a table consists
I'm new to this field - but I need to perform a WAV-to-MIDI conversion
I need to perform normalization on data structure. I have one table with lots
I need to perform http PUT operations from python Which libraries have been proven
I need to perform multiple operations on an Image, for example, I need to
I need to perform a few checks (enable or disable a label elsewhere on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.