DSP 01

DSP 01, part 11: (attempted) bass-trapping, Blended Perception Curve

in the previous update, i fretted about the 146Hz node in my listening room, and wondered if i could fix it. you can't just fix it by turning up the gain at 146Hz - it's like pouring sand into a black hole. the problem has to be fixed acoustically, so it's time to try bass-trapping.

bass-trapping is the process of shoving huge amounts of foam and/or fiberglass into the edges and corners of a room to dampen a room's low-frequency modes. it's a popular thing to do in listening rooms and/or home studios, and some people think it's the very first thing you should do. i'm not convinced. that much damping material is really going to cost you, and mounting it in a habitable space is quite non-trivial. but i like science, which means i have to try. i have to try to do it right.

so here's the experiment - get one block of acoustic foam at a decent price, mount it in the most theoretically sound place (ha), and see if the change is worthwhile enough to justify further expense. here we go!

 

question 1: where to put it?

i want to damp the 146Hz mode specifically. i have one big foam block, and it has to count. where should i mount it?

here's where some science comes in. sound travels through orthogonal fluctuations in pressure and velocity. my foam block should have the maximum effect if i place it in a high-velocity region of the 146Hz mode. somewhere in the room, the 146Hz mode has a velocity antinode. how can i find this antinode?

well, my speakers are pressure sources. my microphones are pressure sensors. and velocity is orthogonal to pressure.

so if i play a 146Hz tone through my speakers, and i can find a spot somewhere in the room where the sound pressure is abnormally low, that should be a high-velocity spot - the best spot to place my block of foam.

here's a needlessly complicated way to probe the room for sound pressure:

that's a Nexus 5 running AudioTool, connected to a calibrated Dayton iMM-6 measurement microphone. i probe the room with the phone mounted at the end of a long stick. it streams video (screen mirroring) through a Chromecast so that i can wirelessly watch the spectrum. and all of this works, but you know what.. forget it.

this is what i actually used:

 a $20  SPL meter  and a long stick.

a $20 SPL meter and a long stick.

the speakers are now blasting 146Hz. some rummaging reveals a spot in the room where sound pressure is >15dB lower than almost everywhere else. it's a winner!

 up there!

up there!

up there is our low-pressure spot, which should also be our high-velocity spot. it's about 2 feet away from each wall, which is not very surprising. i mean, the wavelength of sound at 146Hz is 7.6 feet. it's like this:

 diagram of a 146Hz standing wave at a wall. a quarter-wavelength from the wall, velocity (red) is maximum and pressure (blue) is minimum.

diagram of a 146Hz standing wave at a wall. a quarter-wavelength from the wall, velocity (red) is maximum and pressure (blue) is minimum.

if 146Hz is reflecting off each wall, physics dictates that the lowest-pressure region is 1.9 feet from the wall. so far, everything makes sense. how can i put a foam block up there?

 

question 2: up there?

yes. all things are possible through my prodigious tripod collection.

 hammer a 1/4-20  T-nut  through some scrap plywood, and up it goes.

hammer a 1/4-20 T-nut through some scrap plywood, and up it goes.

 it almost looks cool!

it almost looks cool!

 

question 3: does it do anything?

my first step is to place the SPL meter at each of my four listening positions, and record the loudness of the 146Hz tone with and without the foam block.

here are the results (before and after):

  • position 1: 51.6dBA to 50.5dBA
  • position 2: 53.3dBA to 53.3dBA
  • position 3: 50.7dBA to 50.1dBA
  • position 4: 54.2dBA to 53.6dBA

that's.. not good? the difference is so small that it might as well be noise. so let's break out the real microphones, and compared averaged room measurements.

 left speaker frequency response, averaged over 4 listening positions, with 1/6-octave smoothing. without (blue) and with (red) foam block.

left speaker frequency response, averaged over 4 listening positions, with 1/6-octave smoothing. without (blue) and with (red) foam block.

  right speaker frequency response, averaged over 4 listening positions, with 1/6-octave smoothing. without (blue) and with (red) foam block.

right speaker frequency response, averaged over 4 listening positions, with 1/6-octave smoothing. without (blue) and with (red) foam block.

aside from slightly less treble (i left the 8.7kHz filter on) they're essentially the same curve. the foam block does nothing. so away it goes.

so much for that.

 

in my last update, i realized that it doesn't make sense to equalize-to-flat based on measurements taken from the listening position. the microphone records the speaker's steady-state frequency response - a bewildering mix of direct, early-reflected and reverberated sound - which only describes how we experience sound in the lowest frequencies (below a few hundred Hz). so how does one perform equalization anyways?

the literature (definitely not the only example) suggests that our perception of a speaker's performance above a few hundred Hz is controlled by the speaker's power response (frequency response at various angles, preferably measured in an anechoic chamber) and the broadband attenuation of the room's surfaces. both of these things are awfully hard to measure on a home-budget. rest assured that i'll be building the proper instrumentation eventually. but right now, what to do?

here i introduce the concept of the Blended Perception Curve (BPC). it's something i just made up. i'm beginning to realize what Bose meant when he said that there isn't a single measurement which really describes how a speaker sounds. so it makes sense to carefully combine many measurements from various sources, to end up with a single curve which attempts to describe our listening experience.

i'm not saying that the BPC is necessarily a good idea, or if what i do next is the right way to make one. it's just what i've decided to try today. so here's my procedure:

  1. measure the speaker close-in, at many horizontal angles, taking the average to approximate the power response.
  2. measure the speaker from the listening position, taking the average to approximate the room response.
  3. average a subset of the power response measurements (just narrow-forward angles) to approximate the direct response.
  4. smoothly merge the power response and room response from 300Hz to 1200Hz.
  5. smoothly merge step 4 with the direct response from 8kHz to 16kHz (to capture the beaming of the tweeter).
  6. the result of step 5 is the Blended Perception Curve.

this approach has problems. it doesn't capture the speaker's directivity over vertical angles. it assumes that a smoothed close-in measurement of the speaker is similar-enough to its anechoic response (at least it looks like the time-gated response..). it assumes the room's reflective surfaces have reasonably even absorption over frequency. it encourages equalization of baffle-step and crossover-dip, the 'correctness' of which is still in doubt.

i'll say this - this technique kind-of makes sense if you already have a good room and a speaker with well-controlled directivity. if you don't? who knows.

(if you want to play with my code and data, here are the Python scripts. extract the files and run workspace 0.py. you will need PythonXY.)

so here are the results:

 Blended Perception Curve of left speaker, with 1/3-octave smoothing.

Blended Perception Curve of left speaker, with 1/3-octave smoothing.

  Blended Perception Curve of right speaker, with 1/3-octave smoothing.

Blended Perception Curve of right speaker, with 1/3-octave smoothing.

these curves are quite a bit different from my previous measurements which were taken purely from the listening position. the treble is definitely less attenuated, and the midrange is smoother. it's interesting to see what happens when i run the BPC through my previous equalization settings:

 Blended Perception Curve of right speaker, after being put through my  previous equalization settings . with 1/6-octave smoothing.

Blended Perception Curve of right speaker, after being put through my previous equalization settings. with 1/6-octave smoothing.

note the enormous overemphasis on the upper treble. that's probably why i needed a 8.7kHz low-pass filter.. 

after re-equalizing everything, here's what i end up with:

 Blended Perception Curve of left speaker after equalization. with 1/3-octave smoothing (blue) and 1/6-octave smoothing (blue). equalization curve in green.

Blended Perception Curve of left speaker after equalization. with 1/3-octave smoothing (blue) and 1/6-octave smoothing (blue). equalization curve in green.

  Blended Perception Curve of right speaker after equalization. with 1/3-octave smoothing (blue) and 1/6-octave smoothing (blue). equalization curve in green.

Blended Perception Curve of right speaker after equalization. with 1/3-octave smoothing (blue) and 1/6-octave smoothing (blue). equalization curve in green.

note that the equalization curve (green line) on both left and right speaker no longer has the enormous boost in the upper treble. both equalization curves also show more gain at 2kHz, which offsets the off-axis attenuation caused by the dip in the tweeter-midrange crossover. some of you may say, how dare i equalize that! it'll fix my power response, at the expense of my direct response!

you are correct. i don't know if this is the right way to do anything. the problem is fundamentally the speaker's directivity. i daresay my next audio project will have to involve building some kind of new speaker - probably a broadband-monopole or a cardioid/dipole.

update: after extensive listening tests, i have removed all equalization above 1kHz. that means no more bump at 2kHz, and no more dip at 4kHz. back when i first designed these speakers, i made sure they had a flat on-axis response. i've realized that at higher frequencies, no matter how screwed-up your power response, you still need a flat on-axis response at all costs. well-controlled directivity (to maintain the flat frequency response off-axis) is a highly-desirable bonus which you cannot achieve through EQ alone. these findings beg a new speaker design..

and one more vanity shot of the enormous signal chain:

where do i go from here?

i intend to build a much smaller, more carefully laid-out version of the DSP 01 main board, which can then be installed directly into speakers to get rid of the DSP/amplifier box on the floor. i intend to do a lot of things.

maybe i'll put up one more post where i gush about how good it sounds, just to make these rants more like all the other audiophile rants. one way or another, i think i can say that DSP 01 - Phase 2 is complete.

thanks for reading!

 

 

 

Tshen2 2015

DSP 01, part 10: room treatment, optimized EQ, treble adjust

i think i've hit the point where electronics and speaker design can only do so much. it's time to talk about acoustic room treatment. 

two weeks ago, i was having sidewall-reflection problems. this means i was hearing too much reflected sound that had bounced off of the sidewalls of my listening room. this sound was interfering with the direct sound which traveled directly from the speakers to me.

of course, you're always hearing reflected sound. in fact, almost all the sound you hear in a typical living room is reverberated sound, which travels from the speakers to you after multiple reflections. without those reflections, you'd only hear a tiny part of your speaker's output, and you'd need enormous speakers to hear much at all. this is why outdoor speakers are enormous.

there is, however, one kind of reflected sound which i do need to control, and that is the first-reflection off of the sidewalls. it looks like this:

 direct sound (travelling directly to ear) and first-reflection (travelling from wall to ear).

direct sound (travelling directly to ear) and first-reflection (travelling from wall to ear).

unlike the multiply-reflected reverberated sound, the first-reflection is much louder, arrives at the ear with a much shorter time delay, and is highly correlated with the direct sound. i find it quite audible and not very fun. so how can you control the first-reflections?

 sidewall with 1" of acoustic absorption materials - absorbing just the reflected highs.

sidewall with 1" of acoustic absorption materials - absorbing just the reflected highs.

most people's first instinct is to cover their sidewalls with a thin layer of absorptive material. after some research they may also use 'fancy materials', such as 703 fiberglass. but a thin layer will only absorb the highest frequencies! if you are using mostly-omnidirectional speakers (as most of us are), that reflected sound is a big part of what you hear, and you're essentially cutting the highs out of the mix. what if you use thicker materials, to attenuate a wider range of frequencies?

 sidewall with 4" of acoustic absorption materials - absorbing the reflected mids and highs.

sidewall with 4" of acoustic absorption materials - absorbing the reflected mids and highs.

here we've spent our money on much thicker layers of absorptive material, and can absorb both the mids and highs. sometimes this is a good solution, but i agree with certain experts that it generally is not, unless your room is tiny and desperately needs more absorption to reduce the reverberation time. this approach could leave you with a very dead-sounding listening space, and a huge disparity between the loudness of reverberated bass versus mids & highs!

one might ask - why not keep adding thicker and thicker layers of absorption until you can absorb the bass as well? you can indeed do that with bass traps, which are huge pieces of foam which can be mounted in the corners of rooms. the problem is, by then you've spent all your money, and you end up with a super-dead room which now requires enormous speakers, just like the great outdoors.

so instead of mounting absorbers on the sidewalls, i use diffusers instead. these are geometrically-complex surfaces which reflect sound in many directions. it looks like this:

  sidewall with acoustic diffuser - scattering the reflected mids and highs. nothing stops the bass!

sidewall with acoustic diffuser - scattering the reflected mids and highs. nothing stops the bass!

this also reduces the amount of sound which is reflected right at you. however, the rest of the sound is dispersed around the room, which adds to reverberation and doesn't upset the room's spectral balance.

so how does one construct these diffusers? if your blood is rich, you could buy and install professional diffusion panels. or you could construct your own (admittedly beautiful) Skyline diffusers. but even Floyd Toole just uses bookcases in his own house, and so shall i.

 right speaker is next to a bookcase with actual books.

right speaker is next to a bookcase with actual books.

 if you own more e-books than books, you may have to use boxes and wooden panels instead.

if you own more e-books than books, you may have to use boxes and wooden panels instead.

have you wondered why cinemas have padded seats? it's because people are squishy, and if the seats were less squishy than people, an empty cinema would sound substantially different than a full cinema. i take cues from cinema design, with an exceptionally squishy listening couch. all materials (pillows) are quite thick for broadband absorption.

 squishy things are also fun to sit on.

squishy things are also fun to sit on.

a quick measurement of my reverberation time (RT60) places it around 0.3 seconds. that's surprisingly dry for a small living room! i blame the open door.

now that i've gone ahead and changed everything, it's time to re-equalize my speakers. so let's measure each speaker's frequency response from four positions on the couch (again):

 the microphone thinks it's people, part II.

the microphone thinks it's people, part II.

  frequency response of left speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

frequency response of left speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

  frequency response of right speaker, 1/20   octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

frequency response of right speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

this time, i won't be trying to equalize all listening positions manually. there are some things computers are better at, and i accept my status as a squishy human. so it's time to break out the pythons.

i happen to use the PythonXY distro because it comes with scipy and pylab built-in. and so can you!

(if you want to play with my scripts, extract this zip-file and run 'workspace 0.py')

so let's output my sweep data from HolmImpulse:

outputHolmImpulse.png

in Python, i can produce averaged frequency responses of all four positions. i weigh the frequency response of positions 2 & 3 slightly heavier because they are the prime seats (hoho).

