Switch to side-by-side view

--- a/doc/upabx.html
+++ b/doc/upabx.html
@@ -4,7 +4,7 @@
 <head>
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
 <meta name="generator" content="AsciiDoc 8.6.9" />
-<title>UPABX: the useless UPnP ABX testing tool</title>
+<title>UPABX: a UPnP ABX testing tool</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -733,7 +733,7 @@
 </head>
 <body class="article">
 <div id="header">
-<h1>UPABX: the useless UPnP ABX testing tool</h1>
+<h1>UPABX: a UPnP ABX testing tool</h1>
 <span id="author">Jean-Francois Dockes</span><br />
 <span id="email"><code>&lt;<a href="mailto:jf@dockes.org">jf@dockes.org</a>&gt;</code></span><br />
 <span id="revdate">2017-11-16</span>
@@ -744,23 +744,6 @@
 <div class="paragraph"><p><strong>upabx</strong> is a tool for performing
 <a href="https://en.wikipedia.org/wiki/ABX_test">ABX listening tests</a> using one
 or several UPnP renderers, and, possibly, a hardware switchbox.</p></div>
-<div class="paragraph"><p>It is useless because all reasonable hardware sound the same (to me),
-except for speakers and listening rooms. <strong>upabx</strong> does not support switching
-the latter (bad bad lazy developper), and there are better tools for
-comparing encodings and other software factors.</p></div>
-<div class="paragraph"><p>In other terms: you could use <strong>upabx</strong> to compare your extremely expensive
-DAC with a Raspberry PI Hifiberry board, but they sound the same. If you
-want to compare 128 vs 320 Kb/S MP3, use the
-<a href="http://www.foobar2000.org/components/view/foo_abx">foobar2000 ABX
-comparator plugin</a> or something like it, it will do a better job.</p></div>
-<div class="paragraph"><p>See <a href="#dacbattle">at the end</a> for a practical example, comparing two DACs
-(none of the very expensive kind).</p></div>
-<div class="paragraph"><p>If you are still with me though&#8230;</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_what_the_software_does">What the software does</h2>
-<div class="sectionbody">
 <div class="paragraph"><p>The program controls:</p></div>
 <div class="ulist"><ul>
 <li>
@@ -793,7 +776,7 @@
 what it is we try to test.</p></div>
 <div class="paragraph"><p>A <a href="#:ABXMKTEST">companion program</a> provides an easy GUI for creating test
 definition files, including retrieving the URL from any renderer on which
-it is playing.</p></div>
+it is playing or paused.</p></div>
 </div>
 </div>
 <div class="sect1">
@@ -823,6 +806,90 @@
 performances), or the same renderer and URL if you are using a hardware
 switch to compare preamplifiers or amplifiers. More on the sample
 parameters <a href="#testparams">further down</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ABXMKTEST">The upabxmktest test creation utility</h2>
