FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 

Design Tool for Spectral Processors, Fixed Filter Banks &
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Design Tool for Spectral Processors, Fixed Filter Banks &
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.

This is incredible. Wish I had the brains / bandwidth to use it, but, not there yet! w00t
Nice work, haven't looked into what makes a 296 tick, but this is very fancy smile
Wow... Excellent work!
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 semi-log 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.


Worked up some PCBs based around Sin Phi's calculator. Works as advertised smile 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.
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.
Did you come across "stagger-tuning"? Slight mistuning of serial filters in a single band to minimize high-q ringing in the passband...
(It´s also used in a couple of vocoders)

Don´t know if it is essential just wanted to mention!
notmiserlouagain wrote:
Did you come across "stagger-tuning"? Slight mistuning of serial filters in a single band to minimize high-q 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 VP-330. Their vocal filters (both in the vocoder and in the chorus formants) each use two cascaded 2-pole 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.
That is exactly what a properly designed band-pass 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 band-pass filter counts poles maybe different than you are referencing. The 3 "stage" band-pass is 6 poles.
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?
What freq range do people think is best for this sort of thing?
I updated the calculator with my latest. Going to have to rustle up a Matlab license for more work on it. I was working on a load and save portion for values.

This new version features a selection of responses (Butterworth, Chebyshev 0.01, 0.1, 0.25, 0.5, 1.0 dB, and Bessel), order (2nd, 4th, 6th), and gain. Nice big plots and component value table by switching views.

*AlanP, have a look at some existing filter banks. Instead of picking center frequency, think about corner frequency of the bands as the Fumana is labeled. You can see those in the table of the default filter in my program on Low Freq. and High Freq. of the table, those are basically the same as the Fumana. What defines it is that equation for slope I was talking about in the last post. There are some like the 296 which have bands that don't make a lot of sense, it is probably because of commonly available values more than some magic acoustic sauce.

Figured I would show my prototype panel and filter/vca/envelope follower board and schematic to give people some inspiration. For vocoding I was going to have 2 sets of filters for each band.

MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group