Cabinet simulation with IIR filters?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I want to simulate a cabinet at the output of my synth plugin, so I need them to be as quick and efficient as possible. I tried using a FIR filter with my impulse responses, but it just wasn't fast enough.

I looked around and found some info in the CAPS source (http://quitte.de/dsp/caps.html#CabinetIII) about using 31st order IIR filters. It referred to using precomputed coefficients via Prony's method and seemed like it would be much faster. Unfortunately, that's beyond my skill level, but it sounds perfect for my needs.

So, how can I convert my impulse responses to coefficients for an IIR filter with a similar frequency response?

Or, is there another way to achieve a fast way to simulate a cabinet's acoustics?

Thanks.

Post

If you just need few times increase in speed it's not too hard to modify a FIR to make use of SSE instructions. Whether that is good enough obviously depends on your requirements.

I don't know much about converting FIR to IIR, but I'd guess it would be tricky. You need to consider that it's not just the frequency response that you need to emulate, but also the time domain behaviour.

Post

Technically speaking, it may not be possible to model cabinet with IIR filters, if only approximate the impulse response. The reason for this is that cabinets generate signal delays like in a delay line. This aspect can't be modeled with an IIR filter.

The easiest way to approximate the impulse response is to use divide the frequency range into parts via band-pass filters, and then choose the appropriate gains of each band. You can have 16 bands for IIR's overall order of 32. This is pretty much enough if you'd like to cover 40-8000 frequency range.
Image

Post

How did you do your FIR filtering ? Have you tried to use fast convolution algorithms for that ? My uniform partitioned convolution algorithms are very fast even for 10000+ samples impulse responses. You can find some open source code on this subject very easily also.

Post

Some possibilities regarding GENUINELY quick'n'dirty-- Some analog guitar boxes have very simplified "cab simulator" but some users like that better than more detailed digital emulations. Haven't played with it much and it was a long time ago.

Maybe similar to the concept of a subtractive synth trumpet patch. Subtractive synth trumpet typically doesn't sound much like a real trumpet, but some folks like the synth trumpet better than the real thang.

Just an idea. Maybe a silly idea.

You can google various simple analog speaker sim schematics. I found a few (in addition to sansamp) with a quick google of "Sansamp schematic". Deeper search might recover more ideas.

A long time ago, back on 68k Mac running Sound Manager audio drivers, experimented with it a little bit.

For instance, if you look at the published frequency response of a microphone or speaker, there are typically 2 to 5 "major bumps" and then more "minor bumps" maybe depending on how detailed the frequency plot. Get better data with sine wave sweeps doing your own measurements. If you throw a few second-order bandpass filters at copying the "three biggest bumps" of a celestion greenback, then maybe it won't sound much like a greenback, but will probably sound more like a greenback than no processing at all. Similarly a few IIR filters to hit the 3 or 4 major bumps on an SM57 mic would sound closer to an SM57 than nothing at all.

It is easier to get the data with some thumb-fingered crude measurements. Measure the freq response aiming at the center of the greenback, and measure the freq response aiming at the edge of the greenback. Either measure, or infer from the spec sheet, the proximity effect and polar response of a SM57 mic.

For a 2 speaker or 4 speaker stack along with the movable mic-- If the speaker is quad 12" greenbacks, you can specify the size of the cab baffle board either crowded speaker-edge-to-speaker-edge, or spread wider on a bigger baffle board. Simple geometry to figure the distance from the mic to each speaker. If all speakers are identical, first run the audio thru the quick'n'dirty celestion "model" then thru 4 delays to represent the different distances from the speakers to the mic. Interpolated, guestimated frequency adjustment and gain adjustment on each delay to approximate levels and tone of each speaker as it arrives at the mic. Also if the mic is fairly close to the speaker cab, calculate variable bass boost for each delay line to emulate variable proximity effect of the 4 different speakers.

Sealed cabs can similarly be crudely emulated.

So far as I recall, stacking a bunch of crude simulations on-top of each other, gave fairly "detailed sounding" results. Not necessarily nailing a SM57 positioned in front of a Marshal cab, but "detailed" and "possibly useful" nonetheless. I never developed that far enough for users to see it, because Mac changes killed off Sound Manager and Premiere plugins before it was ever released, and never got around to porting it to some other spec. Can't say what users may have thought of the usefulness of "many stacked crude simulations".

Maybe an impulse response FIR would always kill such cheap'n'dirty tricks, or maybe not. Lots of folks still happily record analog boxes which only have a few stages of simple emulation filtering, considering it better-sounding than the more detailed emulation in Pods and such. But I don't play guitar much, and have no recent experience on the matter.

Post Reply

Return to “DSP and Plugin Development”