Wish
Wish

Reputation: 1614

C# generate soundwave at real time

i would like to start some project for fun, and found my interest in sounds. So i would like to make some things move with sound rhythm. But i don't know, e.g., how winamp (in image) generates values to draw those bars. How could i make it happen in C#? Can anybody give me some tips ?

edit: i will figure out this: http://wpfsvl.codeplex.com/ Thing in red circle

Upvotes: 1

Views: 1662

Answers (1)

Seth Flowers
Seth Flowers

Reputation: 9190

You should read up on Fast Fourier Transforms.

A fast Fourier transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) and its inverse.

and

A DFT decomposes a sequence of values into components of different frequencies

With the FFT, you can split up a soundwave into it's component frequencies, ie: you can see the levels of different frequencies in the original soundwave, and then graph them in some sort of fancy bar chart, like in your image.

The following question is related to FFT's and C#: An implementation of the fast Fourier transform (FFT) in C#

Upvotes: 1

Related Questions