Author 
Design Tool for Spectral Processors, Fixed Filter Banks & 
Sin_Phi 
The Spectral Filter Calculator is a work in progress toolbox to design a filter bank. It can be used for anything from vocoders to equalizers.
Has been my intention for a while to build some version of the Buchla 296, but hadn't really given the filters much analysis other than moving around the band centers. So after mapping out what the transfer function of a 296 would look like I decided I really needed something that would make my life easier. I made a spreadsheet with a mess of equations, but messing around with a 1000 resistor values back and forth is not my idea of fun. So I wrote something up in MATLAB that will do all the work for me. Hopefully some other people find it useful.
The filters calculated are 4th order multiple feedback low pass, 6th order multiple feedback band pass, and 4th order multiple feedback high pass. The capacitor values are from the E12 series. The low pass and high pass filters use resistors from the E96 series. The band pass has resistor 1 and 2 from the E24 series, but resistor 2 is from the E96 series as that sets the band center. The capacitor values across the 3 stages for each band are constant to reduce the number of unique values. The expectation is that 1% or better resistors and 5% or better capacitors will be used so that no trimming is required.
If you have any suggestions I would be glad to consider them for implementation. Considering alternate filters and possibly configurable filter order.
Spectral Filter Calculator (zip file 6mb)
Setting up the calculator:
 Download the zip and extract the files wherever you want
 Follow the instructions in the readme.txt to get the MATLAB Runtime for 2017a or go to this link MCR
 You need to add the MCR to the path, go to the system environment variables, edit "Path" and add C:\Program Files\MATLAB\MATLAB Runtime\v92\runtime\win64
 Run SpectralFilterCalculator.exe
The first screen you see is the calculate plot of the 3db bands with frequency. The default values are similar to those you might need to reproduce the Frap Tools Fumana. The Log/Lin is a toggle for the vertical axis of this plot that makes it easier to see the lower bands. This screen will show every time you you hit calculate.
If you click the Bands button you will see each of the Bode magnitude plots of the individual bands plotted. These are the outputs you would expect if you had individual band outputs.
There are Odd and Even Bode plots as well as All.
The available inputs are:
 Band Count: Pretty self explanatory, the first band will be low pass and the last high pass. All center bands will be band pass.
 Low Pass Cuttoff: This is the cut off frequency of the low pass filter and the lower 3dB point of the low stage of the fist band pass filter (assuming Bandwidth and Band Gap Mult. = 1).
 High Pass Cuttoff: This is the cut off frequency of the high pass filter and the 3dB point of the high stage of the last band pass filter.
 Low Stage Gain: The gain of the low frequency stage for each band.
 Mid Stage Gain: The gain of the mid frequency stage for each band.
 High Stage Gain: The gain of the high frequency stage for each band.
 R2 Target Value: This is the target for the linear optimization of the band pass filters mid band. This will latter be adjusted to the nearest E96 value.
 Bandwidth Mult.: Controls the width of the 3 bands that make up the band pass filter. Value of 1 means the 3dB of adjacent high and low stages will be equal. Higher gives overlap.
 Band Gap Mult.: Controls the spacing of the 3 bands in the band pass filters. A value of 1 means the 3dB of a bands low, mid and high stage are intersecting. A higher value spaces the stages out further.
 Low Pass C2: An initial value for the low pass filter.
 High Pass C1: An initial value for the high pass filter.
Limitations and issues:
 This is an engineering tool, not a fool proof piece of software. If you give it bad input it will give you bad output. You should familiarize yourself with filter design while using this. The Analog Devices literature is a good place to start.
 There is no error checking, you can really break it fast if you deviate far from the default values. Make small changes and check often.
 MATLAB does not allow very complex transfer functions with the inbuilt Bode plotter, so the second to last band had to be left out of the All Bands plot. It is unfortunate, but will take me a while to make my own Bode solver, and don't have the motivation at them moment.
 Not going to open source this, for now. If you feel you could contribute to the code I would be open to that.


sines 
This is incredible. Wish I had the brains / bandwidth to use it, but, not there yet! 

Jarno 
Nice work, haven't looked into what makes a 296 tick, but this is very fancy 

NANOJorge 

Sin_Phi 
Changed things up a bit. Instead of brute forcing the band pass filters I am now using a transform of low pass filter poles. Responses available are Butterworth, Bessel, Chebyshev 0.01, 0.1, 0.25, 0.5, and 1.0. Should be able to get some interesting and very transparent filters out of this. Next feature I will add is the ability to choose filter order, 2nd, 4th or 6th. Might bring back the band width multiplier as that is useful in creating things like the Serge resonant equalizer.
An advance feature I may get to is specifying your own frequency spacing function. Right now the equation for the band pass filters is set as:
logSlope = ( log10( cuttoffHigh)  log10( cutoffLow ) ) / ( bandCound  2 )
logIntecept = log10( cutoffLow )
f = 10 ^ ( logSlope * band + logIntercept )
If that doesn't make sense to you, it is just a strait line from the low pass cuttoff frequency to the high pass cutoff on a semilog plot of frequency vs. bands.
Where this is all heading is I am going to do an open source spectral processor where you can create your own filter.


AlanP 
Worked up some PCBs based around Sin Phi's calculator. Works as advertised although I might need to work on the mixer part a bit...
For the precise resistor values under 2kohm in the bandpass cells, I broke them into two series resistors, so you can get closer to that precise value. I still wound up paralleling some resistors and capacitors to get the right values, and 390nF caps turned out to be something of a bugger to get. 

Sin_Phi 
Very cool and glad to see it working!
I have a newer version of the calculator I need to dust off, just don't have matlab anymore so may have to rework it into something open source. 

notmiserlouagain 
Did you come across "staggertuning"? Slight mistuning of serial filters in a single band to minimize highq ringing in the passband...
(It´s also used in a couple of vocoders)
Don´t know if it is essential just wanted to mention! 

jorg 
notmiserlouagain wrote:  Did you come across "staggertuning"? Slight mistuning of serial filters in a single band to minimize highq ringing in the passband...
(It´s also used in a couple of vocoders)
Don´t know if it is essential just wanted to mention! 
I noticed this in the VP330. Their vocal filters (both in the vocoder and in the chorus formants) each use two cascaded 2pole bandpass filters. The Q of each is about 6.5, and they are detuned by a factor of 1.2. This gives a filter that grabs a decently audible chunk of spectrum with a flat top, but it has steep skirts. It's a really nice sound. 

Sin_Phi 
That is exactly what a properly designed bandpass filter will do, and what this tool does. The image in my second post in this thread you can see that there are the 3 humps in the single band. The outer bands have a higher Q than the mid stage to assist in creating a flat response, see the same image in the table.
Of note, a bandpass filter counts poles maybe different than you are referencing. The 3 "stage" bandpass is 6 poles. 

jorg 
Yeah, the filter I'm describing is 2 stages, or 4 poles; each skirt is therefore 2 poles (12dB ultimate slope).
Nice 6 pole filters!
Have you looked at Octave / GNU? 

Powered by phpBB © phpBB Group