then i can plot the 1/3-octave smoothed frequency response of all four positions:

  four-position weighted average of right speaker frequency response: raw response (grey) and  1/3   octave smoothed response (blue).

four-position weighted average of right speaker frequency response: raw response (grey) and  1/3 octave smoothed response (blue).

  four-position weighted average of left speaker frequency response: raw response (grey) and  1/3   octave smoothed response (blue).

four-position weighted average of left speaker frequency response: raw response (grey) and  1/3 octave smoothed response (blue).

why am i using 1/3-octave smoothing on my data if it hides dangerous defects, like the left speaker's null at 146Hz? because i don't want to be too aggressive in my room-equalization. i'm quite aware that the room response will change slightly as the listener fidgets on the couch. it doesn't make sense to have super-targeted equalization if it's no longer correct when the listener leans forwards or backwards by a few inches.

previously, i went back-and-forth between speaker response and filter response, tweaking until it seemed like they would cancel each other out. but while we're on a Python kick, why not import the averaged speaker response into Sigmastudio? then i can tweak it directly.

Sigmastudio supports import of MLSSA-format frequency responses, so i wrote a Python function which formats my waveform appropriately. it was very strange. apparently they care about having exactly the right amount of whitespace.

 signal chain for playing with room equalization.

signal chain for playing with room equalization.

and now.. the best GIF.

once the frequency response is in Sigmastudio, you can just yank on levers until it is flat. what is the resulting DSP gain?

 right speaker DSP response, compensating for room response.

right speaker DSP response, compensating for room response.

it's quite interesting to identify each peak and dip in the DSP's response.

  • 44Hz antinode: this room mode is our friend! the speaker requires less power at these frequencies.
  • 146Hz node: this room mode is not our friend. the speaker needs tons of power to produce anything audible here.
  • 500Hz baffle-step: caused by the transition from half-sphere to full-sphere radiation, also described here.
  • high-frequency absorption: high frequencies are absorbed by almost everything - not much reaches the listener.

and here is the whole signal chain, now getting pretty big:

full_signal_chain.png

let's take more microphone measurements:

  corrected frequency response of left speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

corrected frequency response of left speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

  corrected frequency response of right speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

corrected frequency response of right speaker, 1/20 octave smoothing, in four listening positions: 1 (red), 2 (green), 3 (blue) & 4 (tan).

the frequency response at all listening positions is now pretty flat! i'm quite sure it's flat out to 20kHz - the slight dip at the highest frequencies match the high-frequency roll-off in my microphone's calibration data. admittedly, the left speaker still has that 146Hz null - that cannot be fixed electronically.

so i sat down and listened to a lot of music. and it really seems like a flat frequency response, while fantastic in the bass and mids, is pretty overwhelming in the highs. 's' sounds in voices can be quite screechy. snare drums try to rip out my ears. this effect is more severe on some albums than others. why is this happening?

well, most people don't equalize their rooms flat to 20kHz. most studios don't do it either. as far as i can tell, they generally buy speakers which are flat to 20kHz (as measured in an anechoic chamber), and then put them in a room where the high frequency reflections are highly attenuated. they may do some room correction (up to a few kHz, anyways) but most producers don't equalize flat to 20kHz. it's also worth noting that most studio headphones aren't flat to 20kHz either:

 plot made with HeadRoom's  Build-a-Graph  tool.

plot made with HeadRoom's Build-a-Graph tool.

so if speakers in studios have less gain at high frequencies, i'm betting the recording engineer will boost those frequencies to compensate. which leads to me sizzling my ears out when i hear those tracks with a 20kHz-flat frequency response. so how shall i compensate?

since i'm using a DSP, i've decided to add a high-frequency adjustment knob. by turning a knob, i can move a low-pass-filter anywhere from 20kHz to 5kHz, adjusting as needed to make things sound just right.

update: after more research, i've realized that equalizing flat with listening-position measurements only works for frequencies below ~300Hz. above that, the perceived frequency response is a complex mix of direct sound, first-reflections and reverberation, not all of which is captured in my measurements. in the upper treble, most of what we perceive is direct sound, which my speakers are quite capable of producing flat to almost 20kHz. so i must conduct further experiments - my 8.7kHz filter (below) probably works through dumb luck.

 right speaker average response, with high-frequency adjustment from 5kHz to 20kHz.

right speaker average response, with high-frequency adjustment from 5kHz to 20kHz.

having played with this knob quite a bit, i find that most music sounds best with the filter at 8.7kHz. so there it shall stay, until i get bored. and the DSP signal chain, of course, has swelled appropriately.

that's all for now!

next time: i try to do something about that 146Hz mode.

 

 

 

Tshen2 2015