Spectral selection editing with hard boundaries

I have a recording of a performance of piano and strings, but it sounds like some workers were sledgehammering on the next floor. The recording has a number of loudish percussive thuds. If you look at the spectrogram, it more or less looks like a weave.

The piano/strings mostly exist horizontally at discrete frequencies, while the hammering is spread vertically across all frequencies for a brief time. I’m more than a beginner on Audacity but possibly less than intermediate level. Initially, I was using the equalization effect tool to remove the hammering frequencies between the string frequencies. This takes forever, however, since I cannot specify the frequencies as numerical input and I cannot horizontally zoom the equalizer to a specific frequency range. It involves a lot of trial and error until I guess the right ranges, but it results in a significant reduction in background noise.

I knew I had to find a better way. I then discovered how to use the spectral selection tool. This would have been perfect, except that none of the spectral edit tools remained confined within the selection boundaries. I end up removing the background noise, but then the instruments diminish in volume during that time selection, or I minimize my spectral selection height to the point where it does not remove enough of the background noise. Is there a spectral selection editing tool that stays within the selection boundaries, or am I stuck doing things the hard way as I’ve been? Or option 3, is there another way to accomplish this?

I’m using Audacity 2.2.1 on Windows 10 - 64 bit

Filters do not have absolutely hard boundaries. As can be seen in this description of the High Pass filter effect, filters “roll-off” from the defined filter frequency rather that cutting off dead at that frequency.

If you could post a short sample in WAV format, of the problem that you are trying to fix, then we may be able to suggest an alternative approach. See here for how to post an audio sample - in this case we just need a few seconds of unprocessed recording in WAV format: https://forum.audacityteam.org/t/how-to-post-an-audio-sample/29851/1

Have you determined what was causing the problem so that you can avoid it in the future?

I had a number of recordings a friend wanted me to try to clean up for him. Sorry, it may have sounded like I was speaking figuratively, but during one of the recordings, it sounded like someone was literally doing heavy construction on the next floor, and there were a small number of loud thuds that sounded like a large hammer, that he wanted me to clean out. Most of the problems are just random background noise (this was recorded in a performance space with no audience, not in a studio). I’m having problems sifting through all of my files trying to find the example of that, but I have found something similar, where it sounds like an HVAC system kicks in during a quieter piano section of another performance. The situation is similar, and I should be able to show it to you visually. I have 6 attachments but can only show 4. The last two should hopefully be easy to describe.

Example 1 is the source. It’s obvious to see the difference between the background noise section (highlighted) and the piano part. Visually, I can see what needs to be removed. In example 2, I’ve cut the top, above the highest harmonics. Even that helps a good bit. You can see relatively easy where the harmonics are in the noise, especially when comparing to the clean, unselected section to the right. In example 3, I am using the equalizer tool to remove the noise between the harmonics as best as I can, using the profile I created in example 4. Yes, filters do not have hard boundaries, and the curve is a best fit for the equalizer tool, and the corners are technically rounded, but those corner radii are pretty small. The equalizer tool does a good job of cleaning out the space between overtones, but it is very imprecise to use and involves a lot of trial and error and guess work. I have to stretch it to the full width of my monitor to get the best view of the x-scale, and I cannot zoom in on it (that I know of). I apply the equalizer, see if the results need adjusting, then undo and move the points as necessary until I get it right. My final two images were of my attempt to use the spectral selection tool to more easily do the same thing. I selected a section between the harmonic overtones, but any spectral tool I apply does not clean out the frequencies as surgically as the equalizer tool does. Not only does it not fully clean out inside the box, it removes sound outside of the box as well, cutting into the overtones. (If you still need a visual, I can show you)

Do you have any recommendations as to other means I can use to achieve this? Note: I realize, as I have told my friend, that I’ll never be able to achieve full noise reduction, and he realizes that my work is a “best effort”. I have been using the spectral tool with a little more success in removing the discrete noise frequencies in the lower spectrum.
audacity example 4.jpg
audacity example 3.jpg
audacity example 2.jpg
audacity example 1.jpg

Here are a couple of plug-ins to aid with severe noise / damage problems. They may be useful:
https://forum.audacityteam.org/t/new-plug-in-effect-popmute/17499/1
https://forum.audacityteam.org/t/ez-patch/22093/1