+<div class="sectionbody">
+<div class="imageblock">
+<div class="content">
+<img src="upabxmktest-1.png" alt="upabxmktest-1.png" />
+</div>
+</div>
+<div class="paragraph"><p>The utility makes it easy to create test files. Especially, it will find
+out the list of renderers present on the network, and it will retrieve an
+URL and the associated metadata from a Renderer, so you can set the track
+to play for each of the A/B sections just by setting it to play (or pause)
+somewhere, and fetching it from the GUI.</p></div>
+<div class="paragraph"><p>Set the parameters to use in the <em>A</em> section, then set the changed parameters
+in the <em>B</em> section.</p></div>
+<div class="paragraph"><p>The URL <em>Choose</em> buttons will open a popup, where you will be able to
+select a renderer from a list. The utility will then fetch the URL and
+metadata for the track currently playing or paused on the Renderer.</p></div>
+<div class="paragraph"><p>When you are done, use the <em>File</em> menu to save the test definition. The
+file format details are described in an <a href="#testconfig">annex</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="TESTRESULTS">Test results</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The test results are stored in <em>~/.local/share/upabx</em> and are named like
+<em>date</em>-<em>time</em>-<code>result</code>. They look like the following:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>[ Contents of the test parameters file included here]
+
+
+Mon Nov 13 17:45:37 2017 Choice: B : True
+Mon Nov 13 17:45:59 2017 Choice: A : True
+Mon Nov 13 17:46:16 2017 Choice: A : True
+Mon Nov 13 17:46:36 2017 Choice: B : True
+Mon Nov 13 17:46:55 2017 Choice: A : True
+Mon Nov 13 17:47:11 2017 Choice: B : True
+Mon Nov 13 17:47:26 2017 Choice: A : True
+Mon Nov 13 17:47:42 2017 Choice: A : True
+Mon Nov 13 17:47:52 2017 Choice: A : True
+Mon Nov 13 17:48:00 2017 Choice: B : True
+
+Mon Nov 13 17:48:00 2017 Test completed: 10/10</code></pre>
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="globalconf">The global configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Most of the program parameters are found in the test parameter files (see
+next). However, some values are defined in a global configuration file
+(<em>~/.config/upabx/upabx.conf</em>). The file contains <em>name = value</em> lines.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+switchhost
+</dt>
+<dd>
+<p>
+Host name or IP address for the switch interface.
+</p>
+</dd>
+<dt class="hdlist1">
+seqlen
+</dt>
+<dd>
+<p>
+Default test sequence length (which itself has a default:
+10). This can be redefined in the test configuration for individual tests.
+</p>
+</dd>
+<dt class="hdlist1">
+switchport
+</dt>
+<dd>
+<p>
+TCP port for the switch interface (default: 8080).
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Only <code>switchhost</code> needs to be defined and only if you are actually using a
+hardware switch.</p></div>
 </div>
 </div>
 <div class="sect1">
@@ -859,87 +926,6 @@
 switch (the GUI does not need to run on the same host as the switch
 controller). Any kind of relay which can interface more or less directly
 with Raspberry Pi GPIO pins should be workable.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="ABXMKTEST">The upabxmktest test creation utility</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="upabxmktest-1.png" alt="upabxmktest-1.png" />
-</div>
-</div>
-<div class="paragraph"><p>The utility makes it easy to create test files. Especially, it will find
-out the list of renderers present on the network, and it will retrieve an
-URL and the associated metadata from a Renderer, so you can set the track
-to play for each of the A/B sections just by setting it to play (or pause)
-somewhere, and fetching it from the GUI.</p></div>
-<div class="paragraph"><p>Set the parameters to use in the <em>A</em> section, then set the changed parameters
-in the <em>B</em> section.</p></div>
-<div class="paragraph"><p>The URL <em>Choose</em> buttons will open a popup, where you will be able to
-select a renderer from a list. The utility will then fetch the URL and
-metadata for the track currently playing or paused on the Renderer.</p></div>
-<div class="paragraph"><p>When you are done, use the <em>File</em> menu to save the test definition. The
-file format details are described in an <a href="#testconfig">annex</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_test_results">Test results</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The test results are stored in <em>~/.local/share/upabx</em> and are named like
-<em>date</em>-<em>time</em>-<code>result</code>. They look like the following:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>[ Contents of the test parameters file included here]
-
-
-Mon Nov 13 17:45:37 2017 Choice: B : True
-Mon Nov 13 17:45:59 2017 Choice: A : True
-Mon Nov 13 17:46:16 2017 Choice: A : True
-Mon Nov 13 17:46:36 2017 Choice: B : True
-Mon Nov 13 17:46:55 2017 Choice: A : True
-Mon Nov 13 17:47:11 2017 Choice: B : True
-Mon Nov 13 17:47:26 2017 Choice: A : True
-Mon Nov 13 17:47:42 2017 Choice: A : True
-Mon Nov 13 17:47:52 2017 Choice: A : True
-Mon Nov 13 17:48:00 2017 Choice: B : True
-
-Mon Nov 13 17:48:00 2017 Test completed: 10/10</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="globalconf">The global configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Most of the program parameters are found in the test parameter files (see
-next). However, some defaults are defined in a global configuration file
-(<em>~/.config/upabx/upabx.conf</em>). The file just contains <em>name = value</em> lines.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-seqlen
-</dt>
-<dd>
-<p>
-Default test sequence length.
-</p>
-</dd>
-<dt class="hdlist1">
-switchhost
-</dt>
-<dd>
-<p>
-Host name or IP address for the switch interface.
-</p>
-</dd>
-<dt class="hdlist1">
-switchport
-</dt>
-<dd>
-<p>
-TCP port for the switch interface.
-</p>
-</dd>
-</dl></div>
 </div>
 </div>
 <div class="sect1">
