diff options
author | boris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72> | 2009-03-23 10:28:21 +0300 |
---|---|---|
committer | boris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72> | 2009-03-23 10:28:21 +0300 |
commit | 3692f1ccea29d507fa4279792d38fb15e6db4b47 (patch) | |
tree | 2c21d64a9976a5073a5a1e19016e4d949dc2a28e | |
parent | 270a284b1d47280887814497ad76c93f98bbf327 (diff) |
Description are moved.
git-svn-id: svn://svn.code.sf.net/p/bs2b/code/trunk/libbs2b@81 bc0edfbe-c936-4687-b64d-f70bc3985e72
-rw-r--r-- | doc/Makefile.am | 16 | ||||
-rw-r--r-- | doc/bs2b-ru.html | 410 | ||||
-rw-r--r-- | doc/bs2b.html | 413 | ||||
-rw-r--r-- | doc/bs2b_label.png | bin | 4171 -> 0 bytes | |||
-rw-r--r-- | doc/bs2b_lib-ru.html | 108 | ||||
-rw-r--r-- | doc/bs2b_lib.html | 107 | ||||
-rw-r--r-- | doc/content-ru.html | 28 | ||||
-rw-r--r-- | doc/content.html | 27 | ||||
-rw-r--r-- | doc/download.html | 5 | ||||
-rw-r--r-- | doc/img/Bach-BWV1066-Overture-diff.png | bin | 7048 -> 0 bytes | |||
-rw-r--r-- | doc/img/Bach-BWV1066-Overture-diff_e.png | bin | 6741 -> 0 bytes | |||
-rw-r--r-- | doc/img/Makefile.am | 9 | ||||
-rw-r--r-- | doc/img/bs2b_e_exdata_f.png | bin | 8469 -> 0 bytes | |||
-rw-r--r-- | doc/img/bs2b_exdata_f.png | bin | 10341 -> 0 bytes | |||
-rw-r--r-- | doc/img/bs2b_h-trans_d.png | bin | 7291 -> 0 bytes | |||
-rw-r--r-- | doc/img/bs2b_h-trans_f.png | bin | 8688 -> 0 bytes | |||
-rw-r--r-- | doc/img/bs2b_h_e-trans_d.png | bin | 7165 -> 0 bytes | |||
-rw-r--r-- | doc/img/bs2b_h_e-trans_f.png | bin | 8155 -> 0 bytes | |||
-rw-r--r-- | doc/index-ru.html | 19 | ||||
-rw-r--r-- | doc/index.html | 18 | ||||
-rw-r--r-- | doc/license.html | 38 | ||||
-rw-r--r-- | doc/readme.txt | 2 |
22 files changed, 3 insertions, 1197 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 2da1440..7cc1f0d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,15 +1 @@ -SUBDIRS = \ - img - -EXTRA_DIST = \ - bs2b.html \ - bs2b_label.png \ - bs2b_lib.html \ - bs2b_lib-ru.html \ - bs2b-ru.html \ - content.html \ - content-ru.html \ - download.html \ - index.html \ - index-ru.html \ - license.html +EXTRA_DIST = readme.txt diff --git a/doc/bs2b-ru.html b/doc/bs2b-ru.html deleted file mode 100644 index 0685489..0000000 --- a/doc/bs2b-ru.html +++ /dev/null @@ -1,410 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP</title> - <meta content="Boris Mikhaylov" name="author"> - <meta http-equiv="Content-Type" - content="text/html; charset=windows-1251"> -</head> -<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" - alink="#000099" link="#000099" vlink="#990099"> -<table - style="width: 700px; text-align: left; font-family: times new roman,times,serif;" - border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><big><big><span - style="font-weight: bold;">Bauer stereophonic-to-binaural DSP.</span></big></big><br> - <big><span style="font-weight: bold;"><br> - <a name="Preface"></a>1. -Предисловие.</span></big><br> - <br> -Обычная стерео запись производится для прослушивания -громкоговорителями. Это означает, что звукорежиссер делает стерео -микширование с адаптацией звука для прослушивания одного канала обеими -ушами. Следовательно, вы будете утомлены при длительном прослушивании в -наушниках больше из-за суперстерео эффекта чем из-за плохой конструкции -наушников. В наушниках отсутствует то, что звук идет от каждого канала -к противоположному уху, -достигает его через некоторое короткое время проходя дополнительное -расстояние, и с частично ослабленными верхними частотами из-зи эффекта -тени головы. -И задержка до дальнего уха несколько больше на низких частотах чем на -высоких. Bauer stereophonic-to-binaural DSP (<a - href="http://bs2b.sourceforge.net/" target="_top">bs2b</a>) -предназначен для улучшения прослушивания аудио стерео программ в -наушниках. Это улучшение хорошо было объяснено дизайнерами электронных -схем такими как -Benjamin Bauer <a href="#r1">[1]</a>, Siegfried Linkwitz <a href="#r2">[2]</a>, -Chu Moy <a href="#r3">[3]</a>, Jan Meier <a href="#r4">[4]</a>, John -Conover <a href="#r10">[10]</a>, -HeadRoom <a href="#r9">[9]</a>. -Задержка в низкочастотном диапазоне, фильтры высокой частоты (ФВЧ), -фильтры ослабления низкой частоты (ФОНЧ), и взаимосмешение в их -электронных схемах сделаны на аналоговых RL -(Bauer) или RC -(Linkwitz, Moy, Meier) фильтрах перврго порядка. Такой дизайн -производит желаемые эффекты и естественно исключает эффект гребенчатого -фильтра в верхнем диапазоне частот благодаря нелинейному свойству -фазово-частотной характеристики (ФЧХ) этих фильтров. bs2b делает такую -же работу посредством простых и быстрых (в сревнение со сверткой) -однополярных рекурсивных цифровых фильтров, потому что эти фильтры -имеют такие же свойства как электронный RC-фильтры <a href="#r5">[5]</a>, - <a href="#r6">[6]</a>, <a href="#r7">[7]</a>. -Я выбрал такие значения частот среза для ФВЧ и ФОНЧ которые позволяют -получать желательные задержку и наиболее ровную результирующую -амплитудно-частотную характеристику (АЧХ). К сожалению, я не вычислил -реальное значение частоты среза ФОНЧ, но это не так важно. ФОНЧ -цифровой фильтр может быть представлен как двойной фильтр: как -вычитание ослабленного профильтрованного ФВЧ сигнала из оригинального -сигнала. -Это может быть математически приведено к одношаговому рекурсивному -фильтру. В первом релизе (1.0.0) bs2b я применял двушаговый метод для -ФОНЧ с использованием уже полученного ФВЧ сигнала, но это делает -значение частоты среза ФОНЧ немного меньше чем я предполагал, и это -ведет к выделению низко-средних частот. Тем не менее, как написал Chu -Moy <a href="#r3">[3]</a>, значение частоты среза ФОНЧ должно быть -немного больше чем это значение для ФВЧ для достижения более гладкой -АЧХ кросфидера. Поэтому, я сделал одношаговый метод для ФОНЧ во втором -релизе bs2b. Я начал этот проект потому что звук других, которые я -слушал до этого, наушниковых плагинов для аудиоплееров не удовлетворил -меня. Основновное ухудшение звука наушниковыми DSP производится -эффектом гребенчатого фильтра из-за использования FFT свертки с -линейной ФЧХ для фильтрации. Есть плагин <a - href="http://www.stereo-balance.net/" target="_top">HeadPlug</a> -который имеет опцию 'decomb', и автор пишет об этом: "The way the -plugin does -this is -really damn-ass straight-forward from a technical point of view". Я -попытался сделать это намного легче для CPU. Последнее замечание. bs2b -не производит симуляцию какого либо окружения и не производит какую -либо HRTF <a href="#r8">[8]</a> трансформацию в высокочастотном -диапазоне. Некоторое применение HRTF в высокочастотном диапазоне уже -сделано наушниками, исключая бинауральные наушники такие как <a - href="http://www.etymotic.com/" target="_top">Etymotic</a> ER-4B.<br> -Итак, пробуйте использовать bs2b чтобы почуствовать звук немного вне -вашей головы для облегчения работы вашего мозга.<br> - <br> - <big><span style="font-weight: bold;"><a name="Theoretical_issue"></a>2. -Теория.</span></big><br> - <br> -Однополюсный рекурсивный фильтр представляется рекурсивным выражением:<br> -O[n] = a0 * I[n] + a1 * I[n-1] + b1 * O[n-1]<br> -где a0, a1, b1 - рекурсионные коэффициенты, I[n] - входящие значения -сэмплов, -O[n] - результирующие (фильтрованные) значения сэмплов. Характеристики -фильтров зависят от рекурсионных коэффициентов. Таблица 2.1 показывает -perl программу которая вычисляет частотную и временную зависимости bs2b -с помощью H-преобразования <a href="bs2b.html#r5">[5]</a>.<br> - <br> - <span style="font-weight: bold;">Table 2.1. bs2b-H-transform.pl.</span><br> - <table - style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" - border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1">#!/usr/bin/perl<br> - <br> -use Math::Complex;<br> - <br> -$s = 40000; # Sample rate (Hz)<br> - <br> -$Fc = shift; # Lowpass filter cut frequency (Hz)<br> -$Gd = shift; # Lowpass filter gain (dB)<br> -$Ad_h = shift; # Highboost filter gain (dB) (0dB is highs)<br> - <br> -# example:<br> -# perl bs2b-H-transform.pl 700 -8 -2<br> -# it makes -6 dB crossfeed level<br> -#<br> - </font><font size="-1"># bs2b 2.0.0b uses data listed below.<br> -# perl bs2b-H-transform.pl 700 -5.5 -2.5 # high crossfeed -level<br> -# perl bs2b-H-transform.pl 500 -6.75 -2.25 # middle crossfeed level<br> -# perl bs2b-H-transform.pl 360 -8 --2 # low crossfeed level<br> - </font><font size="-1"># bs2b 2.1.0 uses additional 'Easy' -data that below.</font><br> - <font size="-1"># perl bs2b-H-transform.pl 700 -8 --2 </font><font size="-1"># high -easy crossfeed -level</font><br> - <font size="-1"># perl bs2b-H-transform.pl 500 -9 -1.8</font><font - size="-1"> # middle</font><font size="-1"> easy</font><font - size="-1"> crossfeed level</font><br> - <font size="-1"># perl bs2b-H-transform.pl 360 -10 -1.6</font><font - size="-1"> # low</font><font size="-1"> easy</font><font - size="-1"> crossfeed level</font><br> - <font size="-1"><br> - </font><br> - <font size="-1">$G = 10 ** ($Gd / 20);<br> -$A_h = 10 ** ($Ad_h / 20);<br> -$G_h = 1 - $A_h;<br> - <br> -$Gd_h = 20 * log($G_h) / log(10);<br> -$Fc_h = $Fc * (2 ** (($Gd - $Gd_h) / 12)); # '/3' by my theory, but...<br> - <br> -print "Fc_low = $Fc\nFc_high = $Fc_h\n";<br> -print "G = $G\nG_h = $G_h\n";<br> - <br> -$fc = $Fc / $s;<br> -$d = 1 / 2 / pi / $fc;<br> -$x = exp(-1 / $d);<br> - <br> -$fc_h = $Fc_h / $s;<br> -$d_h = 1 / 2 / pi / $fc_h;<br> -$x_h = exp(-1 / $d_h);<br> - <br> -# Lowpass single pole filter coefficients<br> -$b1 = $x;<br> -$a0 = $G * (1 - $x);<br> -$a1 = 0;<br> - <br> -# Highboost single pole filter coefficients<br> -$b1_h = $x_h;<br> -$a0_h = 1 - $G_h * (1 - $x_h);<br> -$a1_h = -$x_h;<br> - <br> -$w0 = 2 * pi * 4 / $s / 1.15;<br> -$z = exp(i * $w0);<br> -$H0 = ($a0 + $a1 / $z) / (1 - -$b1 / $z);<br> -$H0_h = ($a0_h + $a1_h / $z) / (1 - $b1_h / $z);<br> - <br> -for ($w = $w0 * 1.15; $w <= pi/2; $w0 = $w, $w *= 1.15)<br> -{<br> - $z = exp(i * $w);<br> - $H = ($a0 + $a1 -/ $z) / (1 - $b1 / $z);<br> - $H_h = ($a0_h + $a1_h / $z) / (1 - $b1_h / $z);<br> - <br> - $str = sprintf("%f\t%f\t%f\t%f\t%f\t%f\t%f\n",<br> - $s * $w / 2 / pi,<br> - rho($H), # -20 * log(rho($H)) / log(10) (dB)<br> - theta($H) * 180 / -pi, # degree<br> - (theta($H) - theta($H0)) / -($w - $w0) * 1000000 / $s, # mcs<br> - rho($H_h), # 20 * -log(rho($H_h)) / log(10)<br> - theta($H_h) * 180 / -pi, # degree<br> - (theta($H_h) - theta($H0_h)) -/ ($w - $w0) * 1000000 / $s # mcs<br> - );<br> - <br> - $str =~ s/\./\,/g; # Russian locale<br> - <br> - print $str;<br> - <br> - $H0 = $H;<br> - $H0_h = $H_h;<br> -}<br> - </font> </td> - </tr> - </tbody> - </table> - <br> -Рисунки 2.1 и 2.2 показывают результаты выше указанной программы. -Другими словами, -это тереотические зависимости bs2b DSP. Показаны только установки bs2b -низкого (low) уровня взаимосмешения '-L' и высокого (high) уровня -взаимосмешения '-H'. Средняя установка (middle) уровня взаимосмешения -опущена для наглядности. 'HB' означает ФОНЧ (highboost -filter). 'LP' означает ФВЧ (lowpass filter). 'M' означает сумму этих -отфильтрованных сигналов, -которая может быть интерпретирована как bs2b действие на двухканальный -моно сигнал.<br> - <br> - <span style="font-weight: bold;">Рисунок</span><span - style="font-weight: bold;"></span><span style="font-weight: bold;"> -2.1. bs2b </span><span style="font-weight: bold;">теоретическая -частотная характеристика</span><span style="font-weight: bold;">.</span><br> - <img alt="bs2b theoretical frequency response" - src="img/bs2b_h-trans_f.png" style="width: 679px; height: 489px;"><br> - <br> -На рисунке 2.2 отрицательное время представляет задержку сигнала в -микросекундах.<br> - <br> - <span style="font-weight: bold;">Рисунок</span><span - style="font-weight: bold;"> 2.2. bs2b </span><span - style="font-weight: bold;">теоретическая</span><span - style="font-weight: bold;"> </span><span style="font-weight: bold;">временная - </span><span style="font-weight: bold;">характеристика</span><span - style="font-weight: bold;">.</span><br> - <img alt="bs2b theoretical time delay response" - src="img/bs2b_h-trans_d.png" style="width: 680px; height: 293px;"><br> - <br> -Эти характеристики выглядят так как если бы виртуальные стерео -громкоговорители переместились от 30 -градусов (high crossfeed level) до 60 градусов (low crossfeed -level) по азимуту.<br> - <br> -Рисунки 2.3 и 2.4 показывают результаты выше указанной программы для -новых 'Easy' -уровней взаимосмешения выпуска 2.1 bs2b. Показаны только установки -low-easy уровня смешения -'-L' и high-easy уровня смешения '-H'.<br> - <br> - <span style="font-weight: bold;">Рисунок</span><span - style="font-weight: bold;"> 2.3. bs2b </span><span - style="font-weight: bold;">теоретическая частотная характеристика</span><span - style="font-weight: bold;">. 'Easy' версия.</span><br> - <img alt="bs2b theoretical frequency response. 'Easy' version" - src="img/bs2b_h_e-trans_f.png" style="width: 679px; height: 489px;"><br> - <br> -High-easy установка схожа с Chu Moy <a href="bs2b.html#r3">[3]</a> -версией кроссфидера.<br> -Рисунок 2.4 представляет характеристику временной задержки 'Easy' -версии.<br> - <br> - <span style="font-weight: bold;">Рисунок 2.4. bs2b теоретическая </span><span - style="font-weight: bold;">временная </span><span - style="font-weight: bold;">характеристика. 'Easy' версия.</span><br> - <img alt="bs2b theoretical time delay response. 'Easy' version" - src="img/bs2b_h_e-trans_d.png" style="width: 680px; height: 293px;"><br> - <br> -Эти характеристики выглядят похожими на 'нелегкую' версию из-за -одинакового набора частот среза для ФВЧ и малого различия в наборе -частот среза для ФОНЧ для обеих версий.<br> - <br> - <big><span style="font-weight: bold;"><a name="Practical_data"></a>3. -Эксперимент.<br> - </span></big><br> -Рисунок 3.1 показывает практические частотные характеристики bs2b. Это -частотный анализ пропущенного через -bs2b сигнала белого шума. Три вида белого шума: двухканальный моно -сигнал 'M', двухканальный независимый сигнал 'I' и одноканальный -сигнал. Обработка посредством bs2b одноканального сигнала -представляется как характеристика ФОНЧ 'HB' или канал с первичным -сигналом и как -характеристика ФВЧ 'LP' или канал без первичного сигналаl. Показаны -только установки bs2b низкого уровня '-L' и высокого уровня '-H' -смешивания. Установка среднего уровня смешивания опущена для -наглядности.<br> - <br> - <span style="font-weight: bold;">Рисунок 3.1. bs2b </span><span - style="font-weight: bold;">частотная характеристика</span><span - style="font-weight: bold;">.</span><br> - <img alt="bs2b frequency response" src="img/bs2b_exdata_f.png" - style="width: 678px; height: 488px;"><br> - <br> -Рисунок 3.2 показывает разницу между частотным анализом реальной аудио -программы и частотным анализом этой программы обработанной bs2b.<br> - <br> - <span style="font-weight: bold;">Рисунок 3.2. J.S. Bach -"BWV1066" -"Overture" </span><span style="font-weight: bold;">разница частотного -анализа</span><span style="font-weight: bold;"></span><span - style="font-weight: bold;">.</span><br> - <img - alt="J.S. Bach "BWV1066" "Overture" frequency analysis difference" - src="img/Bach-BWV1066-Overture-diff.png" - style="width: 681px; height: 294px;"><br> - <br> -Рисунок 3.3 показывает практические частотные характеристики bs2b c -установкой 'Easy High'.<br> - <br> - <span style="font-weight: bold;">Рисунок 3.3. bs2b частотная -характеристика</span><span style="font-weight: bold;">. 'Easy' версия</span><span - style="font-weight: bold;">.</span><br> - <img alt="bs2b frequency response. 'Easy' version" - src="img/bs2b_e_exdata_f.png" style="width: 678px; height: 488px;"><br> - <br> -Рисунок 3.4 как рисунок 3.2 но для 'Easy High' ('-H') и 'Easy -Low' ('-L') установок.<br> - <br> - <span style="font-weight: bold;">Рисунок 3.4. J.S. Bach -"BWV1066" -"Overture" разница частотного анализа</span><span - style="font-weight: bold;">. 'Easy' версия</span><span - style="font-weight: bold;">.</span><br> - <img - alt="J.S. Bach "BWV1066" "Overture" frequency analysis difference. 'Easy' version" - src="img/Bach-BWV1066-Overture-diff_e.png" - style="width: 681px; height: 294px;"><br> - <br> - <br> - <big><span style="font-weight: bold;"><a name="References"></a>4. -Ссылки.</span></big><br> - <br> - <a name="r1"></a>[1] Benjamin B. Bauer. Stereophonic -Earphones -and -Binaural Loudspeakers.<br> - <div style="margin-left: 40px;">JAES Volume 9 -Number 2 pp. 148-151; April 1961. <a href="http://www.aes.org/" - target="_top">http://www.aes.org/</a><br> - </div> - <br> - <a name="r2"></a>[2] Siegfried Linkwitz. Improved Headphone -Listening. Build a stereo-crossfeed circuit.<br> - <div style="margin-left: 40px;">Audio; December 1971. <a - href="http://www.linkwitzlab.com/" target="_top">http://www.linkwitzlab.com/</a><br> - </div> - <br> - <a name="r3"></a>[3] Chu Moy. An Acoustic Simulator for -Headphone -Amplifiers.<br> - <div style="margin-left: 40px;">(C) 1998-2001 Chu Moy. <a - href="http://headwize.com/projects/showfile.php?file=cmoy1_prj.htm" - target="_top">http://headwize.com/projects/showfile.php?file=cmoy1_prj.htm</a><br> - </div> - <br> - <a name="r4"></a>[4] Jan Meier. A DIY Headphone Amplifier.<br> - <div style="margin-left: 40px;"><a - href="http://www.meier-audio.de/" target="_top">http://www.meier-audio.de/</a>, <a href="http://bs2b.sourceforge.net/ARIETTA/index.html">CORDA ARIETTA</a><br> - </div> - <br> - <a name="r5"></a>[5] Steven W. Smith, Ph.D. The Scientist -and -Engineer's Guide to Digital Signal Processing.<br> - <div style="margin-left: 40px;">California Technical -Publishing; ISBN 0-9660176-3-3 (1997). <a - href="http://www.dspguide.com/" target="_top">http://www.dspguide.com/</a><br> - </div> - <br> - <a name="r6"></a>[6] Davide Rocchesso. Introduction to -Sound -Processing.<br> - <div style="margin-left: 40px;">(C) 2003 Davide Rocchesso, GNU -FDL. <a href="http://profs.sci.univr.it/%7Erocchess" target="_top">http://profs.sci.univr.it/~rocchess</a><br> - </div> - <br> - <a name="r7"></a>[7] BORES Signal Processing: Introduction -to -DSP.<br> - <div style="margin-left: 40px;">(C) 2004 Bores Signal Processing. - <a href="http://www.bores.com/courses/intro/index.htm" - target="_top">http://www.bores.com/courses/intro/index.htm</a><br> - </div> - <br> - <a name="r8"></a>[8] Richard O.Duda. 3-D Audio for HCI.<br> - <div style="margin-left: 40px;">(C) -1996-2000 Richard O.Duda. <a href="http://interface.cipic.ucdavis.edu/" - target="_top">http://interface.cipic.ucdavis.edu/</a><br> - </div> - <br> - <a name="r9"></a>[9] HeadRoom. About the HeadRoom -Crossfeed.<br> - <div style="margin-left: 40px;">(C) 1995-2006 HeadRoom. <a - href="http://www.headphone.com/products/faqs/about-headroom-crossfeed/" - target="_top">http://www.headphone.com/products/faqs/about-headroom-crossfeed/</a><br> - </div> - <br> - <a name="r10"></a>[10] John Conover. Spatial Distortion -Reduction Headphone Amplifier.<br> - <div style="margin-left: 40px;">(C) 1992-2005 John Conover. <a - href="http://www.johncon.com/john/SSheadphoneAmp/index.html" - target="_top">http://www.johncon.com/john/SSheadphoneAmp/index.html</a><br> - </div> - <br> - <hr style="width: 100%; height: 2px;">Авторское право (c) -2006 -Борис Михайлов < <a href="http://www.tmn.ru/%7Ebor" target="_top">http://www.tmn.ru/~bor</a>></td> - </tr> - </tbody> -</table> -</body> -</html> diff --git a/doc/bs2b.html b/doc/bs2b.html deleted file mode 100644 index 04162fc..0000000 --- a/doc/bs2b.html +++ /dev/null @@ -1,413 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP</title> - <meta content="Boris Mikhaylov" name="author"> -</head> -<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" - alink="#000099" link="#000099" vlink="#990099"> -<table - style="width: 700px; text-align: left; font-family: times new roman,times,serif;" - border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><big><big><span - style="font-weight: bold;">Bauer stereophonic-to-binaural DSP.</span></big></big><br> - <big><span style="font-weight: bold;"><br> - <a name="Preface"></a>1. -Preface.</span></big><br> - <br> -A regular stereo record is produced for listening by loudspeakers. This -means -that sound engineer makes stereo mixing with interpretation of sound -for hearing of one channel by both ears. Therefore, you will be tired -by long time headphone listening more through superstereo effect than -through -bad -headphone design. 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 (<a - href="http://bs2b.sourceforge.net/" target="_top">bs2b</a>) is -designed to improve headphone listening of stereo audio records. This -improvement have been described well by electronic circuit designers -like -Benjamin Bauer <a href="#r1">[1]</a>, Siegfried Linkwitz <a href="#r2">[2]</a>, -Chu Moy <a href="#r3">[3]</a>, Jan Meier <a href="#r4">[4]</a>, John -Conover <a href="#r10">[10]</a>, -HeadRoom <a href="#r9">[9]</a>. -The time delay at low frequency range, lowpass filters, highboost -filters and crossfeeding of their circuits has been made by first order -RL -(Bauer) or RC -(Linkwitz, Moy, Meier) analog filters. This design makes desired -effects and naturally eliminates comb filter effect at high frequency -range by -nonlinear phase response property of these filters. The bs2b makes the -same job by simple and fast (in comparison with convolution) single -pole recursive digital filters, because -these filters has a properties as an electronic RC-filters <a - href="#r5">[5]</a>, <a href="#r6">[6]</a>, <a href="#r7">[7]</a>. -I have -select a such values of cutoff frequencies of lowpass and -highboost -filters that allow to get a desired time delay and -most smooth resulting frequency -response. Unfortunately, I did not calculate the real value -of -cutoff -frequency of highboost filter, but it is not so important. A highboost -digital filter can be presented as two-step filter: as a -subtraction of attenuated lowpass filtered signal from original signal. -This -can be mathematically presented to the one-step recursive filter. In -the first (1.0.0) release of bs2b I -was apply a two-step method for highboost filter with using of already -calculated lowpas filtered signal, but it -makes the value of cutoff frequency of highboost filter little -lower than I was -assume, and it leads to a thickness in the lower midrange. -Nevertheless, as Chu Moy wrote <a href="#r3">[3]</a>, the -value of highboost filter cutoff frequency -should be little -higher then lowpass filter one for -more smooth frequency -response of crossfeeder. Therefore, I have made an one-step -method for highboost -filter in second release of bs2b. I was started this project -because the sound of other, I have see before, audioplayer's headphone -plugins have not satisfy me. The primary degradation of sound by -headphone -DSPs is prodiced by a -comb filter effect due to using of FFT convolution with -linear phase response for filtering. There is a <a - href="http://www.stereo-balance.net/" target="_top">HeadPlug</a> -plugin that have -'decomb' option, and author wrote about it: "The way the plugin does -this is -really damn-ass straight-forward from a technical point of view". I -have -try to make it much easier for CPU. Last -note. The bs2b don't produce simulation of any ambient and don't -produce any HRTF <a href="#r8">[8]</a> transform in high frequency -range. Some implementation of HRTF in the high frequency range is -already have done by -headphones, except -of binaural headphones like <a href="http://www.etymotic.com/" - target="_top">Etymotic</a> ER-4B.<br> -So, try to use bs2b to feel sound little out from your -head to lighten the work of your brain.<br> - <br> - <big><span style="font-weight: bold;"><a name="Theoretical_issue"></a>2. -Theoretical issue.</span></big><br> - <br> -Single -pole recursive filter is -presented by recursion eqation:<br> -O[n] = a0 * I[n] + a1 * I[n-1] + b1 * O[n-1]<br> -where a0, a1, b1 are recursion coefficients, I[n] is an input samples, -O[n] is an output (filtered) samples. Filter's response is relay to -recursion coefficients. Table 2.1 shows a perl program that calculate -frequency and time delay -responses of bs2b by H-transform <a href="bs2b.html#r5">[5]</a>.<br> - <br> - <span style="font-weight: bold;">Table 2.1. bs2b-H-transform.pl.</span><br> - <table - style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" - border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1">#!/usr/bin/perl<br> - <br> -use Math::Complex;<br> - <br> -$s = 40000; # Sample rate (Hz)<br> - <br> -$Fc = shift; # Lowpass filter cut frequency (Hz)<br> -$Gd = shift; # Lowpass filter gain (dB)<br> -$Ad_h = shift; # Highboost filter gain (dB) (0dB is highs)<br> - <br> -# example:<br> -# perl bs2b-H-transform.pl 700 -8 -2<br> -# it makes -6 dB crossfeed level<br> -#<br> -# bs2b 2.0.0b uses data listed below.<br> -# perl bs2b-H-transform.pl 700 -5.5 -2.5 # high crossfeed -level<br> -# perl bs2b-H-transform.pl 500 -6.75 -2.25 # middle crossfeed level<br> -# perl bs2b-H-transform.pl 360 -8 --2 # low crossfeed level<br> - </font><font size="-1"># bs2b 2.1.0 uses additional 'Easy' -data that below.</font><br> - <font size="-1"># perl bs2b-H-transform.pl 700 -8 --2 </font><font size="-1"># high -easy crossfeed -level</font><br> - <font size="-1"># perl bs2b-H-transform.pl 500 -9 -1.8</font><font - size="-1"> # middle</font><font size="-1"> easy</font><font - size="-1"> crossfeed level</font><br> - <font size="-1"># perl bs2b-H-transform.pl 360 -10 -1.6</font><font - size="-1"> # low</font><font size="-1"> easy</font><font - size="-1"> crossfeed level</font><br> - <font size="-1"><br> - <br> -$G = 10 ** ($Gd / 20);<br> -$A_h = 10 ** ($Ad_h / 20);<br> -$G_h = 1 - $A_h;<br> - <br> -$Gd_h = 20 * log($G_h) / log(10);<br> -$Fc_h = $Fc * (2 ** (($Gd - $Gd_h) / 12)); # '/3' by my theory, but...<br> - <br> -print "Fc_low = $Fc\nFc_high = $Fc_h\n";<br> -print "G = $G\nG_h = $G_h\n";<br> - <br> -$fc = $Fc / $s;<br> -$d = 1 / 2 / pi / $fc;<br> -$x = exp(-1 / $d);<br> - <br> -$fc_h = $Fc_h / $s;<br> -$d_h = 1 / 2 / pi / $fc_h;<br> -$x_h = exp(-1 / $d_h);<br> - <br> -# Lowpass single pole filter coefficients<br> -$b1 = $x;<br> -$a0 = $G * (1 - $x);<br> -$a1 = 0;<br> - <br> -# Highboost single pole filter coefficients<br> -$b1_h = $x_h;<br> -$a0_h = 1 - $G_h * (1 - $x_h);<br> -$a1_h = -$x_h;<br> - <br> -$w0 = 2 * pi * 4 / $s / 1.15;<br> -$z = exp(i * $w0);<br> -$H0 = ($a0 + $a1 / $z) / (1 - -$b1 / $z);<br> -$H0_h = ($a0_h + $a1_h / $z) / (1 - $b1_h / $z);<br> - <br> -for ($w = $w0 * 1.15; $w <= pi/2; $w0 = $w, $w *= 1.15)<br> -{<br> - $z = exp(i * $w);<br> - $H = ($a0 + $a1 -/ $z) / (1 - $b1 / $z);<br> - $H_h = ($a0_h + $a1_h / $z) / (1 - $b1_h / $z);<br> - <br> - $str = sprintf("%f\t%f\t%f\t%f\t%f\t%f\t%f\n",<br> - $s * $w / 2 / pi,<br> - rho($H), # -20 * log(rho($H)) / log(10) (dB)<br> - theta($H) * 180 / -pi, # degree<br> - (theta($H) - theta($H0)) / -($w - $w0) * 1000000 / $s, # mcs<br> - rho($H_h), # 20 * -log(rho($H_h)) / log(10)<br> - theta($H_h) * 180 / -pi, # degree<br> - (theta($H_h) - theta($H0_h)) -/ ($w - $w0) * 1000000 / $s # mcs<br> - );<br> - <br> - $str =~ s/\./\,/g; # Russian locale<br> - <br> - print $str;<br> - <br> - $H0 = $H;<br> - $H0_h = $H_h;<br> -}<br> - </font> </td> - </tr> - </tbody> - </table> - <br> -Pictures 2.1 and 2.2 shows a results of above program. In other words, -there is a theoretical responses of bs2b DSP. Only low crossfeed level -'-L' and high crossfeed level '-H' presets of bs2b are shown. Middle -crossfeed level preset is omitted for clearness. 'HB' is highboost -filter. 'LP' is lowpass filter. 'M' is a sum of these filtered signals, -that can be interpreted as bs2b action to a two channel mono signal.<br> - <br> - <span style="font-weight: bold;">Picture 2.1. bs2b theoretical -frequency -response.</span><br> - <img alt="bs2b theoretical frequency response" - src="img/bs2b_h-trans_f.png" style="width: 679px; height: 489px;"><br> - <br> -At picture 2.2 a negative value of time presents delay of signal by -microseconds.<br> - <br> - <span style="font-weight: bold;">Picture 2.2. bs2b theoretical -time delay response.</span><br> - <img alt="bs2b theoretical time delay response" - src="img/bs2b_h-trans_d.png" style="width: 680px; height: 293px;"><br> - <br> -This responses looks as a virtual stereo speakers are moved from -30 -degrees -azimuth (high crossfeed level) to 60 degrees azimuth (low crossfeed -level).<br> - <br> -Pictures 2.3 and 2.4 shows a results of above program for new 'Easy' -crossfeed levels of 2.1 release of bs2b. Only low-easy crossfeed level -'-L' and high-easy crossfeed level '-H' presets of bs2b are shown.<br> - <br> - <span style="font-weight: bold;">Picture 2.3. bs2b theoretical -frequency -response. 'Easy' version.</span><br> - <img alt="bs2b theoretical frequency response. 'Easy' version" - src="img/bs2b_h_e-trans_f.png" style="width: 679px; height: 489px;"><br> - <br> -The high-easy preset is close to Chu Moy's <a href="bs2b.html#r3">[3]</a> -version of crossfeeder.<br> -Picture 2.4 presents delay response of 'Easy' version.<br> - <br> - <span style="font-weight: bold;">Picture 2.4. bs2b theoretical -time delay response. 'Easy' version.</span><br> - <img alt="bs2b theoretical time delay response. 'Easy' version" - src="img/bs2b_h_e-trans_d.png" style="width: 680px; height: 293px;"><br> - <br> -This responses looks close to noneasy version because of the same -set of cutoff frequencies of lowpass filters and little differences of -highboost filters for both versions.<br> - <br> - <big><span style="font-weight: bold;"><a name="Practical_data"></a>3. -Practical data.<br> - </span></big><br> -Picture 3.1 shows the practical frequency responses of -bs2b. This is a frequency analysis of applied to -bs2b white noise signals. There -are two channel mono signal 'M', two channel independ signal 'I' and -one channel signal. The bs2b processing of one channel signal is -presented as highboost filtered 'HB' or channel with primary signal and -as -lowpass filtered 'LP' or channel without primary signal. Only low -crossfeed -level '-L' and high crossfeed level '-H' presets of -bs2b are shown. Middle crossfeed level preset is omitted for clearness.<br> - <br> - <span style="font-weight: bold;">Picture 3.1. bs2b frequency -response.</span><br> - <img alt="bs2b frequency response" src="img/bs2b_exdata_f.png" - style="width: 678px; height: 488px;"><br> - <br> -Picture 3.2 shows the difference between -frequency analysis of real audio -program and -frequency analysis of that program has been processed by bs2b.<br> - <br> - <span style="font-weight: bold;">Picture 3.2. J.S. Bach -"BWV1066" -"Overture" frequency analysis difference.</span><br> - <img - alt="J.S. Bach "BWV1066" "Overture" frequency analysis difference" - src="img/Bach-BWV1066-Overture-diff.png" - style="width: 681px; height: 294px;"><br> - <br> -Picture 3.3 shows the practical frequency responses of 'Easy High' -preset of -bs2b.<br> - <br> - <span style="font-weight: bold;">Picture 3.3. bs2b frequency -response</span><span style="font-weight: bold;">. 'Easy' version</span><span - style="font-weight: bold;">.</span><br> - <img alt="bs2b frequency response. 'Easy' version" - src="img/bs2b_e_exdata_f.png" style="width: 678px; height: 488px;"><br> - <br> -Picture 3.4 is like picture 3.2 but for 'Easy High' ('-H') and 'Easy -Low' ('-L') presets.<br> - <br> - <span style="font-weight: bold;">Picture 3.4. J.S. Bach -"BWV1066" -"Overture" frequency analysis difference</span><span - style="font-weight: bold;">. 'Easy' version</span><span - style="font-weight: bold;">.</span><br> - <img - alt="J.S. Bach "BWV1066" "Overture" frequency analysis difference. 'Easy' version" - src="img/Bach-BWV1066-Overture-diff_e.png" - style="width: 681px; height: 294px;"><br> - <br> - <br> - <big><span style="font-weight: bold;"><a name="References"></a>4. -References.</span></big><br> - <br> - <a name="r1"></a>[1] Benjamin B. Bauer. Stereophonic -Earphones -and -Binaural Loudspeakers.<br> - <div style="margin-left: 40px;">JAES Volume 9 -Number 2 pp. 148-151; April 1961. <a href="http://www.aes.org/" - target="_top">http://www.aes.org/</a><br> - </div> - <br> - <a name="r2"></a>[2] Siegfried Linkwitz. Improved Headphone -Listening. Build a stereo-crossfeed circuit.<br> - <div style="margin-left: 40px;">Audio; December 1971. <a - href="http://www.linkwitzlab.com/" target="_top">http://www.linkwitzlab.com/</a><br> - </div> - <br> - <a name="r3"></a>[3] Chu Moy. An Acoustic Simulator for -Headphone -Amplifiers.<br> - <div style="margin-left: 40px;">(C) 1998-2001 Chu Moy. <a - href="http://headwize.com/projects/showfile.php?file=cmoy1_prj.htm" - target="_top">http://headwize.com/projects/showfile.php?file=cmoy1_prj.htm</a><br> - </div> - <br> - <a name="r4"></a>[4] Jan Meier. A DIY Headphone Amplifier.<br> - <div style="margin-left: 40px;"><a - href="http://www.meier-audio.de/" target="_top">http://www.meier-audio.de/</a>, <a href="http://bs2b.sourceforge.net/ARIETTA/index.html">CORDA ARIETTA</a><br> - </div> - <br> - <a name="r5"></a>[5] Steven W. Smith, Ph.D. The Scientist -and -Engineer's Guide to Digital Signal Processing.<br> - <div style="margin-left: 40px;">California Technical -Publishing; ISBN 0-9660176-3-3 (1997). <a - href="http://www.dspguide.com/" target="_top">http://www.dspguide.com/</a><br> - </div> - <br> - <a name="r6"></a>[6] Davide Rocchesso. Introduction to -Sound -Processing.<br> - <div style="margin-left: 40px;">(C) 2003 Davide Rocchesso, GNU -FDL. <a href="http://profs.sci.univr.it/%7Erocchess" target="_top">http://profs.sci.univr.it/~rocchess</a><br> - </div> - <br> - <a name="r7"></a>[7] BORES Signal Processing: Introduction -to -DSP.<br> - <div style="margin-left: 40px;">(C) 2004 Bores Signal Processing. - <a href="http://www.bores.com/courses/intro/index.htm" - target="_top">http://www.bores.com/courses/intro/index.htm</a><br> - </div> - <br> - <a name="r8"></a>[8] Richard O.Duda. 3-D Audio for HCI.<br> - <div style="margin-left: 40px;">(C) -1996-2000 Richard O.Duda. <a href="http://interface.cipic.ucdavis.edu/" - target="_top">http://interface.cipic.ucdavis.edu/</a><br> - </div> - <br> - <a name="r9"></a>[9] HeadRoom. About the HeadRoom -Crossfeed.<br> - <div style="margin-left: 40px;">(C) 1995-2006 HeadRoom. <a - href="http://www.headphone.com/products/faqs/about-headroom-crossfeed/" - target="_top">http://www.headphone.com/products/faqs/about-headroom-crossfeed/</a><br> - </div> - <br> - <a name="r10"></a>[10] John Conover. Spatial Distortion -Reduction Headphone Amplifier.<br> - <div style="margin-left: 40px;">(C) 1992-2005 John Conover. <a - href="http://www.johncon.com/john/SSheadphoneAmp/index.html" - target="_top">http://www.johncon.com/john/SSheadphoneAmp/index.html</a><br> - </div> - <br> - <hr style="width: 100%; height: 2px;">Copyright (c) 2006 -Boris Mikhaylov < <a href="http://www.tmn.ru/%7Ebor" target="_top">http://www.tmn.ru/~bor</a>></td> - </tr> - </tbody> -</table> -</body> -</html> diff --git a/doc/bs2b_label.png b/doc/bs2b_label.png Binary files differdeleted file mode 100644 index cd6e4c3..0000000 --- a/doc/bs2b_label.png +++ /dev/null diff --git a/doc/bs2b_lib-ru.html b/doc/bs2b_lib-ru.html deleted file mode 100644 index b733b22..0000000 --- a/doc/bs2b_lib-ru.html +++ /dev/null @@ -1,108 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><title>Bauer stereophonic-to-binaural DSP</title> - - - - - - - - - - <meta content="Boris Mikhaylov" name="author"> - <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head><body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" alink="#000099" link="#000099" vlink="#990099"> -<table style="width: 700px; text-align: left; font-family: times new roman,times,serif;" border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><big><span style="font-weight: bold;">Bauer stereophonic-to-binaural DSP: описание библиотеки.</span></big><br> - <br> -Библиотека <a href="http://bs2b.sourceforge.net/" target="_top">bs2b</a> проста в -использовании. Смотрите таблицу 1 для примера. Это упрощенный код 'bs2bstream.c'. Файлы 'bs2b.h', 'bs2bclass.h' и 'bs2bconvert.c' пакета исходного кода также могут помочь.<br> -Вы можете использовать 'bs2bstream' вместе с '<a href="http://lame.sourceforge.net/" target="_top">lame</a>' вот такой командной строкой:<br> lame -t --decode test-44-16.wav - | bs2bstream -4 | \<br> -lame -r -x -m j -s 44.1 --bitwidth 16 --preset extreme - test.mp3<br>или без '-x' перемены местами байтов входного файла, вот такой:<br> -lame -t --decode test-44-16.wav - | bs2bstream -4 | \<br> -lame -r -m j -s 44.1 --bitwidth 16 --preset extreme - test.mp3<br><br> - <span style="font-weight: bold;">Таблица 1. Пример использования библиотеки bs2b.</span><br> - <table style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1"></font><font size="-1">#include <stdio.h><br>#include "bs2b.h"<br> - <br> -int main()<br> -{<br> - t_bs2bdp bs2bdp;<br> - short sample[ 2 ];<br> - <br> - bs2bdp = bs2b_open();<br> - <br> - /* Default init value<br> - bs2b_set_srate( bs2bdp, 44100L );<br> - bs2b_set_level( bs2bdp, BS2B_DEFAULT_CLEVEL );<br> - */<br> - <br> /* 16 bit raw PCM */<br> - while( 2 == fread( sample, sizeof( short ), 2, stdin ) )<br> - {<br> - bs2b_cross_feed_16( bs2bdp, sample );<br> - fwrite( sample, sizeof( short ), 2, stdout );<br> - }<br> - <br> - bs2b_close( bs2bdp );<br> - bs2bdp = 0;<br> - <br> - return 0 ;<br> -}</font><font size="-1"><br> - </font> </td> - </tr> - </tbody> - </table> - <br> - -Значение частоты дискретизации по умолчанию равно 44100 Гц. Значение -уровня взаимосмешения по умолчанию есть 'High Easy' (6). Если частота -дискретизации -аудио данных другая или вы хотите изменить уровень взаимосмешения то вы -должны вызвать функции 'bs2b_set_srate' и -'bs2b_set_level' соответственно.<br> - <br> - - <span style="font-weight: bold;">Таблица 2. Пример использования библиотеки bs2b в C++.</span><br> - - - <table style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" border="0" cellpadding="2" cellspacing="2"> - - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1"></font><font size="-1">#include <stdio.h><br>#include "bs2bclass.h"<br> - <br> -int main()<br> -{<br> - bs2b_base bs2b;<br> - <br> - // </font><font size="-1">Default init value</font><br> - - <font size="-1"> - //bs2b.set_srate( 44100L );<br> - //bs2b.set_level( BS2B_DEFAULT_CLEVEL );<br> - <br> short sample[ 2 ]; // </font><font size="-1">16 bit raw PCM</font><br> - - <font size="-1"> while( 2 == fread( sample, sizeof( short ), 2, stdin ) )<br> - {<br> - bs2b.cross_feed( sample );<br> - fwrite( sample, sizeof( short ), 2, stdout );<br> - }<br> - <br> - return 0 ;<br> -}</font><font size="-1"><br> - </font> </td> - </tr> - </tbody> - - </table> - - <br> - <hr style="width: 100%; height: 2px;">Авторское право (c) -2006 Борис Михайлов < <a href="http://www.tmn.ru/%7Ebor" target="_top">http://www.tmn.ru/~bor</a>></td> - </tr> - </tbody> -</table> -</body></html>
\ No newline at end of file diff --git a/doc/bs2b_lib.html b/doc/bs2b_lib.html deleted file mode 100644 index 52e48fa..0000000 --- a/doc/bs2b_lib.html +++ /dev/null @@ -1,107 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><title>Bauer stereophonic-to-binaural DSP</title> - - - - - - - - - - - <meta content="Boris Mikhaylov" name="author"></head><body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" alink="#000099" link="#000099" vlink="#990099"> -<table style="width: 700px; text-align: left; font-family: times new roman,times,serif;" border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><big><span style="font-weight: bold;">Bauer stereophonic-to-binaural DSP: library -description.</span></big><br> - <br> -The <a href="http://bs2b.sourceforge.net/" target="_top">bs2b</a> -library is simple -to use. See table 1 for example. It is a reductive code of 'bs2bstream.c'. The 'bs2b.h', 'bs2bclass.h' and 'bs2bconvert.c' files of the source code -package can help also.<br> -You can use a 'bs2bstream' with '<a href="http://lame.sourceforge.net/" target="_top">lame</a>' by a command line like this:<br> lame -t --decode test-44-16.wav - | bs2bstream -4 | \<br> lame -r -x -m j -s 44.1 --bitwidth 16 --preset extreme - test.mp3<br> -or without of '-x' swap bytes of input file, like this:<br> lame -t --decode test-44-16.wav - | bs2bstream -4 | \<br> lame -r -m j -s 44.1 --bitwidth 16 --preset extreme - test.mp3<br><br> - <span style="font-weight: bold;">Table 1. Example of using of bs2b -library.</span><br> - <table style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1">#include <stdio.h><br>#include "bs2b.h"<br> - <br> -int main()<br> -{<br> - t_bs2bdp bs2bdp;<br> - short sample[ 2 ];<br> - <br> - bs2bdp = bs2b_open();<br> - <br> - /* Default init value<br> - bs2b_set_srate( bs2bdp, 44100L );<br> - bs2b_set_level( bs2bdp, BS2B_DEFAULT_CLEVEL );<br> - */<br> - <br> /* 16 bit raw PCM */<br> - while( 2 == fread( sample, sizeof( short ), 2, stdin ) )<br> - {<br> - bs2b_cross_feed_16( bs2bdp, sample );<br> - fwrite( sample, sizeof( short ), 2, stdout );<br> - }<br> - <br> - bs2b_close( bs2bdp );<br> - bs2bdp = 0;<br> - <br> - return 0 ;<br> -}<br> - </font> </td> - </tr> - </tbody> - </table> - <br> -Sample rate default value is 44100 Hz. Crossfeed level default value is -'High Easy' (6). If sample rate of audio data is different or if you -want to -change -crossfeed level then you must call 'bs2b_set_srate' and -'bs2b_set_level' functions accordingly.<br> - <br> - <span style="font-weight: bold;">Table 2. Example of using of bs2b -library by C++.</span><br> - - - <table style="width: 100%; background-color: rgb(255, 255, 204); text-align: left; font-family: courier new,courier,monospace;" border="0" cellpadding="2" cellspacing="2"> - - <tbody> - <tr> - <td style="vertical-align: top;"><font size="-1">#include <stdio.h><br>#include "bs2bclass.h"<br> - <br> -int main()<br> -{<br> - bs2b_base bs2b;<br> - <br> - // </font><font size="-1">Default init value</font><br> - <font size="-1"> - //bs2b.set_srate( 44100L );<br> - //bs2b.set_level( BS2B_DEFAULT_CLEVEL );<br> - <br> short sample[ 2 ]; // </font><font size="-1">16 bit raw PCM</font><br> - <font size="-1"> while( 2 == fread( sample, sizeof( short ), 2, stdin ) )<br> - {<br> - bs2b.cross_feed( sample );<br> - fwrite( sample, sizeof( short ), 2, stdout );<br> - }<br> - <br> - return 0 ;<br> -}<br> - </font> </td> - </tr> - </tbody> - - </table> - - <br> - <hr style="width: 100%; height: 2px;">Copyright (c) 2006 -Boris Mikhaylov < <a href="http://www.tmn.ru/%7Ebor" target="_top">http://www.tmn.ru/~bor</a>></td> - </tr> - </tbody> -</table> -</body></html>
\ No newline at end of file diff --git a/doc/content-ru.html b/doc/content-ru.html deleted file mode 100644 index 0958e40..0000000 --- a/doc/content-ru.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP: Content</title> - <meta content="Boris Mikhaylov" name="author"> - <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> -</head> -<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" - alink="#000099" link="#000099" vlink="#990099"> -<img src="bs2b_label.png" alt="Bauer stereophonic-to-binaural" border="0" height="116" width="88"></a></p> -<a href="index.html" target="_top">English</a><br> -<a href="bs2b-ru.html#Preface" target="item">Предисловие</a><br> -<a href="bs2b-ru.html#Theoretical_issue" target="item">Теория</a><br> -<a href="bs2b-ru.html#Practical_data" target="item">Эксперимент</a><br> -<a href="bs2b_lib-ru.html" target="item">Библиотека</a><br> -<a href="bs2b-ru.html#References" target="item">Ссылки</a><br> -<a href="http://bs2b.sourceforge.net/" target="_top">Домой</a><br> -<a href="download.html" target="_top">Загрузить</a><br> -<a href="http://www.hydrogenaudio.org/forums/lofiversion/index.php/t38291.html" target="_top">Форум</a><br> -<a href="license.html" target="item">Лицензия</a><br> -<p> -<a href="http://sourceforge.net/projects/bs2b" target="_top"> - <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=151236&type=10" - width="80" height="15" border="0" - alt="Get Bauer stereophonic-to-binaural DSP at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> -</p> -</body> -</html> diff --git a/doc/content.html b/doc/content.html deleted file mode 100644 index ef91f3b..0000000 --- a/doc/content.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP: Content</title> - <meta content="Boris Mikhaylov" name="author"> -</head> -<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" - alink="#000099" link="#000099" vlink="#990099"> -<img src="bs2b_label.png" alt="Bauer stereophonic-to-binaural" border="0" height="116" width="88"></a></p> -<a href="index-ru.html" target="_top">Russian</a><br> -<a href="bs2b.html#Preface" target="item">Preface</a><br> -<a href="bs2b.html#Theoretical_issue" target="item">Theory</a><br> -<a href="bs2b.html#Practical_data" target="item">Experiment</a><br> -<a href="bs2b_lib.html" target="item">Library</a><br> -<a href="bs2b.html#References" target="item">References</a><br> -<a href="http://bs2b.sourceforge.net/" target="_top">Home</a><br> -<a href="download.html" target="_top">Download</a><br> -<a href="http://www.hydrogenaudio.org/forums/lofiversion/index.php/t38291.html" target="_top">Forum</a><br> -<a href="license.html" target="item">License</a><br> -<p> -<a href="http://sourceforge.net/projects/bs2b" target="_top"> - <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=151236&type=10" - width="80" height="15" border="0" - alt="Get Bauer stereophonic-to-binaural DSP at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> -</p> -</body> -</html> diff --git a/doc/download.html b/doc/download.html deleted file mode 100644 index 8a867bd..0000000 --- a/doc/download.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> -<head> -<meta http-equiv="Refresh" content="0;URL=http://sourceforge.net/projects/bs2b"> -</head> -</html> diff --git a/doc/img/Bach-BWV1066-Overture-diff.png b/doc/img/Bach-BWV1066-Overture-diff.png Binary files differdeleted file mode 100644 index 04f041d..0000000 --- a/doc/img/Bach-BWV1066-Overture-diff.png +++ /dev/null diff --git a/doc/img/Bach-BWV1066-Overture-diff_e.png b/doc/img/Bach-BWV1066-Overture-diff_e.png Binary files differdeleted file mode 100644 index 5c894f4..0000000 --- a/doc/img/Bach-BWV1066-Overture-diff_e.png +++ /dev/null diff --git a/doc/img/Makefile.am b/doc/img/Makefile.am deleted file mode 100644 index 46098d7..0000000 --- a/doc/img/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -EXTRA_DIST = \ - Bach-BWV1066-Overture-diff_e.png \ - Bach-BWV1066-Overture-diff.png \ - bs2b_e_exdata_f.png \ - bs2b_exdata_f.png \ - bs2b_h_e-trans_d.png \ - bs2b_h_e-trans_f.png \ - bs2b_h-trans_d.png \ - bs2b_h-trans_f.png diff --git a/doc/img/bs2b_e_exdata_f.png b/doc/img/bs2b_e_exdata_f.png Binary files differdeleted file mode 100644 index 5ef2e24..0000000 --- a/doc/img/bs2b_e_exdata_f.png +++ /dev/null diff --git a/doc/img/bs2b_exdata_f.png b/doc/img/bs2b_exdata_f.png Binary files differdeleted file mode 100644 index 722670c..0000000 --- a/doc/img/bs2b_exdata_f.png +++ /dev/null diff --git a/doc/img/bs2b_h-trans_d.png b/doc/img/bs2b_h-trans_d.png Binary files differdeleted file mode 100644 index bfd485a..0000000 --- a/doc/img/bs2b_h-trans_d.png +++ /dev/null diff --git a/doc/img/bs2b_h-trans_f.png b/doc/img/bs2b_h-trans_f.png Binary files differdeleted file mode 100644 index c1df8ee..0000000 --- a/doc/img/bs2b_h-trans_f.png +++ /dev/null diff --git a/doc/img/bs2b_h_e-trans_d.png b/doc/img/bs2b_h_e-trans_d.png Binary files differdeleted file mode 100644 index 1e5641d..0000000 --- a/doc/img/bs2b_h_e-trans_d.png +++ /dev/null diff --git a/doc/img/bs2b_h_e-trans_f.png b/doc/img/bs2b_h_e-trans_f.png Binary files differdeleted file mode 100644 index 2919303..0000000 --- a/doc/img/bs2b_h_e-trans_f.png +++ /dev/null diff --git a/doc/index-ru.html b/doc/index-ru.html deleted file mode 100644 index 8d0da80..0000000 --- a/doc/index-ru.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP</title> - <meta content="Boris Mikhaylov" name="author"> - <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> -</head> -<frameset cols="120, *" - frameborder="0" framespacing="0" - style="background-color: rgb(255, 255, 255)"> - <frame name="menu" - marginheight="10" marginwidth="10" - frameborder="0" framespacing="0" scrolling="no" noresize - src="content-ru.html"> - <frame name="item" - frameborder="0" framespacing="0" scrolling="yes" noresize - src="bs2b-ru.html"> -</frameset> -</html> diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index fc01f9c..0000000 --- a/doc/index.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> -<html> -<head> - <title>Bauer stereophonic-to-binaural DSP</title> - <meta content="Boris Mikhaylov" name="author"> -</head> -<frameset cols="120, *" - frameborder="0" framespacing="0" - style="background-color: rgb(255, 255, 255)"> - <frame name="menu" - marginheight="10" marginwidth="10" - frameborder="0" framespacing="0" scrolling="no" noresize - src="content.html"> - <frame name="item" - frameborder="0" framespacing="0" scrolling="yes" noresize - src="bs2b.html"> -</frameset> -</html> diff --git a/doc/license.html b/doc/license.html deleted file mode 100644 index dd33803..0000000 --- a/doc/license.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>License</title> -</head> -<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" - alink="#000099" link="#000099" vlink="#990099"> -<table - style="width: 700px; text-align: left; font-family: times new roman,times,serif;" - border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td style="vertical-align: top;"><tt> - <p> - Copyright (c) 2005 <a href="http://www.tmn.ru/%7Ebor" target="_top">Boris Mikhaylov</a> - </p> - <p>Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation files -(the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions:</p> - <p>The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.</p> - <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> - </tt> </td> - </tr> - </tbody> -</table> -</body> -</html> diff --git a/doc/readme.txt b/doc/readme.txt new file mode 100644 index 0000000..4d0fb93 --- /dev/null +++ b/doc/readme.txt @@ -0,0 +1,2 @@ +Online and downloadable description is available +at http://bs2b.sourceforge.net/ |