duncan
flâneur in training
I wasn't sure where to post this, as it's a no-soldering-necessary (and no-pants-necessary) enterprise. Admins feel free to move it elsewhere if appropriate.
Having never actually heard any Polk SDA speakers, nor any of Carver's sonic-holography products, I have sometimes been curious about how - and, frankly, whether - the effect worked. As I understand it, the idea is to make each ear more exclusively hear its corresponding speaker, reducing confusion of auditory cues. Normally the left ear hears something from the left speaker, then the concurrent signal from the right speaker slightly delayed (because that speaker is further from the ear) and slightly attenuated (because part of your face is in the way). That second sonic event is undesirable for an imaging standpoint. The cancellation effect works by introduing an echo that is out-of-phase, channel-reversed, delayed and slightly attenuated. Also, possibly with an EQ curve applied, or a low pass or bandpass filter, because we're mostly interested in the midrange.
When an unwanted cross-signal from the R channel is about to hit the L ear, the out-of-phase echo should just be arriving from the L speaker to nullify it. And vice versa. Et voila, improved imaging?
Here's a two-line example that attempts to add opposite-ear cancellation to an existing FLAC file. It uses the freely available "SOX" utility.
sox -v -0.75 infile.flac tempfile.wav bandpass 500 4o pad 0.0002 swap
sox -m infile.flac tempfile.wav outfile.flac gain 2
Explanation of parameters, in the first line:
"-v -0.75" - this is both a volume and phase specification. 0.75 would be a slight attenuation, as it's a multiplier where 1 would have no effect and 0 would be silent; -0.75 negates the signal, i.e., takes it out of phase.
"bandpass 500 4o" selects four octaves centered at 500hz, so approx. 125-2000hz.
"pad 0.0002" introduces a delay in seconds; 0.0002 is 0.2 milliseconds.
"swap" refers to channels, left <-> right.
In the second line, where the main and cancellation waveforms are combined, "-m" means mix, and "gain 2" is a tweak that I thought it seemed to need to restore about the original volume.
There's a lot here that can be adjusted. Unfortunately it can't be done in real time like turning knobs while listening: you have to run a new conversion and then play the resulting file. I find that it takes almost as long to convert a file as it does to play it, at least on the pipsqueak Rasbperry Pi that acts as my home media server. Probably it would run a lot faster on a Real Computer.
I'm just getting started and won't comment on listening results just yet. But I'll be curious if others would try it too, see if they can confirm whether this is on the right track, and if so, what parameter tweaks might hone in on the best effect possible.
Note: the files being worked on don't strictly have to be flac format. They can be in any stereo format that your version of SOX was compiled with support for. In my case it also works for mp3 and probably ogg, but I prefer flac where possible. If your SOX install doesn't speak flac, it should always work for wav.
[late edit for a math mistake]
Having never actually heard any Polk SDA speakers, nor any of Carver's sonic-holography products, I have sometimes been curious about how - and, frankly, whether - the effect worked. As I understand it, the idea is to make each ear more exclusively hear its corresponding speaker, reducing confusion of auditory cues. Normally the left ear hears something from the left speaker, then the concurrent signal from the right speaker slightly delayed (because that speaker is further from the ear) and slightly attenuated (because part of your face is in the way). That second sonic event is undesirable for an imaging standpoint. The cancellation effect works by introduing an echo that is out-of-phase, channel-reversed, delayed and slightly attenuated. Also, possibly with an EQ curve applied, or a low pass or bandpass filter, because we're mostly interested in the midrange.
When an unwanted cross-signal from the R channel is about to hit the L ear, the out-of-phase echo should just be arriving from the L speaker to nullify it. And vice versa. Et voila, improved imaging?
Here's a two-line example that attempts to add opposite-ear cancellation to an existing FLAC file. It uses the freely available "SOX" utility.
sox -v -0.75 infile.flac tempfile.wav bandpass 500 4o pad 0.0002 swap
sox -m infile.flac tempfile.wav outfile.flac gain 2
Explanation of parameters, in the first line:
"-v -0.75" - this is both a volume and phase specification. 0.75 would be a slight attenuation, as it's a multiplier where 1 would have no effect and 0 would be silent; -0.75 negates the signal, i.e., takes it out of phase.
"bandpass 500 4o" selects four octaves centered at 500hz, so approx. 125-2000hz.
"pad 0.0002" introduces a delay in seconds; 0.0002 is 0.2 milliseconds.
"swap" refers to channels, left <-> right.
In the second line, where the main and cancellation waveforms are combined, "-m" means mix, and "gain 2" is a tweak that I thought it seemed to need to restore about the original volume.
There's a lot here that can be adjusted. Unfortunately it can't be done in real time like turning knobs while listening: you have to run a new conversion and then play the resulting file. I find that it takes almost as long to convert a file as it does to play it, at least on the pipsqueak Rasbperry Pi that acts as my home media server. Probably it would run a lot faster on a Real Computer.
I'm just getting started and won't comment on listening results just yet. But I'll be curious if others would try it too, see if they can confirm whether this is on the right track, and if so, what parameter tweaks might hone in on the best effect possible.
Note: the files being worked on don't strictly have to be flac format. They can be in any stereo format that your version of SOX was compiled with support for. In my case it also works for mp3 and probably ogg, but I prefer flac where possible. If your SOX install doesn't speak flac, it should always work for wav.
[late edit for a math mistake]
Last edited:

