How to generate your own emphasis filter?

A custom filter can be made using Matlab or by contacting us. The filter coefficient file format is the same as the Matlab mat-format, but change the extension name from .mat to .emp. An example on generating and saving filter coefficients in Matlab is given below. Note that this generates a filter that is unstable if it is inverted so it can only be used for pre-filtering, not for post-filtering (since the post-filtering uses the inverted filter). Since the purpose of this filter is to band-limit the output below 80 Hz for the sampling frequency 48000 Hz, this is no problem for this application.

 

Fs=48000; % Sampling frequency in Hz

FcutOff = 80; % Cutoff frequency in Hz

Wn= FcutOff/(Fs/2); % Normalized cutoff frequency

FilterOrder = 6; % Filter order

FilterType = 'high'; % Filter Type

[b,a] = BUTTER(FilterOrder,Wn, FilterType); % Generate filter

save HighPassFc80Hz_Fs48000Hz.emp a b -mat

 

To use this filter, run the code and copy the generated file ‘HighPassFc80Hz_Fs48000Hz.emp’ to the ‘Filters’-folder under the WinMLS-folder.

 

The example below generates a bandpass filter for the frequency 250 Hz and sampling frequency 22050 Hz.

 

Fs=22050; % Sampling frequency in Hz

FcutOff = [125 500]; % 250 Cutoff frequency in Hz

Wn= FcutOff/(Fs/2); % Normalized cutoff frequency

FilterOrder = 6; % Filter order

FilterType = 'bandpass'; % Filter Type

[b,a] = BUTTER(FilterOrder,Wn, FilterType); % Generate filter

save BandPassFc1500Hz_Fs22050Hz.emp a b -mat