Skip to content

An experiment doing DSP on .wav audio files in C++

Notifications You must be signed in to change notification settings

lachrimae/filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filter

This is a sort of "Hello world" of DSP, C++ and assembly. It compiles into an executable that runs one of two filtering processes. The first one, "butter", runs a 4-pole Butterworth filter with a corner frequency of 700 Hz. The mathematical function required was calculated using A.J. Fisher's mkfilter package, accessible at this webpage.

The second filtering process is arguably the most elementary filter possible of its kind. It sets the present output sample to the average of the two most recent input samples. I used SSE2 assembly instructions to compute this.

My code is mostly in dsp.cpp, and I use the AudioFile library to manage I/O.

Build instructions

mkdir build
cd build
cmake ..
make

Run instructions:

filter butter /path/to/audio.wav

Or

filter simple /path/to/audio.wav

About

An experiment doing DSP on .wav audio files in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published