Bauer stereophonic-to-binaural DSP.
· Theory · Experiment · References · License · Library · Download · Forum 1. Preface. A typical stereo records are being made to listen by speakers. That is a sound engineer makes the stereo mix to the adaptation of sound for listening of one channel by both ears. Therefore, you will be tired during a long time headphone listening more by a superstereo effect than by a poor design of headphones. What's missing in headphones is the sound going from each channel to the opposite ear, arriving a short time later for the extra distance traveled, and with a bit of high frequency roll-off for the shadowing effect of the head. And the time delay to the far ear is somewhat longer at low frequencies than at high frequencies. The Bauer stereophonic-to-binaural DSP (bs2b) is designed to improve headphone listening of stereo audio records. This improvement have been well described by electronic circuit designers like Benjamin Bauer [1], Siegfried Linkwitz [2], Chu Moy [3], Jan Meier [4], John Conover [10], HeadRoom [9]. The time delay at low frequency range, lowpass filters, highboost filters and crossfeeding of their electronic circuits has been made by first order RL (Bauer) or RC (Linkwitz, Moy, Meier) analog filters. This design makes a desired effects and naturally excludes the effect of comb filter in the upper range of frequencies through the nonlinear property of phase-frequency response of these filters. The bs2b makes the same work through a simple and fast (in comparison with FFT convolution) single pole recursive digital filters, because these filters has the same properties as an electronic RC-filters [5], [6], [7]. Sure, an FFT filters allows a more potentialities, but an avoiding of annoying comb effect is very difficult in case of FFT in crossfeed application. As written by Chu Moy [3], the frequency cutoff of highboost filter should be a bit higher than this value for the lowpass filter to achieve a smooth frequency response of crossfeeder. So, the bs2b have a such values of cutoff frequencies of lowpass and highboost filters that allows to provide the desired time delay and most smooth resulting frequency response. A last comment: the bs2b does not produce any simulation of ambient, and does not produce any HRTF [8] transform in a high frequency range. Some implementations of the HRTF at high frequency range are produced by good headphones, except of case of binaural headphones like Etymotic ER-4B. So, even a crossfeed effect is helpful for prolonged headphone listening, you can check it out by YouTubed short illustration (700Hz, 4.5dB). Plug in your headphones and try to feel sound little out from your head. 2. Theory. A single pole recursive filter are presented by recursion eqation: O[n] = a0 * I[n] + a1 * I[n-1] + b1 * O[n-1] where a0, a1, b1 is a recursion coefficients, I[n] is an input samples, O[n] is an output (filtered) samples. Filter's response is relay to recursion coefficients. The table 2.1 shows a perl code that calculates a frequency and a time delay responses of the bs2b by using an H-transform [5]. Table 2.1. bs2b-H-transform.pl. #!/usr/bin/perl use Math::Complex; $s = 40000; # Sample rate ( Hz ) $Fc = shift; # Lowpass filter cut frequency ( Hz ) $Gd = shift; # Lowpass filter gain ( dB ) $Ad_h = shift; # Highboost filter gain ( dB ) ( 0dB is highs ) # example: # perl bs2b-H-transform.pl 700 -6.75 -2.25 # Default preset ( 700Hz, 4.5dB ) # perl bs2b-H-transform.pl 700 -8.00 -2.00 # Chu Moy's preset ( 700Hz, 6.0dB ) # perl bs2b-H-transform.pl 650 -10.917 -1.417 # Jan Meier's preset ( 650Hz, 9.5dB ) $G = 10 ** ( $Gd / 20 ); $A_h = 10 ** ( $Ad_h / 20 ); $G_h = 1 - $A_h; $Gd_h = 20 * log( $G_h ) / log( 10 ); $Fc_h = $Fc * ( 2 ** ( ( $Gd - $Gd_h ) / 12 ) ); # '/3' by my theory, but... print "Fc_low = $Fc\nFc_high = $Fc_h\n"; print "G = $G\nG_h = $G_h\n"; $fc = $Fc / $s; $d = 1 / 2 / pi / $fc; $x = exp( -1 / $d ); $fc_h = $Fc_h / $s; $d_h = 1 / 2 / pi / $fc_h; $x_h = exp( -1 / $d_h ); # Lowpass single pole filter coefficients $b1 = $x; $a0 = $G * ( 1 - $x ); $a1 = 0; # Highboost single pole filter coefficients $b1_h = $x_h; $a0_h = 1 - $G_h * ( 1 - $x_h ); $a1_h = -$x_h; $w0 = 2 * pi * 4 / $s / 1.15; $z = exp( i * $w0 ); $H0 = ( $a0 + $a1 / $z ) / ( 1 - $b1 / $z ); $H0_h = ( $a0_h + $a1_h / $z ) / ( 1 - $b1_h / $z ); for( $w = $w0 * 1.15; $w <= pi/2; $w0 = $w, $w *= 1.15 ) { $z = exp( i * $w ); $H = ( $a0 + $a1 / $z ) / ( 1 - $b1 / $z ); $H_h = ( $a0_h + $a1_h / $z ) / ( 1 - $b1_h / $z ); printf( "%f\t%f\t%f\t%f\t%f\t%f\t%f\n", $s * $w / 2 / pi, rho( $H ), # 20 * log( rho( $H ) ) / log( 10 ) ( dB ) theta( $H ) * 180 / pi, # degree ( theta( $H ) - theta( $H0 ) ) / ( $w - $w0 ) * 1000000 / $s, # mcs rho( $H_h ), # 20 * log( rho( $H_h ) ) / log( 10 ) theta( $H_h ) * 180 / pi, # degree ( theta( $H_h ) - theta( $H0_h ) ) / ( $w - $w0 ) * 1000000 / $s # mcs ); $H0 = $H; $H0_h = $H_h; } The figures 2.1 and 2.2 shows a results of the above program. In other words, it is a theoretical responses of bs2b DSP. 'Sum' is the sum of the signals after the lowpass and highboost filters, which can be interpreted as a bs2b action to the two channel mono signal. Figure 2.1. bs2b theoretical frequency response. On the figure 2.2 a negative value of time represents a delay of signal by microseconds. Figure 2.2. bs2b theoretical time delay response. These results shows a three versions with different sets of cut-off frequency and crossfeed level: 1) 700 Hz, 4.5 dB - default. This setting is closest to the virtual speaker placement with azimuth 30 degrees and the removal of about 3 meters, while listening by headphones. 2) 700 Hz, 6 dB - most popular. This setting is close to the parameters of a Chu Moy's [3] crossfeeder. 3) 650 Hz, 9.5 dB - making the smallest changes in the original signal only for relaxing listening by headphones. This setting is close to the parameters of a crossfeeder implemented in Jan Meier's [4] CORDA amplifiers. 3. Practical data. The figure 3.1 shows a practical frequency responses of the bs2b with Chu Moy's [3] (700 Hz, 6 dB) setting. This is a frequency analysis of white noise signals applied to bs2b. There is three types of white noise signals: 'Mono' is two channel mono signal; 'Independ' is a two channel independ signal; one channel signal. Passing of 'one channel' signal through bs2b are presented as a response of highboost filter and as a response of lowpass filter. Figure 3.1. bs2b frequency response ( 700 Hz, 6 dB ). The figures 3.2 and 3.3 shows a frequency analysis of a real stereo signal. There is a classical and a rock samples. Figure 3.2. Sample of J.S. Bach "BWV1066" frequency analysis ( 700 Hz, 6 dB ). Figure 3.3. Sample of AC/DC "Thunderstruck" frequency analysis ( 700 Hz, 6 dB ). 4. References. [1] Benjamin B. Bauer. Stereophonic Earphones and Binaural Loudspeakers. JAES Volume 9
Number 2 pp. 148-151; April 1961. http://www.aes.org/
[2] Siegfried Linkwitz. Improved Headphone Listening. Build a stereo-crossfeed circuit. Audio; December 1971. http://www.linkwitzlab.com/headphone-xfeed.htm
[3] Chu Moy. An Acoustic Simulator for Headphone Amplifiers. © 1998-2001 Chu Moy. http://headwize.com/?page_id=739
[4] Jan Meier. A DIY Headphone Amplifier. [5] Steven W. Smith, Ph.D. The Scientist and Engineer's Guide to Digital Signal Processing. California Technical
Publishing; ISBN 0-9660176-3-3 (1997). http://www.dspguide.com/
[6] Davide Rocchesso. Introduction to Sound Processing. © 2003 Davide Rocchesso, GNU
FDL. http://profs.sci.univr.it/~rocchess/htmls/corsi/SoundProcessing/SoundProcessingBook/vsp.pdf
[7] BORES Signal Processing: Introduction to DSP. © 2004 Bores Signal Processing.
http://www.bores.com/courses/intro/index.htm
[8] Richard O.Duda. 3-D Audio for HCI. © 1996-2000 Richard O.Duda. http://interface.idav.ucdavis.edu/sound/tutorial/
[9] HeadRoom. About HeadRoom Crossfeed. © 1995-2006 HeadRoom. http://www.headphone.com/learning-center/about-headroom-crossfeed.php
[10] John Conover. Spatial Distortion Reduction Headphone Amplifier. © 1992-2005 John Conover. http://www.johncon.com/john/SSheadphoneAmp/index.html
[11] MultimediaWiki: PCM. [12] Digital filter. From Wikipedia, the free encyclopedia. Hosted at © Boris Mikhaylov |