3
$\begingroup$

I'm trying to create FIR filter coefficients from a IR or data from a room calibration capture. I'm hoping to create a filter that compensates for the acoustics of a room.

I'm hoping to put these coefficients into a SigmaStudio FIR filter and put it on a ADAU1462 chip.

Is this a naive hope? Is this achievable? If it is possible is it within reach of a novice in this field? And Does anyone have suggestions on how to go about this?

Ive tried converting the IR/Data with firwin python library but I don't think its working.

The IR and room measurements I'm using does not have time data its just the volumes of each frequency at the listening position in a txt file

Any help would be greatly appreciated.

$\endgroup$

2 Answers 2

3
$\begingroup$

This is VERY difficult problem to solve

  1. In room acoustic measurements are notoriously difficult since the transfer functions are extremely complicated, LTI is only partially true, there are all sorts of background noises.
  2. The measurement must be representative of human spectral perception. That includes the frequency binning and smoothing, polar pattern of the source and polar pattern of the microphone(s).
  3. In most cases a single microphone measurement doesn't contain enough information to create a usable EQ. There typically needs to be some spatial averaging as well (which in itself is huge can of worms).
  4. While "volumes of each frequency at the listening position" can be sufficient for that purpose, it depends a lot on how exactly these volumes were determined and what frequency grid was used.
  5. Once you have a usable frequency response, you need to design an EQ using a "desired" target and managing the out of band behavior and frequency ranges with poor SNR.
  6. The spectral target itself is a controversial topic and there are lots of different schools of thought, some of which make the target dependent on the directional pattern of the loudspeaker (which can impact the ratio of direct and reflected energy). Let's just say: "flat" does definitely not work.
  7. Once you have an EQ function you need to turn it into an actual filter. Given that the most "action" in the EQ is likely to be below 800Hz, IIR filters are generally the best option but the design is very difficult. There are various methods for this, but none of them is pretty.
  8. Minimum phase FIR filters are another option but you will typically require several 1000 taps. That tends to be prohibitively expensive for direct FIT implementation so you overlap-add is a much better option. That, on the other hand, tends to have too much latency. A so-called "block convolver" can be used to trade off latency vs CPU.. Any FIR solution will also require a large chunk of memory.
  9. The Sigma DSP processor is not great fit for this. Doing IIR in fixed point is rather painful even if you do it in double precisions. FIR is easier in fixed point but I'm not sure if there enough memory

If it is possible is it within reach of a novice in this field?

Probably not. I suggest going through this list and checking which of the points I'm making here you feel comfortable with tackling and which ones are headscratchers.

$\endgroup$
1
  • $\begingroup$ This is coming from someone that has "been in the room"!! Good advice and needs more upvotes. I think the novices should just wrap the room in foam. $\endgroup$ Commented Aug 14, 2024 at 2:50
2
$\begingroup$

If your measurement does not contain "time data", it is not an Impulse Response measurement. A table of frequency/level pairs would be some kind of Frequency Response measurement, which offers less insight into system behaviour. It could still be used to tune a (typical minimum-phase) equalizer.

If you have a proper Impulse Response, it can in principle be inverted (to some desired level of accuracy), meaning that after filtering -> loudspeakers -> room, you should in principle have a delayed dirac pulse.

Issues includes noise in the measurement, time-variation in the system, that a single point-measurement often is not representative of an actual listeners ears (at high frequencies), that loudspeakers typically have decreasing response for very high and very low frequencies, meaning that an inversion could try to boost 10 Hz by 40 dB (which is typically not a good idea for finite power amplifier, finite excursion loudspeaker drivers or even finite precision filter arithmetic.)

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.