The harder you work,
           the
luckier you seem to be.  

Spectral Analysis with gnu Octave

The primary function of this application is to read an audio file (in *.wav format), into memory and perform a spectral analysis of its pulse code modulation (PCM) signal.  It also implements a one band per octave spectrum analyzer.

The application is packaged into the following archive that includes a stereo *.wav file, for your convenience.
            
specAnalysis.zip

As can be seen, the source code consists of four files (spec.m, dispAudio.m, dispAnalysis.m, dispAnalyzer.m).  The bulk of the program logic is located in spec.m, which also contains the main entry point.

The first few lines of spec.m set constants that control the application’s overall operation. 
          dAudio     = 1;   %0 to skip, 1 to display
          dAnalysis = 2;   %0 to skip, 2 to display
          dAnalyzer = 3;   %0 to skip, 3 to display
Setting dAudio, dAnalysis, and / or dAnalyzer to non-zero values will cause the application to create windows that display the PCM audio stream (figure 1.), a spectral analysis of the audio stream (figure 2.), and / or a spectrum analyzer (figure 3.).

Project Description

2  of  4

 

www.MichaelDWelch.net                                                                                   MichaelDWelch@(no-spam)acm.org

www.linkedIn.com/in/MichaelDWelch                                                                 303-920-9749      remove (no-spam)

Figure 1.

Figure 2.

Figure 3.