Need help reading .wav file

Simkoo

New member
Joined
Jun 18, 2019
Messages
2
Programming Experience
1-3
I'm trying to create a program that reads a .wav file and gets the spectrum data from it. So basically a audio visualizer. However all online examples seem to use an audio driver hook, whereas I want to read .wav data.
Please help, I have no idea how to do this.
I'm using C# in winforms.
 
The github link you posted has gotten my wav file into an array, but I have no idea what this is an array of, and how to turn it into spectrum data. Do I take every certain bunch of numbers?
 
No you need specific pieces of the data first! And you should read the documentation I gave you as it explains what to do. Generally you'd be better working with non compressed wav files, as this is more straightforward. What you're looking to get, is the header of the file and cypher the data you need out of it. Each part of the file contains different bits of information which is all covered in the documentation that I gave you. They are not arrays, and while they're alike and both hold data, they're lists he's using. I would have used an array, and done it a little differently. Lists are used far more often in c# instead of arrays, but mostly because they are easier to sort data within.

There are two sources of data being pulled into lists, what are they? Take some time to study what I gave you, and to read what the code is doing.
 
Back
Top Bottom