--- a/doc/upabx.txt
+++ b/doc/upabx.txt
@@ -2,29 +2,11 @@
 :Email: jf@dockes.org
 :Date: 2017-11-16
 
-= UPABX: the useless UPnP ABX testing tool
+= UPABX: a UPnP ABX testing tool
 
 *upabx* is a tool for performing
 link:https://en.wikipedia.org/wiki/ABX_test[ABX listening tests] using one
 or several UPnP renderers, and, possibly, a hardware switchbox.
-
-It is useless because all reasonable hardware sound the same (to me),
-except for speakers and listening rooms. *upabx* does not support switching
-the latter (bad bad lazy developper), and there are better tools for
-comparing encodings and other software factors.
-
-In other terms: you could use *upabx* 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
-link:http://www.foobar2000.org/components/view/foo_abx[foobar2000 ABX
-comparator plugin] or something like it, it will do a better job.
-
-See xref:dacbattle[at the end] for a practical example, comparing two DACs
-(none of the very expensive kind).
-
-If you are still with me though...
-
-== What the software does
 
 The program controls:
 
@@ -43,7 +25,7 @@
 
 A xref::ABXMKTEST[companion program] provides an easy GUI for creating test
 definition files, including retrieving the URL from any renderer on which
-it is playing.
+it is playing or paused.
 
 == The ABX test Graphical User Interface
 
@@ -72,6 +54,70 @@
 switch to compare preamplifiers or amplifiers. More on the sample
 parameters xref:testparams[further down].
 
+[[ABXMKTEST]]
+== The upabxmktest test creation utility
+
+image::upabxmktest-1.png[]
+
+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.
+
+Set the parameters to use in the 'A' section, then set the changed parameters
+in the 'B' section. 
+
+The URL 'Choose' 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.
+
+When you are done, use the 'File' menu to save the test definition. The
+file format details are described in an xref:testconfig[annex].
+
+
+[[TESTRESULTS]]
+== Test results
+
+The test results are stored in '~/.local/share/upabx' and are named like
+'date'-'time'-+result+. They look like the following:
+
+----
+
+[ 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
+----
+
+
+[[globalconf]]
+== The global configuration
+
+Most of the program parameters are found in the test parameter files (see
+next). However, some values are defined in a global configuration file
+('~/.config/upabx/upabx.conf'). The file contains 'name = value' lines.
+
+switchhost:: Host name or IP address for the switch interface.
+
+seqlen:: Default test sequence length (which itself has a default:
+10). This can be redefined in the test configuration for individual tests.
+
+switchport:: TCP port for the switch interface (default: 8080).
+
+Only +switchhost+ needs to be defined and only if you are actually using a
+hardware switch.
 
 == Building, operating environment
 
@@ -107,66 +153,6 @@
 controller). Any kind of relay which can interface more or less directly
 with Raspberry Pi GPIO pins should be workable.
 
-[[ABXMKTEST]]
-== The upabxmktest test creation utility
-
-image::upabxmktest-1.png[]
-
-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.
-
-Set the parameters to use in the 'A' section, then set the changed parameters
-in the 'B' section. 
-
-The URL 'Choose' 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.
-
-When you are done, use the 'File' menu to save the test definition. The
-file format details are described in an xref:testconfig[annex].
-
-== Test results
-
-The test results are stored in '~/.local/share/upabx' and are named like
-'date'-'time'-+result+. They look like the following:
-
-----
-
-[ 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
-----
-
-
-[[globalconf]]
-== The global configuration
-
-Most of the program parameters are found in the test parameter files (see
-next). However, some defaults are defined in a global configuration file
-('~/.config/upabx/upabx.conf'). The file just contains 'name = value' lines.
-
-seqlen:: Default test sequence length.
-
-switchhost:: Host name or IP address for the switch interface.
-
-switchport:: TCP port for the switch interface.
-
-
 
 [[switchapp]]
 == The hardware switch interface application
@@ -233,171 +219,6 @@
 When using the application from *upabx*, the host and port are set in the
 *upabx* xref:globalconf[global configuration file].
 
-[[switchhard]]
-== The hardware switch
-
-I am not a hardware engineer, and I'm sure that there is not much to like
-in my switchbox :)
-
-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.
-
-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.
-
-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...
-
-Most expensive section of the whole thing ? Line and speaker connectors.
-
-The box looks complicated because there are many wires. But really, it is
-very simple:
-
-- The chosen GPIO pins are connected to the small relay inputs.
-- 5V (and possibly 12 V) are distributed where needed (Raspberry PI, relays
-  VCC).
-- The intermediate relay output goes to the big relay command input.
-- The switched lines to the relay contacts.
-
-
-++++
-<hr>
-++++
-
-++++
-<a href="pictures/switchbox.html">
-<img style="margin-right:10px;" src="pictures/switchbox-thumb.jpg"
-alt="The switch box" align="left"></a>
-++++
-
-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):
-
-++++
-<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>
-++++
-
-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.
-
-link: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] (in French, sorry, but I'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.
-
-link: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].
-
-++++
-<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>
-++++
-The line-level
-relay module. link:http://www.ebay.fr/itm/201109114068?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT[For
-example]. I want to replace it with
-link:https://www.ebay.fr/itm/Two-DPDT-Signal-Relay-Module-Board-DC5V-Version/201138699034?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649[a
-double one] to avoid having to link all the signal earths.
-++++
-<br clear="all">
-++++
-
-
-[[dacbattle]]
-== Battle of the DACs
-
-++++
-<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>
-++++
-
-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.
-
-I am using a 96/24 FLAC 2L demo track for the comparison: "Vivaldi Cantata Rv
-679. Aria Cupido te Vedi"
-
-++++
-<br clear="all">
-++++
-
-The test configuration file:
-
-
-----
-
-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
-----
-
-++++
-<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>
-++++
-
-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.
-
-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's all moot because anyway...:
-
-
-++++
-<br clear="all">
-++++
-
-I did not even bother to run the ABX sequence: both DACs sound exactly the
-same to me.
-
-Useless ABX tool :)
-
-I am not claiming any absolute result though: I do have very bad
-hearing, and, as you know, we can't prove a negative :)
-
-And I'd be quite interested by your comments (see the Disqus section at the
-end).
-
 
 [[testconfig]]
 == Annex: test definition file details
@@ -474,21 +295,3 @@
 
 If neither 'line' nor 'spk' are set, *upabx* will not try to access the
 hardware switch interface.
-
-
-++++
-      <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>
-
-++++
-
-