Neil's Digital Filter Page
Why this page?

Tell me about digital filters
Shareware
Dos_utilities
DLLs and demos for developers
Other interesting places...
Contact me
Home

Dos Utilities

Here are a couple of utilities I knocked together some time ago - they're sixteen bit DOS apps built under Borland C++v3.0, though they will run quite happily under Windows 3.1 and 95 (I don't trust 98 enough yet to put it on my system!)

Both programs are supplied with both an executable and the source code. You are free to use or modify this code in any non-commercial applications. Please contact me if you want to use it commercially.

Steptone

  • What does Steptone do?
    • Steptone.exe is a dos executable which creates a test signal suitable for checking the response of digital filters. This output is presently in the form of a Windows 'wave' file, mono, at 22050 samples per second. If you want to change this, you'll have to recompile the code.

      The program requires one parameter on the command line, the name of the file you want to create. Full pathnames are supported in the dos 8.3 format. The program will work from the windows 'run' menu option.

      The audio content in the file consists of ten groups of tones, each separated by a 0.2s silence. These silences show up on a wave editor's display, and let you see what frequencies still exist after your filter has been at the test file.

      Each of the groups of frequencies is further split into 250Hz blocks: i.e. the first block consists of 1000,1250,1500, and 1750Hz. The next group starts with 2000Hz, the third with 3000Hz. The last block is 10000-10750Hz, almost the Nyquist frequency. The entire test burst totals ten seconds. The output is at digital zero level.

      Warning: Digital zero level is the absolute maximum level a digital signal can have. Industry technique is to use -18dB as a zero level to leave headroom for high level peaks. You may want to us a product like Cool Edit Pro to reduce the level by at least 3dB before you try any filtering on it as any gain in the filter will produce nasty overload clipping.

  • How do I use Steptone?
    • Either at the dos prompt (c:>) or in the windows 'run' box, type 'steptone xxx.wav', where xxx is the name you want for your file output. You must type the .wav bit, or you'll get a correctly built file that you'll have to rename later if you want a windows editor to see it. The program runs in less than a second on a 133 Pentium.

  • How do I compile Steptone.cpp?
    • The only thing to remember is that it should be compiled in the LARGE memory model. The original was compiled using Borland Turbo C++ v3.0, but apart from // comments, there are no C++ structures used, so any C or C++ compiler should work without too much fiddling.

  • Where does the code come from?
    • All code in Steptone.exe and steptone.cpp is written by me, Neil Barnes, and copyright Neil Barnes 1997.

    Fir

  • What does Fir do?
    • Fir.exe is a dos executable which performs an FIR filter on a windows 'wave' file. The parameters for the filter can be either defined at compile time, or defined at runtime in an external binary file. Presently, the filter only operates on mono sources at sixteen bits per sample. The sample rate is not important, other than to note that the filter coefficients are calculated as fractional parts of the sample rate. This means that the coefficients which give a 5kHz cutoff on a 22050 sample per second source will give a 10kHz cutoff if the sample rate is 44100.

  • How do I use Fir?
    • Either at the dos prompt (c:>) or in the windows 'run' box, type 'fir xxx.wav yyy.wav zzz.fir' where

      'xxx' is the name of the file you wish to filter,
      'yyy' is the name of the output file,
      'zzz' is the name of the filter parameter file.

      Note that you must include the extensions ('wav' and 'fir') to use windows wave files. The zzz.fir file can be generated using the program Filter.exe: see the notes on using Filter.exe for details of the .fir file format.

  • How do I compile Fir.cpp?
    • The only thing to remember is that it should be compiled in the LARGE memory model. The original was compiled using Borland Turbo C++ v3.0, but apart from // comments, there are no C++ structures used, so any C or C++ compiler should work without too much fiddling.

  • Where does the code come from?
    • All code in Fir.exe and fir.cpp is written by me, Neil Barnes, and copyright Neil Barnes 1997.