@@ -1006,136 +992,6 @@
 </div>
 </div>
 <div class="sect1">
-<h2 id="switchhard">The hardware switch</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>I am not a hardware engineer, and I&#8217;m sure that there is not much to like
-in my switchbox :)</p></div>
-<div class="paragraph"><p>The big relays need too much command power to be controlled directly from
-the GPIO, so there is a small interface relay between them and the Pi.</p></div>
-<div class="paragraph"><p>Also they need 12V, (which is ennoying, it should be possible to arrange to
-run everything on 5V), in consequence, the whole thing is powered by a
-small external 5/12v PC power supply.</p></div>
-<div class="paragraph"><p>I am using pre-integrated modules for the low power relays (line control
-and speaker interface relay), they have a transistor for GPIO-compatible
-control levels, a flyback diode and maybe an indicator LED, all on a small
-circuit board, and DIY them would not save a lot of money&#8230;</p></div>
-<div class="paragraph"><p>Most expensive section of the whole thing ? Line and speaker connectors.</p></div>
-<div class="paragraph"><p>The box looks complicated because there are many wires. But really, it is
-very simple:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The chosen GPIO pins are connected to the small relay inputs.
-</p>
-</li>
-<li>
-<p>
-5V (and possibly 12 V) are distributed where needed (Raspberry PI, relays
-  VCC).
-</p>
-</li>
-<li>
-<p>
-The intermediate relay output goes to the big relay command input.
-</p>
-</li>
-<li>
-<p>
-The switched lines to the relay contacts.
-</p>
-</li>
-</ul></div>
-<hr>
-<a href="pictures/switchbox.html">
-<img style="margin-right:10px;" src="pictures/switchbox-thumb.jpg"
-alt="The switch box" align="left"></a>
-<div class="paragraph"><p>The switch box. On the left, the Raspberry PI presents its ethernet port
-through the back plate. And the power supply terminal. In the centre, the
-big speaker/power amp relays. On the right, the line relay (will be
-replaced by a pair so that I can switch both signals and earths):</p></div>
-<br clear="all">
-<hr>
-<a href="pictures/speaker.html">
-<img style="margin-right:10px;" src="pictures/speaker-thumb.jpg"
-alt="The speaker relays" align="left"></a>
-<div class="paragraph"><p>One of the big speaker/power line relays. The small interface relay
-controlled by the GPIO piggy-backs on it, fixed by double-sided tape. One
-can also see the main relay flyback diode.</p></div>
-<div class="paragraph"><p><a href="http://www.conrad.fr/ce/fr/product/507566/Relais-enfichable-Hongfa-HF92F-012D-2C21S-12-VDC-30-A-2-inverseurs-RT-1-pcs/SHOP_AREA_17391">supplier
-page for the big relays</a> (in French, sorry, but I&#8217;m sure that you can get
-an idea anyway and find an equivalent in your country). Finding one which
-can be controlled with 5V will make your life easier.</p></div>
-<div class="paragraph"><p><a href="https://www.aliexpress.com/item/DR21B01-DC-5V-DPDT-Signal-Relay-Module-Dual-Channel-selector-switch-Board-for-LED-MCU-Motor/32688085237.html?spm=2114.13010608.0.0.UfLrLm">Example
-of relay board for the interface between the GPIO and the big relay</a>.</p></div>
-<br clear="all">
-<hr>
-<a href="pictures/line.html">
-<img style="margin-right:10px;" src="pictures/line-thumb.jpg"
-alt="The line-level relay" align="left"></a>
-<div class="paragraph"><p>The line-level
-relay module. <a href="http://www.ebay.fr/itm/201109114068?_trksid=p2057872.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT">For
-example</a>. I want to replace it with
-<a href="https://www.ebay.fr/itm/Two-DPDT-Signal-Relay-Module-Board-DC5V-Version/201138699034?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2057872.m2749.l2649">a
-double one</a> to avoid having to link all the signal earths.</p></div>
-<br clear="all">
-</div>
-</div>
-<div class="sect1">
-<h2 id="dacbattle">Battle of the DACs</h2>
-<div class="sectionbody">
-<a href="pictures/hifiberry-explorer.html">
-<img style="margin-right:10px;" src="pictures/hifiberry-explorer-thumb.jpg"
-alt="Rpi+hifiberry odroid+explorer" align="left"></a>
-<div class="paragraph"><p>And now for a real example. Comparing a HifiBerry DAC+ pro mounted on an
-rpi3, with the Meridian Explorer 2, connected to the USB output of an
-Odroid C2. Both systems are running mpd + upmpdcli. The Headphone amp is an
-O2.</p></div>
-<div class="paragraph"><p>I am using a 96/24 FLAC 2L demo track for the comparison: "Vivaldi Cantata Rv
-679. Aria Cupido te Vedi"</p></div>
-<br clear="all">
-<div class="paragraph"><p>The test configuration file:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>description = Comparison of hifiberry dac+pro with Meridian Explorer 2, \
-using the 2L Vivaldi 96/24 FLAC sample
-
-# Hifiberry DAC+ pro
-renderer = UpMpd-r31
-line = A
-
-url = http://192.168.4.4:9790/minimserver/*/mp3/test-tracks/2L/VIVALDI_Cantata_Rv_679__Che_Giova_Il_Sospirar,_Povero_Core_-_Aria__Cupido,_Tu_Vedi-flac-96-24.flac
-
-
-[test]
-
-# Explorer
-renderer = odroid32
-line = B</code></pre>
-</div></div>
-<a href="pictures/level-matching.html">
-<img style="margin-right:10px;" src="pictures/level-matching-thumb.jpg"
-alt="Rpi+hifiberry odroid+explorer" align="left"></a>
-<div class="paragraph"><p>It is very important to match the output levels. Conveniently, my
-Sennheiser has pluggable connections with nice bare contacts which I can
-easily hook up to the multimeter. Otherwise, a custom mini-jack to banana
-plug cable would be handy.</p></div>
-<div class="paragraph"><p>Both DACS have hardware volume controls, which I use. The Hifiberry is set
-at 100/100, the Explorer 2 at 96/100 (in MPD terms). Testing with a 50 Hz
-tone, I could not adjust better than 0.43 V vs 0.45 V, which should be
-roughly equivalent to a 0.6 dB difference ? This might need a little more
-attention, also measuring at other frequencies (hopefully, these 2
-should be flat at 50hz), but it&#8217;s all moot because anyway&#8230;:</p></div>
-<br clear="all">
-<div class="paragraph"><p>I did not even bother to run the ABX sequence: both DACs sound exactly the
-same to me.</p></div>
-<div class="paragraph"><p>Useless ABX tool :)</p></div>
-<div class="paragraph"><p>I am not claiming any absolute result though: I do have very bad
-hearing, and, as you know, we can&#8217;t prove a negative :)</p></div>
-<div class="paragraph"><p>And I&#8217;d be quite interested by your comments (see the Disqus section at the
-end).</p></div>
-</div>
-</div>
-<div class="sect1">
 <h2 id="testconfig">Annex: test definition file details</h2>
 <div class="sectionbody">
 <div class="paragraph"><p>Tests are defined in simple configuration files. The configuration file
@@ -1254,17 +1110,6 @@
 </dl></div>
 <div class="paragraph"><p>If neither <em>line</em> nor <em>spk</em> are set, <strong>upabx</strong> will not try to access the
 hardware switch interface.</p></div>
-      <div id="disqus_thread"></div>
-      <script type="text/javascript">
-        var disqus_shortname = 'lesbonscomptes';
-        (function() {
-            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
-            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
-            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
-        })();
-      </script>
-      <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
-      <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
 </div>
 </div>
 </div>
@@ -1273,7 +1118,7 @@
 <div id="footer">
 <div id="footer-text">
 Last updated
- 2018-01-15 10:28:02 CET
+ 2018-02-03 16:42:14 CET
 </div>
 </div>
 </body>