Click here to Skip to main content
11,802,205 members (53,626 online)
Click here to Skip to main content

Sound visualizer in C#

, 15 Aug 2007 GPL3 447.8K 24.4K 216
Rate this:
Please Sign up or sign in to vote.
Simple sound sampler with visualization
Screenshot - SoundViewer.jpg


This project demonstrates the use of the Fast Fourier Transform and Windows GDI to produce near real-time visualizations of the time and frequency domains of sound.


While looking for information on signal processing for a robotics project, it became apparent that examples written in C# were hard to find. This led me to create some of my own classes, which I have provided here for this demonstration.

Using the Code

Audio input for this demonstration is provided by the Wave classes developed by Ianier Munoz. Wave samples are further processed using the AudioFrame class.

class AudioFrame
    private Bitmap _canvasTimeDomain;
    private Bitmap _canvasFrequencyDomain;
    private double[] _waveLeft;
    private double[] _waveRight;
    private double[] _fftLeft;
    private double[] _fftRight;
    private SignalGenerator _signalGenerator;
    private bool _isTest = false;
    public AudioFrame(bool isTest)
        _isTest = isTest;

    /// <span class="code-SummaryComment"><summary>


This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Jeff Morton
Systems / Hardware Administrator
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionNullReferenceException occured Pin
MA_hosseini28-Feb-13 0:53
memberMA_hosseini28-Feb-13 0:53 
AnswerRe: NullReferenceException occured Pin
k0ennn28-Feb-13 22:51
memberk0ennn28-Feb-13 22:51 
I have exactly the same error. I realy hope some1 can help us, cause i have no clue how to fix this ^^
AnswerRe: NullReferenceException occured Pin
James Melkon Smith2-Mar-13 7:34
memberJames Melkon Smith2-Mar-13 7:34 
GeneralRe: NullReferenceException occured Pin
Gettor900011-Apr-13 23:42
memberGettor900011-Apr-13 23:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151002.1 | Last Updated 15 Aug 2007
Article Copyright 2007 by Jeff Morton
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid