function [b, a] = computeCoeffs(Fs, Wp, Ws, Rp, Rs, ftype)
[n, Wn] = buttord(Wp, Ws, Rp, Rs);
[b, a] = butter(n, Wn, ftype);
fileReader = dsp.AudioFileReader('IGottaFeeling.wav', 'SamplesPerFrame', frameSize, 'PlayCount', 1);
Fs = fileReader.SampleRate;
deviceWriter = audioDeviceWriter('SampleRate', Fs);
totalFramesToPlay = floor(Fs * durationInSeconds / frameSize);
[b1, a1] = computeCoeffs(Fs, 500, 800, 1, 50, 'low');
[b2, a2] = computeCoeffs(Fs, [500 2000], [300 2200], 1, 50, 'bandpass');
[b3, a3] = computeCoeffs(Fs, [2000 4000], [1800 4200], 1, 50, 'bandpass');
[b4, a4] = computeCoeffs(Fs, [4000 6000], [3800 6200], 1, 50, 'bandpass');
[b5, a5] = computeCoeffs(Fs, 6000, 5800, 1, 50, 'high');
saBefore = dsp.SpectrumAnalyzer('SampleRate', Fs, 'Title', 'Spectrum Before Filter');
saAfter = dsp.SpectrumAnalyzer('SampleRate', Fs, 'Title', 'Spectrum After Filter');
while ~isDone(fileReader) && frameCounter < totalFramesToPlay
linearGain1 = 10^((gain1-0) / 20);
linearGain2 = 10^((gain2+0) / 20);
linearGain3 = 10^((gain3+0) / 20);
linearGain4 = 10^((gain4+0) / 20);
linearGain5 = 10^((gain5+0) / 20);
[ch1, zi1] = filter(b1, a1, x, zi1);
[ch2, zi2] = filter(b2, a2, x, zi2);
[ch3, zi3] = filter(b3, a3, x, zi3);
[ch4, zi4] = filter(b4, a4, x, zi4);
[ch5, zi5] = filter(b5, a5, x, zi5);
frameCounter = frameCounter + 1;