Friday, August 10, 2012

A filter experiment

Last month’s post included the following graph showing the frequency response of the Matrix-1000 VCF at different levels of resonance plus the extra harmonics caused by the filter non-linearities (the graph has also been adjusted to remove the effect of the resonance-dependent CEM 3396 gain correction):


As a first experiment to implement the filter digitally, I coded the digital equivalent of the ideal low pass filter without a resonance parameter and I added the resonance to it by feeding back the amplified filter output to the filter input (mixed with the input signal). This configuration mimics the analog design of the filter.

I used the simplest possible model for the nonlinearity that I could think of, passing the input to the filter through a waveshaper. The waveshaper uses a sigmoid function that is not centered around y=0 to be able to produce both even and odd harmonics.

This is the output of the resulting digital filter when feeding white noise to it, again for different levels of resonance:


Not saying this is perfect, but the graphs show that this simple model already gets close to reproducing some of the observed filter behavior by using a digital filter.

This implementation has some potential issues:

  • The feedback loop that generates the filter resonance is instantaneous in the analog filter, but it has a one-sample delay in the digital implementation. While there might be ways to avoid this, it’s probably not a big problem: The main effect is that the resonance frequency doesn’t match the cutoff frequency of the low pass filter sections (as it does in the analog circuit), but the solution is to modify the cutoff frequency of the low pass filter so that it results in the desired and correct resonance frequency. A table or interpolation formula can be used to compute the amount of adjustment needed.
  • In the analog circuit, there are nonlinearities in each electronic component, not just in a single place. More experiments and listening tests will be needed to find a compromise. For example, splitting the digital 4-pole filter in four single-pole sections (like in the analog implementation) and adding a nonlinearity to each section should already result in a warmer sound.

Using white noise as a the filter input is not ideal as it doesn’t give enough information about how the filter responds to transients in the input signal. My current plan is to focus on the DCOs first. Once the digital square wave is virtually identical to the analog waveform, it can be used to drive the filter and further study and refine its behavior.
There is a circular dependency here, as in the Matrix synthesizers the output of the DCOs always goes through the filter, so it’s not possible to record the unfiltered square waveform and to be able to compare the real and digital waveforms, the digital implementation needs a filter, too. Luckily the effect of the filter can be minimized by setting the cutoff frequency very high, and a simple digital filter is already very close to the analog one when the resonance parameter is zero. In other words, I can use the simplified digital filter I already have to perfect the digital DCOs, then once I have the DCOs I can use them as input signals to improve the nonlinear behavior of the filter.


  1. This is really interesting. I was trying to figure out how I could recreate some of the sounds from the Matrix 1000 using my virus TI. I couldn't figure out what type of filter to use (It can model older filters with 1-pole to 4-pole, but also a 12 or 24 dB filter... Came across this and am really impressed with the amount of interesting knowledge here! The filters on the OB-1000 are really incredible, I think. The sounds from the OB-1000 were way better (in my opinion) than the Junos. I thought it had a lot to do with the filters and dual oscillators per voice...

  2. Fascinating! I'm currently, thanks to the internet, teaching myself electronics so I can diagnose and fix my ailing 80's synths - one of which is a Matrix1000 (another is a Crumar Bit99). Your blog has definitely helped fill in some gaps. Have you thought of reverse-engineering the actual 3396 - boiling one in Sulphuric Acid to disolve the packaging (or carefully grinding away) and then borrowing a microscope. Before I reinvent the wheel, do you have any insight into how the ROM patches are compressed compared to a sys-ex dump data scheme? I want to try replacing some of the blander patches with my own...
    A virtual M1000 would be superb (although I always wish it had a HPF... But there's always the Xpander I suppose...) Anyway please keep working at it and the blog.