# Digital room correction using spectral subtraction



## Marius426 (Jun 14, 2014)

Hi,

I was wondering, if anybody knows if it's possible to use spectral subtraction for room correction?

Background: I experimented a lot with correction, since my room has really bad acoustics. In the current state I have some absorbers for highs and mids, and use simple, aggressive equalization to deal with room modes, along with best possible speaker placement, which is still not perfect. I tried deconvolution, but there are severe problems with it: Very limited sweet spot and much worse sound if you move, total energy in the room can be even higher / neighbors don't like that, can lead to pre-echoes



So my idea right now is the following:

Basically instead of removing the echo from the room, I want to "reuse" the energy that's in the room and drop these parts from the audio, energy-wise.

Instead of subtracting the actual waveform to create destructive interference, my idea is to transform both the signal and echo into the frequency domain and perform a spectral subtraction. Frequencies still in the room won't be emitted again.

There are basically 4 problems with it though:
1. If I use spectral subtraction, I don't care about the phase between echo and direct sound. This could lead to bad phase distortions and some interference in the result.
2. If the audio stops rapidly, there's nothing to subtract from. This could lead to inconsistent sound.
3. By definition, I am working on the spectral / tonal issues, but do not attack clarity during the decay.
4. Spectral subtraction tends to have a very characteristic sound (hollow / underwater)

HOWEVER, for real music, those problems seem to disappear...
1. I hope to only work on the time where there is reverbation on the record itself, so I don't expect phase distortions to be critical, since the source is reverb anyways. It would act a bit like removing the reverb from the source audio, and replacing it with my room reverb. The level to subtract should be quite low when the next note / transient hits, so it gets through without much distortion.
Since the new audio won't just add to the room audio in a complete constructive way, I might use some probabilistic approach, so that the total energy is expected to be correct.

2. Music, almost everytime there is actual decay, if you look at some wavelet transforms.

3. I put less energy into the room in between so the present reverbation in the room should be lower when the next note hits. This should actually even help in clarity.

4. Better than muddy? Also, we are not talking intense levels of noise like in most cases where spectral subtraction is used. It should hide in reverbation.

I am also not planning on removing the reverbation completely, because I know this could introduce artifacts. I'd need to check to which level it is possible, but applying "digital damping" to my room this way is the goal, or even shaping the reverbation. Plus I won't look at a single channel but compute the complete room energy and then balance the subtraction between channels.




I hope I explained it in way that you can understand where this is going.

So my question now is, what do you think? Will this work? Did I miss some problems? Will it distort the sound too much (that is, more than my room)? Do you have an idea of how bad the effects 1-4 will be? Do you think this only works for chaotic high-frequency reverbation, or also for room modes (maybe, because energy is a big criterium there, but on the other hand they are not as random and maybe not well described as reverbation)?

And is there maybe someone who tried it already? Some paper? Or is this technique maybe even used somewhere?



Finally: Don't tell me to look into speaker placement, absorbers, helmholtz resonators... I did, it helped, but I'm interested to make it even better. Generally, I don't want to do it only for the sound, but for exploring the concept.


----------



## AudiocRaver (Jun 6, 2012)

Something along the lines of what you discuss is done in some room correction products. Dirac Live does to some degree. HERE is a paper where it is discussed, among other things.

Problems involved:

It can only be done for one spot in the room.
Making it better in that one spot sometimes makes it much worse elsewhere close by in the listening area.


----------

