annotate docs/Instructions/Instructions.tex @ 1103:2051868b21f0

Hotfix: Updated schema. <audioelement>, <surveyelement> and <commentquestion> have optional name attribute.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Wed, 09 Mar 2016 11:29:16 +0000
parents 0a15fa67bda1
children 124e6c702845
rev   line source
djmoffat@1099 1 \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
djmoffat@1099 2 \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
djmoffat@1099 3 \geometry{letterpaper} % ... or a4paper or a5paper or ...
djmoffat@1099 4 %\geometry{landscape} % Activate for rotated page geometry
djmoffat@1099 5 \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
djmoffat@1099 6 \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
djmoffat@1099 7 % TeX will automatically convert eps --> pdf in pdflatex
djmoffat@1099 8
djmoffat@1099 9 \usepackage{listings} % Source code
djmoffat@1099 10 \usepackage{xcolor} % colour (source code for instance)
djmoffat@1099 11 \definecolor{grey}{rgb}{0.1,0.1,0.1}
djmoffat@1099 12 \definecolor{darkblue}{rgb}{0.0,0.0,0.6}
djmoffat@1099 13 \definecolor{cyan}{rgb}{0.0,0.6,0.6}
djmoffat@1099 14
djmoffat@1099 15 \usepackage{amssymb}
djmoffat@1099 16 \usepackage{cite}
djmoffat@1099 17 \usepackage{hyperref} % Hyperlinks
djmoffat@1099 18 \usepackage[nottoc,numbib]{tocbibind} % 'References' in TOC
djmoffat@1099 19
djmoffat@1099 20 \graphicspath{{img/}} % Relative path where the images are stored.
djmoffat@1099 21
djmoffat@1099 22 \title{Instructions for \\ Web Audio Evaluation Tool}
djmoffat@1099 23 \author{Nicholas Jillings, Brecht De Man and David Moffat}
djmoffat@1099 24 \date{7 December 2015} % Activate to display a given date or no date
djmoffat@1099 25
djmoffat@1099 26 \begin{document}
djmoffat@1099 27 \maketitle
djmoffat@1099 28
djmoffat@1099 29 These instructions are about use of the Web Audio Evaluation Tool on Windows and Mac OS X platforms.
djmoffat@1099 30
djmoffat@1099 31 We request that you acknowledge the authors and cite our work when using it \cite{waet}, see also CITING.txt.
djmoffat@1099 32
djmoffat@1099 33 The tool is available in its entirety including source code on \url{https://code.soundsoftware.ac.uk/projects/webaudioevaluationtool/}, under the GNU General Public License v3.0 (\url{http://choosealicense.com/licenses/gpl-3.0/}), see also LICENSE.txt.
djmoffat@1099 34
djmoffat@1099 35 % TO DO: Linux (Android, iOS)
djmoffat@1099 36
djmoffat@1099 37 \tableofcontents
djmoffat@1099 38
djmoffat@1099 39 \clearpage
djmoffat@1099 40
djmoffat@1099 41 \section{Installation}
djmoffat@1099 42 Download the folder (\url{https://code.soundsoftware.ac.uk/hg/webaudioevaluationtool/archive/tip.zip}) and unzip in a location of your choice, or pull the source code from \url{https://code.soundsoftware.ac.uk/hg/webaudioevaluationtool} (Mercurial).
djmoffat@1099 43
djmoffat@1099 44 \subsection{Contents}
djmoffat@1099 45 The folder should contain the following elements: \\
djmoffat@1099 46
djmoffat@1099 47 \textbf{Main folder:}
djmoffat@1099 48 \begin{itemize}
djmoffat@1099 49 \item \texttt{analyse.html}: analysis and diagnostics of a set of result XML files
djmoffat@1099 50 \item \texttt{core.css, graphics.css, structure.css}: core style files (edit to change appearance)
djmoffat@1099 51 \item \texttt{CITING.txt, LICENSE.txt, README.txt}: text files with, respectively, the citation which we ask to include in any work where this tool or any portion thereof is used, modified or otherwise; the license under which the software is shared; and a general readme file referring to these instructions.
djmoffat@1099 52 \item \texttt{core.js}: JavaScript file with core functionality
djmoffat@1099 53 \item \texttt{index.html}: webpage where interface should appear (includes link to test configuration XML)
djmoffat@1099 54 \item \texttt{jquery-2.1.4.js}: jQuery JavaScript Library
djmoffat@1099 55 \item \texttt{loudness.js}: Allows for automatic calculation of loudness of Web Audio API Buffer objects, return gain values to correct for a target loudness or match loudness between multiple objects
djmoffat@1099 56 \item \texttt{pythonServer.py}: webserver for running tests locally
djmoffat@1099 57 \item \texttt{pythonServer-legacy.py}: webserver with limited functionality (no automatic storing of output XML files)
djmoffat@1099 58 \item \texttt{save.php}: PHP script to store result XML files to web server\\
djmoffat@1099 59 \end{itemize}
djmoffat@1099 60 \textbf{Documentation (./docs/)}
djmoffat@1099 61 \begin{itemize}
djmoffat@1099 62 \item \href{http://c4dm.eecs.qmul.ac.uk/dmrn/events/dmrnp10/#posters}{DMRN+10}: PDF and \LaTeX source of poster for 10\textsuperscript{th} Digital Music Research Network One-Day workshop (``soft launch'')
djmoffat@1099 63 \item Instructions: PDF and \LaTeX source of these instructions
djmoffat@1099 64 \item Project Specification Document (\LaTeX/PDF)
djmoffat@1099 65 \item Results Specification Document (\LaTeX/PDF)
djmoffat@1099 66 \item SMC15: PDF and \LaTeX source of 12th Sound and Music Computing Conference paper \cite{waet}
djmoffat@1099 67 \item WAC2016: PDF and \LaTeX source of 2nd Web Audio Conference paper\\
djmoffat@1099 68 \end{itemize}
djmoffat@1099 69 \textbf{Example project (./example\_eval/)}
djmoffat@1099 70 \begin{itemize}
djmoffat@1099 71 \item An example of what the set up XML should look like, with example audio files 0.wav-10.wav which are short recordings at 44.1kHz, 16bit of a woman saying the corresponding number (useful for testing randomisation and general familiarisation with the interface).\\
djmoffat@1099 72 \end{itemize}
djmoffat@1099 73 \textbf{Interface files (./interfaces/}
djmoffat@1099 74 \begin{itemize}
djmoffat@1099 75 \item Each interface class has a JavaScript file and an optional CSS style file. These are loaded as needed.
djmoffat@1099 76 \end{itemize}
djmoffat@1099 77
djmoffat@1099 78 \textbf{Output files (./saves/)}
djmoffat@1099 79 \begin{itemize}
djmoffat@1099 80 \item The output XML files of tests will be stored here by default by the \texttt{pythonServer.py} script.\\
djmoffat@1099 81 \end{itemize}
djmoffat@1099 82 \textbf{Auxiliary scripts (./scripts/)}
djmoffat@1099 83 \begin{itemize}
djmoffat@1099 84 \item Helpful Python scripts for extraction and visualisation of data.\\
djmoffat@1099 85 \end{itemize}
djmoffat@1099 86 \textbf{Test creation tool (./test\_create/)}
djmoffat@1099 87 \begin{itemize}
djmoffat@1099 88 \item Webpage for easily setting up your own test without having to delve into the XML.\\
djmoffat@1099 89 \end{itemize}
djmoffat@1099 90
djmoffat@1099 91 \subsection{Compatibility}
djmoffat@1099 92 As Microsoft Internet Explorer doesn't support the Web Audio API\footnote{\url{http://caniuse.com/\#feat=audio-api}}, you will need another browser like Google Chrome, Safari or Firefox (all three are tested and confirmed to work).
djmoffat@1099 93
djmoffat@1099 94 Firefox does not currently support other bit depths than 8 or 16 bit for PCM wave files. In the future, this will throw a warning message to tell the user that their content is being quantised automatically. %Nick? Right? To be removed if and when actually implemented
djmoffat@1099 95
djmoffat@1099 96 The tool is platform-independent and works in any browser that supports the Web Audio API. It does not require any specific, proprietary software. However, in case the tool is hosted locally (i.e. you are not hosting it on an actual webserver) you will need Python (2.7), which is a free programming language - see the next paragraph.
djmoffat@1099 97
djmoffat@1099 98 \clearpage
djmoffat@1099 99
djmoffat@1099 100
djmoffat@1099 101 \section{Test setup}
djmoffat@1099 102
djmoffat@1099 103 \subsection{Sample rate}
djmoffat@1099 104 Depending on how the experiment is set up, audio is resampled automatically (the Web Audio default) or the sample rate is enforced. In the latter case, you will need to make sure that the sample rate of the system is equal to the sample rate of these audio files. For this reason, all audio files in the experiment will have to have the same sample rate.
djmoffat@1099 105
djmoffat@1099 106 Always make sure that all other digital equipment in the playback chain (clock, audio interface, digital-to-analog converter, ...) is set to this same sample rate.
djmoffat@1099 107
djmoffat@1099 108 Note that upon changing the sampling rate, the browser will have to be restarted for the change to take effect.
djmoffat@1099 109
djmoffat@1099 110 \subsubsection{Mac OS X}
djmoffat@1099 111 To change the sample rate in Mac OS X, go to \textbf{Applications/Utilities/Audio MIDI Setup} or find this application with Spotlight (see Figure \ref{fig:audiomidisetup}). Then select the output of the audio interface you are using and change the `Format' to the appropriate number. Also make sure the bit depth and channel count are as desired.
djmoffat@1099 112 If you are using an external audio interface, you may have to go to the preference pane of that device to change the sample rate.
djmoffat@1099 113
djmoffat@1099 114 Also make sure left and right channel gains are equal, as some applications alter this without changing it back, leading to a predominantly louder left or right channel. See Figure \ref{fig:audiomidisetup} for an example where the channel gains are different.
djmoffat@1099 115
djmoffat@1099 116 \begin{figure}[tb]
djmoffat@1099 117 \centering
djmoffat@1099 118 \includegraphics[width=.65\textwidth]{img/audiomidisetup.png}
djmoffat@1099 119 \caption{The Audio MIDI Setup window in Mac OS X}
djmoffat@1099 120 \label{fig:audiomidisetup}
djmoffat@1099 121 \end{figure}
djmoffat@1099 122
djmoffat@1099 123 \subsubsection{Windows}
djmoffat@1099 124 To change the sample rate in Windows, right-click on the speaker icon in the lower-right corner of your desktop and choose `Playback devices'. Right-click the appropriate playback device and click `Properties'. Click the `Advanced' tab and verify or change the sample rate under `Default Format'. % NEEDS CONFIRMATION
djmoffat@1099 125 If you are using an external audio interface, you may have to go to the preference pane of that device to change the sample rate.
djmoffat@1099 126
djmoffat@1099 127 \subsection{Local test}
djmoffat@1099 128 If the test is hosted locally, you will need to run the local webserver provided with this tool.
djmoffat@1099 129
djmoffat@1099 130 \subsubsection{Mac OS X \& Linux}
djmoffat@1099 131
djmoffat@1099 132 On Mac OS X, Python comes preinstalled, as with most Unix/Linux distributions.
djmoffat@1099 133
djmoffat@1099 134 Open the Terminal (find it in \textbf{Applications/Terminal} or via Spotlight), and go to the folder you downloaded. To do this, type \texttt{cd [folder]}, where \texttt{[folder]} is the folder where to find the \texttt{pythonServer.py} script you downloaded. For instance, if the location is \texttt{/Users/John/Documents/test/}, then type
djmoffat@1099 135
djmoffat@1099 136 \texttt{cd /Users/John/Documents/test/}
djmoffat@1099 137
djmoffat@1099 138 Then hit enter and run the Python script by typing
djmoffat@1099 139
djmoffat@1099 140 \texttt{python pythonServer.py}
djmoffat@1099 141
djmoffat@1099 142 and hit enter again. See also Figure \ref{fig:terminal}.
djmoffat@1099 143
djmoffat@1099 144 \begin{figure}[htbp]
djmoffat@1099 145 \begin{center}
djmoffat@1099 146 \includegraphics[width=.75\textwidth]{pythonServer.png}
djmoffat@1099 147 \caption{Mac OS X: The Terminal window after going to the right folder (\texttt{cd [folder\_path]}) and running \texttt{pythonServer.py}.}
djmoffat@1099 148 \label{fig:terminal}
djmoffat@1099 149 \end{center}
djmoffat@1099 150 \end{figure}
djmoffat@1099 151
djmoffat@1099 152 Alternatively, you can simply type \texttt{python} (follwed by a space) and drag the file into the Terminal window from Finder. % DOESN'T WORK YET
djmoffat@1099 153
djmoffat@1099 154 You can leave this running throughout the different experiments (i.e. leave the Terminal open). Once running the terminal will report the current URL to type into your browser to initiate the test, usually this is http://localhost:8000/.
djmoffat@1099 155
djmoffat@1099 156 To start the test, open the browser and type
djmoffat@1099 157
djmoffat@1099 158 \texttt{localhost:8000}
djmoffat@1099 159
djmoffat@1099 160 and hit enter. The test should start (see Figure \ref{fig:test}).
djmoffat@1099 161
djmoffat@1099 162 To quit the server, either close the terminal window or press Ctrl+C on your keyboard to forcibly shut the server.
djmoffat@1099 163
djmoffat@1099 164 \subsubsection{Windows}
djmoffat@1099 165
djmoffat@1099 166 On Windows, Python 2.7 is not generally preinstalled and therefore has to be downloaded\footnote{\url{https://www.python.org/downloads/windows/}} and installed to be able to run scripts such as the local webserver, necessary if the tool is hosted locally.
djmoffat@1099 167
djmoffat@1099 168 Simply double click the Python script \texttt{pythonServer.py} in the folder you downloaded.
djmoffat@1099 169
djmoffat@1099 170 You may see a warning like the one in Figure \ref{fig:warning}. Click `Allow access'.
djmoffat@1099 171
djmoffat@1099 172 \begin{figure}[htbp]
djmoffat@1099 173 \begin{center}
djmoffat@1099 174 \includegraphics[width=.6\textwidth]{warning.png}
djmoffat@1099 175 \caption{Windows: Potential warning message when executing \texttt{pythonServer.py}.}
djmoffat@1099 176 \label{fig:warning}
djmoffat@1099 177 \end{center}
djmoffat@1099 178 \end{figure}
djmoffat@1099 179
djmoffat@1099 180 The process should now start, in the Command prompt that opens - see Figure \ref{fig:python}.
djmoffat@1099 181
djmoffat@1099 182 \begin{figure}[htbp]
djmoffat@1099 183 \begin{center}
djmoffat@1099 184 \includegraphics[width=.75\textwidth]{python.png}
djmoffat@1099 185 \caption{Windows: The Command Prompt after running \texttt{pythonServer.py} and opening the corresponding website.}
djmoffat@1099 186 \label{fig:python}
djmoffat@1099 187 \end{center}
djmoffat@1099 188 \end{figure}
djmoffat@1099 189
djmoffat@1099 190 You can leave this running throughout the different experiments (i.e. leave the Command Prompt open).
djmoffat@1099 191
djmoffat@1099 192 To start the test, open the browser and type
djmoffat@1099 193
djmoffat@1099 194 \texttt{localhost:8000}
djmoffat@1099 195
djmoffat@1099 196 and hit enter. The test should start (see Figure \ref{fig:test}).
djmoffat@1099 197
djmoffat@1099 198 \begin{figure}[htb]
djmoffat@1099 199 \begin{center}
djmoffat@1099 200 \includegraphics[width=.8\textwidth]{test.png}
djmoffat@1099 201 \caption{The start of the test in Google Chrome on Windows 7.}
djmoffat@1099 202 \label{fig:test}
djmoffat@1099 203 \end{center}
djmoffat@1099 204 \end{figure}
djmoffat@1099 205
djmoffat@1099 206 If at any point in the test the participant reports weird behaviour or an error of some kind, or the test needs to be interrupted, please notify the experimenter and/or refer to Section \ref{sec:troubleshooting}.
djmoffat@1099 207
djmoffat@1099 208 When the test is over (the subject should see a message to that effect, and click `Submit' one last time), the output XML file containing all collected data should have appeared in `saves/'. The names of these files are `test-0.xml', `test-1.xml', etc., in ascending order. The Terminal or Command prompt running the local web server will display the following file name. If such a file did not appear, please again refer to Section \ref{sec:troubleshooting}.
djmoffat@1099 209
djmoffat@1099 210 It is advised that you back up these results as often as possible, as a loss of this data means that the time and effort spent by the subject(s) has been in vain. Save the results to an external or network drive, and/or send them to the experimenter regularly.
djmoffat@1099 211
djmoffat@1099 212 To start the test again for a new participant, you do not need to close the browser or shut down the Terminal or Command Prompt. Simply refresh the page or go to \texttt{localhost:8000} again.
djmoffat@1099 213
djmoffat@1099 214
djmoffat@1099 215 \subsection{Remote test}
djmoffat@1099 216 Put all files on a web server which supports PHP. This allows the `save.php' script to store the XML result files in the `saves/' folder. If the web server is not able to store the XML file there at the end of the test, it will present the XML file locally to the user, as a `Save file' link.
djmoffat@1099 217
djmoffat@1099 218 Make sure the \texttt{projectReturn} attribute of the \texttt{setup} node is set to the \texttt{save.php} script.
djmoffat@1099 219
djmoffat@1099 220 Then, just go to the URL of the corresponding HTML file, e.g. \texttt{http://server.com/path/to/WAET/index.html?url=test/my-test.xml}. If storing on the server doesn't work at submission (e.g. if the \texttt{projectReturn} attribute isn't properly set), the result XML file will be presented to the subject on the client side, as a `Save file' link.
djmoffat@1099 221
djmoffat@1099 222 \subsection{Load a test / Multiple test documents}
djmoffat@1099 223 By default the index page will load a demo page of tests. To automatically load a test document, you need to append the location in the URL. If your URL is normally http://localhost:8000/index.html you would append the following: \texttt{?url=/path/to/your/test.xml}. Replace the fields with your actual path, the path is local to the running directory, so if you have your test in the directory \texttt{example\_eval} called \texttt{project.xml} you would append \texttt{?url=/example\_eval/project.xml}.
djmoffat@1099 224
djmoffat@1099 225 \clearpage
djmoffat@1099 226
djmoffat@1099 227 \section{Interfaces}
djmoffat@1099 228
djmoffat@1099 229 The Web Audio Evaluation Tool comes with a number of interface styles, each of which can be customised extensively, either by configuring them differently using the many optional features, or by modifying the JavaScript files.
djmoffat@1099 230
djmoffat@1099 231 To set the interface style for the whole test, set the attribute of the \texttt{setup} node to \texttt{interface="APE"}, where \texttt{"APE"} is one of the interface names below.
djmoffat@1099 232
djmoffat@1099 233 \subsection{APE}
djmoffat@1099 234 The APE interface is based on \cite{ape}, and consists of one or more axes, each corresponding with an attribute to be rated, on which markers are placed. As such, it is a multiple stimulus interface where (for each dimension or attribute) all elements are on one axis so that they can be maximally compared against each other, as opposed to rated individually or with regards to a single reference.
djmoffat@1099 235 It also contains an optional text box for each element, to allow for clarification by the subject, tagging, and so on.
djmoffat@1099 236
djmoffat@1099 237 \subsection{MUSHRA}
djmoffat@1099 238 This is a straightforward implementation of \cite{mushra}, especially common for the rating of audio quality, for instance for the evaluation of audio codecs. This can also operate any vertical slider style test and does not necessarily have to match the MUSHRA specification.
djmoffat@1099 239
djmoffat@1099 240 \subsection{AB}
djmoffat@1099 241 Performs a pairwise comparison, but supports ABX and n-way comparison (in the example we demonstrate it performing a 7-way comparison).
djmoffat@1099 242
djmoffat@1099 243 \subsection{Discrete/Likert}
djmoffat@1099 244 Each audio element is given a discrete set of values based on the number of slider options specified. For instance, Likert specifies 5 values and therefore each audio element must be one of those 5 values.
djmoffat@1099 245
djmoffat@1099 246 \subsection{ACR/CCR/DCR/horizontal}
djmoffat@1099 247 Creates the same interfaces as MUSHRA except the sliders are horizontal, not vertical.
djmoffat@1099 248
djmoffat@1099 249
djmoffat@1099 250 \clearpage
djmoffat@1099 251
djmoffat@1099 252 \section{Project XML}
djmoffat@1099 253
djmoffat@1099 254 Each test is defined by its project XML file, examples of these can be seen in the ./example\_eval/ directory.
djmoffat@1099 255
djmoffat@1099 256 In the XML there are several nodes which must be defined:
djmoffat@1099 257 \begin{itemize}
djmoffat@1099 258 \item \texttt{<waet>}: The root node.
djmoffat@1099 259 \item \texttt{<setup>}: The first child node, defines whole-test parameters
djmoffat@1099 260 \item \texttt{<page>}: Specifies a test page, attached \emph{after} the \texttt{<setup>}.
djmoffat@1099 261 \item \texttt{<audioelement>}: Specifies an audio element.
djmoffat@1099 262 \end{itemize}
djmoffat@1099 263
djmoffat@1099 264 The test uses XML validation, so the ordering of nodes is important to pass this validation. Some nodes also have specific attributes which must be set and may even have a certain format to apply them. This is done so error checking can be performed both quickly and succintly with easy to find errors before loading and running a test session.
djmoffat@1099 265
djmoffat@1099 266 Before identifying any features, this part will walk you through the available nodes, their function and their attributes.
djmoffat@1099 267
djmoffat@1099 268 \subsection{Root}
djmoffat@1099 269 The root node is \texttt{<waet>}, it must have the following attributes:
djmoffat@1099 270
djmoffat@1099 271 \texttt{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"}
djmoffat@1099 272
djmoffat@1099 273 \texttt{xsi:noNamespaceSchemaLocation="test-schema.xsd"}.
djmoffat@1099 274
djmoffat@1099 275 This will ensure it is checked against the XML schema for validation.
djmoffat@1099 276
djmoffat@1099 277 \subsection{Set up}
djmoffat@1099 278 The first child node, \texttt{<setup>} specifies any one time and global parameters. It takes the following attributes:
djmoffat@1099 279 \begin{itemize}
djmoffat@1099 280 \item \texttt{interface}: String, mandatory, specifies the interface to load
djmoffat@1099 281 \item \texttt{projectReturn}: URL, mandatory, specifies the return point. Can be a 3rd party server or the local server. Set to null to disable automatic saving. Specifying ``save.php'' will trigger the return if either the PHP or python servers are used. On error, it will always default to presenting the save on page.
djmoffat@1099 282 \item \texttt{randomiseOrder}: Boolean, optional, if true it will randomise the order of the test pages. Default is false.
djmoffat@1099 283 \item \texttt{testPages}: non-negative integer, optional. Specifies the number of test pages to actually test with. Combined with randomiseOrder being true will give a random set of test pages per participant from the given pool of \texttt{<page>} nodes. Specifying 0 disables this option, default is 0.
djmoffat@1099 284 \item \texttt{loudness}: non-positive integer, optional. Set the default LUFS target value. See \ref{sec:loudness} for more.
djmoffat@1099 285 \item \texttt{sampleRate}: positive integer, optional. If set, the sample rate reported by the Web Audio API must match this number. See \ref{sec:samplerate}.
djmoffat@1099 286 \end{itemize}
djmoffat@1099 287
djmoffat@1099 288 The \texttt{<setup>} node takes the following child nodes, note these must appear in this order:
djmoffat@1099 289 \begin{itemize}
djmoffat@1099 290 \item \texttt{<survey>}: Min of 0, max of 2 occurences. See \ref{sec:survey}
djmoffat@1099 291 \item \texttt{<metric>}: Must appear only once.
djmoffat@1099 292 \item \texttt{<interface>}: Must appear only once.
djmoffat@1099 293 \end{itemize}
djmoffat@1099 294
djmoffat@1099 295 \subsection{Page}
djmoffat@1099 296 \label{sec:page}
djmoffat@1099 297 The only other first level child nodes, these specify the test pages. It takes the following attributes:
djmoffat@1099 298 \begin{itemize}
djmoffat@1099 299 \item \texttt{id}: ID, mandatory. A string which must be unique across the entire XML. It is used to identify the page on test completion as pages are returned in the results in the order they appeared, not specified.
djmoffat@1099 300 \item \texttt{hostURL}: URL, mandatory. Used in conjuction with the \texttt{<audioelement>} url to specify where the audio files are located. For instance if all your files are in the directory \texttt{./test/} you can set this attribute to ``/test/'' and the \texttt{<audioelement>} url attribute only needs to file name. Set to ``'' if no hostURL prefix desired.
djmoffat@1099 301 \item \texttt{randomiseOrder}: Boolean, optional. If true the audio fragments are presented randomly rather than the order specified. See \ref{sec:randomisation}. Default is false.
djmoffat@1099 302 \item \texttt{repeatCount}: non-negative integer, optional. Specify the number of times to repeat the test page (re-present). Each presentation will appear as an individual page in the results. Default is 0.
djmoffat@1099 303 \item \texttt{loop}: Boolean, optional. If true, the audio elements will loop synchronously with each other. See \ref{sec:looping}. Default is false.
djmoffat@1099 304 \item \texttt{showElementComments}: Boolean, optional. If true then there will be a comment box on the test page for each audio element presented, see \ref{sec:commentboxes}.
djmoffat@1099 305 \item \texttt{loudness}: non-positive integer, optional. Set the LUFS target value for this page. Supersedes the \texttt{<setup>} loudness attribute for this page. See \ref{sec:loudness} for more.
djmoffat@1099 306 \end{itemize}
djmoffat@1099 307
djmoffat@1099 308 The \texttt{<page>} node takes the following child, nodes note these must appear in this order:
djmoffat@1099 309 \begin{itemize}
djmoffat@1099 310 \item \texttt{<title>}: Appear once or not at all. The text content of this node specifies the title of the test page, for instance \texttt{<title>John Doe's Test</title>}
djmoffat@1099 311 \item \texttt{<commentboxprefix}: Appear once or not at all. The text content specifies the prefix of the comment boxes, see \ref{sec:commentboxes}.
djmoffat@1099 312 \item \texttt{<interface>}: Must appear only once.
djmoffat@1099 313 \item \texttt{<audioelement>}: Minimum of one. Specifies an audio element, see \ref{sec:audioelement}.
djmoffat@1099 314 \item \texttt{<commentquestion>}: Min of 0, max unlimited occurences. See \ref{sec:commentboxes}.
djmoffat@1099 315 \item \texttt{<survey>}: Min of 0, max of 2 occurences. See \ref{sec:survey}
djmoffat@1099 316 \end{itemize}
djmoffat@1099 317
djmoffat@1099 318 \subsection{Survey}
djmoffat@1099 319 \label{sec:survey}
djmoffat@1099 320 These specify any survey items to be presented. The must be a maximum of two of these per \texttt{<setup>} and \texttt{<page>} nodes. These have one attribute, location, which must be set to one of the following: before, pre, after or post. In this case before == pre and after == post. This specifies where the survey must appear before or after the node it is associated with. When a child of \texttt{<setup>} then pre/before will be shown before the first test page and after/post shown after completing the last test page. When a child of \texttt{<page>} then pre/before is before the test commences and after/post is once the test has been submitted.
djmoffat@1099 321
djmoffat@1099 322 The survey node takes as its only set of childs the \texttt{<surveyentry>} node of which there can be any number.
djmoffat@1099 323
djmoffat@1099 324 \subsubsection{Survey Entry}
djmoffat@1099 325 These nodes have the following attributes, which vary depending on the survey type wanted:
djmoffat@1099 326 \begin{itemize}
djmoffat@1099 327 \item \texttt{id}: ID, mandatory. Must be unique across the entire XML, used to identify the response in the results.
djmoffat@1099 328 \item \texttt{type}: String, mandatory. Must be one of the following: statement, question, checkbox, radio or number. This defines the type to show.
djmoffat@1099 329 \item \texttt{mandatory}: Boolean, optional. Defines if the survey must have a response or not. Does not apply to statements. Default is false.
djmoffat@1099 330 \item \texttt{min}: Number, optional. Only applies when \texttt{type="number"}, the minimum valid response.
djmoffat@1099 331 \item \texttt{max}: Number, optional. Only applies when \texttt{type="number"}, the maximum valid response.
djmoffat@1099 332 \item \texttt{boxsize}: String, optional. Only applies when \texttt{type="question"} and must be one of the following: normal (default), small, large or huge.
djmoffat@1099 333 \end{itemize}
djmoffat@1099 334
djmoffat@1099 335 The nodes have the following children, which vary depending on the survey type wanted.
djmoffat@1099 336 \begin{itemize}
djmoffat@1099 337 \item \texttt{<statement>}: Must appear only once. Its text content specifies the text to appear as the statement or question for the user to respond to.
djmoffat@1099 338 \item \texttt{<option>}: Only valid if the parent node has the attribute \texttt{type} set to checkbox or radio. Has attribute \texttt{name} to identify the selected option in the results. The text content is the text to show next to the radio/checkbox.
djmoffat@1099 339 \end{itemize}
djmoffat@1099 340
djmoffat@1099 341 \subsection{Interface}
djmoffat@1099 342 This node specifies any interface specific options and test parameters. It has an optional \texttt{name} attribute used to set the axis name (where applicable), such as the multi-axis APE interface. Specifying multiple interface nodes in a \texttt{<page>} node will trigger multiple axis where applicable, otherwise only the \emph{first node} will be used and the rest ignored.
djmoffat@1099 343
djmoffat@1099 344 The node has the following children, note the order these must appear in is as follows:
djmoffat@1099 345 \begin{itemize}
djmoffat@1099 346 \item \texttt{title}: Min 0, max 1 occurence. The text content specifies the name of the axis as shown to the user.
djmoffat@1099 347 \item \texttt{interfaceoption}: Min 0, max unbounded. Specifies the interface options. See \ref{sec:interfaceoption}.
djmoffat@1099 348 \item \texttt{scales}: Min 0, max 1 occurence. Contains \texttt{<scalelable>} nodes which define the displayed scales. See \ref{sec:scales}.
djmoffat@1099 349 \end{itemize}
djmoffat@1099 350
djmoffat@1099 351 \subsection{Audio Element}
djmoffat@1099 352 \label{sec:audioelement}
djmoffat@1099 353 Appear as children of the \texttt{page} node. Each of these specify an individual interface fragment to display. Multiple fragments can reference the same file (allowing for repetition with different parameters or blind-doubles). The node has the following attributes:
djmoffat@1099 354 \begin{itemize}
djmoffat@1099 355 \item \texttt{id}: ID, mandatory. Must be unique across the test page. Used to identify the specific fragment in the results.
djmoffat@1099 356 \item \texttt{url}: URL, mandatory. Used with the parent \texttt{page} nodes' \texttt{hostURL} attribute to get the full url of the audio file to load.
djmoffat@1099 357 \item \texttt{gain}: Float, optional. Specify the gain in decibels to apply to the node after loudness normalisation. Default is 0.
djmoffat@1099 358 \item \texttt{type}: String, optional. Must be one of the following: normal (default when not specified), anchor, reference or outside-reference. Normal, anchor and reference are presented as normal, outside-reference presents the node as a separate interface option.
djmoffat@1099 359 \item \texttt{marker}: Integer between 0 and 100, optional. Only used when \texttt{type="anchor"|"reference"}. See \ref{sec:referencesandanchors}.
djmoffat@1099 360 \end{itemize}
djmoffat@1099 361
djmoffat@1099 362
djmoffat@1099 363 \section{Features}
djmoffat@1099 364
djmoffat@1099 365 This section covers the different features implemented in the Web Audio Evaluation Tool, how to use them, and what to know about them.
djmoffat@1099 366
djmoffat@1099 367 Unless otherwise specified, \emph{each} feature described here is optional, i.e. it can be enabled or disabled and adjusted to some extent.
djmoffat@1099 368
djmoffat@1099 369 As the example project showcases (nearly) all of these features, please refer to its configuration XML document for a demonstration of how to enable and adjust them.
djmoffat@1099 370
djmoffat@1099 371 \subsection{Interface options}
djmoffat@1099 372 The interface node has children of interface options which are used to specify modifications to the test environment. These are divided into two catagories: check and show. Check are used to specify conditions which must be met before a page can be completed, these include checking all fragments have been played or checking all fragments have a comment and so on. Show is used to show an optional on page element or control, such as the playhead or master volume.
djmoffat@1099 373
djmoffat@1099 374 Check items have the attribute ``type'' set to ``check''. The following list gives the string to give the ``name'' attribute along with a description of the check.
djmoffat@1099 375 \begin{itemize}
djmoffat@1099 376 \item \texttt{fragmentPlayed}: Checks that all fragments have been at least partially played
djmoffat@1099 377 \item \texttt{fragmentFullPlayback}: Checks that all fragments have been fully played. \emph{NOTE:} This will always clear if the page is looping as it is not possible to know every sample has been played.
djmoffat@1099 378 \item \texttt{fragmentMoved}: Checks that all fragments have been moved. This is interface dependent, for instance on AB this will always clear as there is no movement.
djmoffat@1099 379 \item \texttt{fragmentComments}: Cheks that all fragments have a comment. Will clear if there are no on page comments but with a console warning.
djmoffat@1099 380 \item \texttt{scalerange}: Has two extra attributes ``min'' and ``max''. Checks that at least one element is below the min value and one element is above the max value.
djmoffat@1099 381 \end{itemize}
djmoffat@1099 382 % QUANTISATION OF THE SCALE: to be implemented?
djmoffat@1099 383
djmoffat@1099 384 Show items have the attribute ``type'' set to ``show''. The following list gives the string to give the ``name'' attribute along with a description.
djmoffat@1099 385 \begin{itemize}
djmoffat@1099 386 \item \texttt{playhead}: Shows the playhead to the end user indicating where in the file they are currently listening
djmoffat@1099 387 \item \texttt{page-count}: Shows the current test page number and the total number of test pages.
djmoffat@1099 388 \item \texttt{volume}: Shows a master volume control to the user to manipulate the output gain of the page. This is tracked.
djmoffat@1099 389 \end{itemize}
djmoffat@1099 390
djmoffat@1099 391 \subsubsection{Multiple scales}
djmoffat@1099 392 In the case of multiple rating scales, e.g. when the stimuli are to be rated in terms of attributes `timbre' and `spatial impression', multiple interface nodes will have to be added, each specifying the title and annotations.
djmoffat@1099 393
djmoffat@1099 394 This is where the \texttt{interface}'s \texttt{name} attribute is particularly important: use this to retrieve the rating values, comments and metrics associated with the specified interface.
djmoffat@1099 395 If none is given, you can still use the automatically given \texttt{interface-id}, which is the interface number starting with 0 and corresponding to the order in which the rating scales appear.
djmoffat@1099 396
djmoffat@1099 397 \subsection{Randomisation}
djmoffat@1099 398 \label{sec:randomisation}
djmoffat@1099 399 [WORK IN PROGRESS]
djmoffat@1099 400
djmoffat@1099 401 \subsubsection{Randomisation of configuration XML files}
djmoffat@1099 402 The python server has a special function to automatically cycle through a list of test pages. Instead of directly requesting an XML, simply setting the url item in the browser URL to \texttt{pseudo.xml} will cycle through a list of XMLs. These XMLs must be in the local directory called \texttt{./pseudo/}.
djmoffat@1099 403 % how to
djmoffat@1099 404 % explain how this is implemented in the pythonServer
djmoffat@1099 405 %Nick? already implemented in the PHP?
djmoffat@1099 406 % Needs to be implemented in PHP and automated better, will complete soon
djmoffat@1099 407
djmoffat@1099 408
djmoffat@1099 409 \subsubsection{Randomsation of page order}
djmoffat@1099 410 The page order randomisation is set by the \texttt{<setup>} node attribute \texttt{randomise-order}, for example \texttt{<setup ... randomise-order="true">...</setup>} will randomise the test page order. When not set, the default is to \textbf{not} randomise the test page order.
djmoffat@1099 411
djmoffat@1099 412 \subsubsection{Randomisation of axis order}
djmoffat@1099 413
djmoffat@1099 414 \subsubsection{Randomisation of fragment order}
djmoffat@1099 415 The audio fragment randomisation is set by the \texttt{<audioholder>} node attribute \texttt{randomise-order}, for example \texttt{<audioholder ... randomise-order="true">...</audioholder>} will randomise the test page order. When not set, the default is to \textbf{not} randomise the test page order.
djmoffat@1099 416
djmoffat@1099 417 \subsubsection{Randomisation of initial slider position}
djmoffat@1099 418 By default slider values are randomised on start. The MUSHRA interface supports setting the initial values of all sliders throught the \texttt{<audioholder>} attribute \texttt{initial-position}. This takes an integer between 0 and 100 to signify the slider position.
djmoffat@1099 419 % /subsubsection{Randomisation of survey question order}
djmoffat@1099 420 % should be an attribute of the individual 'pretest' and 'posttest' elements
djmoffat@1099 421 % uncomment once we have it
djmoffat@1099 422
djmoffat@1099 423 \subsection{Looping}
djmoffat@1099 424 \label{sec:looping}
djmoffat@1099 425 Looping enables the fragments to loop until stopped by the user. Looping is synchronous so all fragments start at the same time on each loop.
djmoffat@1099 426 Individual test pages can have their playback looped by the \texttt{<page>} attribute \texttt{loop} with a value of ``true'' or ``false''.
djmoffat@1099 427 If the fragments are not of equal length initially, they are padded with zeros so that they are equal length, to enable looping without the fragments going out of sync relative to each other.
djmoffat@1099 428
djmoffat@1099 429 Note that fragments cannot be played until all page fragments are loaded when in looped mode, as the engine needs to know the length of each fragment to calculate the padding.
djmoffat@1099 430
djmoffat@1099 431 \subsection{Sample rate}
djmoffat@1099 432 \label{sec:samplerate}
djmoffat@1099 433 If you require the test to be conducted at a certain sample rate (i.e. you do not tolerate resampling of the elements to correspond with the system's sample rate), add \texttt{sampleRate="96000"} - where ``96000'' can be any support sample rate (in Hz) - so that a warning message is shown alerting the subject that their system's sample rate is different from this enforced sample rate. This is checked immediately after parsing and stops the page loading any other elements if this check has failed.
djmoffat@1099 434
djmoffat@1099 435 \subsection{Metrics}
djmoffat@1099 436 The \texttt{Metric} node, which contains the metrics to be tracked during the complete test, is a child of the \texttt{setup} node, and it could look as follows.
djmoffat@1099 437
djmoffat@1099 438 \begin{lstlisting}
djmoffat@1099 439 <Metric>
djmoffat@1099 440 <metricEnable>testTimer</metricEnable>
djmoffat@1099 441 <metricEnable>elementTimer</metricEnable>
djmoffat@1099 442 <metricEnable>elementInitialPosition</metricEnable>
djmoffat@1099 443 <metricEnable>elementTracker</metricEnable>
djmoffat@1099 444 <metricEnable>elementFlagListenedTo</metricEnable>
djmoffat@1099 445 <metricEnable>elementFlagMoved</metricEnable>
djmoffat@1099 446 <metricEnable>elementListenTracker</metricEnable>
djmoffat@1099 447 </Metric>
djmoffat@1099 448 \end{lstlisting}
djmoffat@1099 449
djmoffat@1099 450 When in doubt, err on the inclusive side, as one never knows which information is needed in the future. Most of these metrics are necessary for post-processing scripts such as timeline\_view\_movement.py. % Brecht: should perhaps list somewhere what metrics are required for which analysis scripts.
djmoffat@1099 451
djmoffat@1099 452 \subsubsection{Time test duration}
djmoffat@1099 453 \texttt{testTimer}\\
djmoffat@1099 454 One per test page. Presents the total test time from the first playback on the test page to the submission of the test page (exculding test time of the pre-/post- test surveys). This is presented in the results as \texttt{<metricresult id="testTime"> 8.60299319727892 </metricresult>}. The time is in seconds.
djmoffat@1099 455
djmoffat@1099 456 \subsubsection{Time fragment playback}
djmoffat@1099 457 \texttt{elementTimer}\\
djmoffat@1099 458 One per audio fragment per test page. This totals up the entire time the audio fragment has been listened to in this test and presented \texttt{<metricresult name="enableElementTimer"> 1.0042630385487428 </metricresult>}. The time is in seconds.
djmoffat@1099 459
djmoffat@1099 460 \subsubsection{Initial positions}
djmoffat@1099 461 \texttt{elementInitialPosition}\\
djmoffat@1099 462 One per audio fragment per test page. Tracks the initial position of the sliders, especially relevant when these are randomised. Example result \texttt{<metricresult name="elementInitialPosition"> 0.8395522388059702 </metricresult>}.
djmoffat@1099 463
djmoffat@1099 464 \subsubsection{Track movements}
djmoffat@1099 465 \texttt{elementTracker}\\
djmoffat@1099 466 One per audio fragment per test page. Tracks the movement of each interface object. Each movement event has the time it occured at and the new value.
djmoffat@1099 467 \subsubsection{Which fragments listened to}
djmoffat@1099 468 \texttt{elementFlagListenedTo}\\
djmoffat@1099 469 One per audio fragment per test page. Boolean response, set to true if listened to.
djmoffat@1099 470 \subsubsection{Which fragments moved}
djmoffat@1099 471 \texttt{elementFlagMoved}\\
djmoffat@1099 472 One per audio fragment per test page. Binary check whether or not a the marker corresponding with a particular fragment was moved at all throughout the experiment.
djmoffat@1099 473
djmoffat@1099 474 \subsubsection{elementListenTracker}
djmoffat@1099 475 \texttt{elementListenTracker}\\
djmoffat@1099 476 One per audio fragment per test page. Tracks the playback events of each audio element pairing both the time in the test when playback started and when it stopped, it also gives the buffertime positions.
djmoffat@1099 477
djmoffat@1099 478 \subsection{References and anchors}
djmoffat@1099 479 \label{sec:referencesandanchors}
djmoffat@1099 480 The audio elements, \texttt{<audioelement>} have the attribute \texttt{type}, which defaults to normal. Setting this to one of the following will have the following effects.
djmoffat@1099 481 \subsubsection{Outside Reference}
djmoffat@1099 482 Set type to `outside-reference'. This will place the object in a separate playback element clearly labelled as an outside reference. This is exempt of any movement checks but will still be included in any listening checks.
djmoffat@1099 483 \subsubsection{Hidden reference}
djmoffat@1099 484 Set type to `reference'. The element will still be randomised as normal (if selected) and presented to the user. However the element will have the `reference' type in the results to quickly find it. The reference can be forced to be below a value before completing the test page by setting the attribute `marker' to be a value between 0 and 100 representing the integer value position it must be equal to or above.
djmoffat@1099 485 \subsubsection{Hidden anchor}
djmoffat@1099 486 Set type to `anchor'. The element will still be randomised as normal (if selected) and presented to the user. However the element will have the `anchor' type in the results to quickly find it. The anchor can be forced to be below a value before completing the test page by setting the attribute `marker' to be a value between 0 and 100 representing the integer value position it must be equal to or below.
djmoffat@1099 487
djmoffat@1099 488 \subsection{Checks}
djmoffat@1099 489 \label{sec:checks}
djmoffat@1099 490
djmoffat@1099 491 %blabla
djmoffat@1099 492 These checks are enabled in the \texttt{interface} node, which is a child of the \texttt{setup} node.
djmoffat@1099 493 \subsubsection{Playback checks}
djmoffat@1099 494 % what it does/is
djmoffat@1099 495 Enforce playing each sample at least once, for at least a little bit (e.g. this test is satisfied even if you only play a tiny portion of the file), by alerting the user to which samples have not been played upon clicking `Submit'. When enabled, one cannot proceed to the next page, answer a survey question, or finish the test, before clicking each sample at least once.
djmoffat@1099 496 % how to enable/disable
djmoffat@1099 497
djmoffat@1099 498 Alternatively, one can check whether the \emph{entire} fragment was listened to at least once.
djmoffat@1099 499 % how to enable
djmoffat@1099 500
djmoffat@1099 501 Add \texttt{<check name="fragmentPlayed"/>} to the \texttt{interface} node.
djmoffat@1099 502
djmoffat@1099 503
djmoffat@1099 504 \subsubsection{Movement check}
djmoffat@1099 505 Enforce moving each sample at least once, for at least a little bit (e.g. this test is satisfied even if you only play a tiny portion of the file), by alerting the user to which samples have not been played upon clicking `Submit'. When enabled, one cannot proceed to the next page, answer a survey question, or finish the test, before clicking each sample at least once.
djmoffat@1099 506 If there are several axes, the warning will specify which samples have to be moved on which axis.
djmoffat@1099 507
djmoffat@1099 508 Add \texttt{<check name="fragmentMoved"/>} to the \texttt{interface} node.
djmoffat@1099 509
djmoffat@1099 510 \subsubsection{Comment check}
djmoffat@1099 511 % How to enable/disable?
djmoffat@1099 512
djmoffat@1099 513 Enforce commenting, by alerting the user to which samples have not been commented on upon clicking `Submit'. When enabled, one cannot proceed to the next page, answer a survey question, or finish the test, before putting at least one character in each comment box.
djmoffat@1099 514
djmoffat@1099 515 Note that this does not apply to any extra (text, radio button, checkbox) elements, unless these have the `mandatory' option enabled. %Nick? is this extra 'mandatory' option implemented?
djmoffat@1099 516
djmoffat@1099 517 Add \texttt{<check name="fragmentComments"/>} to the \texttt{interface} node.
djmoffat@1099 518
djmoffat@1099 519 %ADD: how to add a custom comment box
djmoffat@1099 520
djmoffat@1099 521 \subsubsection{Scale use check}
djmoffat@1099 522 It is possible to enforce a certain usage of the scale, meaning that at least one slider needs to be below and/or above a certain percentage of the slider.
djmoffat@1099 523
djmoffat@1099 524 Add \texttt{<check name="scalerange" min="25" max="75"/>} to the \texttt{interface} node.
djmoffat@1099 525
djmoffat@1099 526 \subsubsection{Note on the use of multiple rating axes}
djmoffat@1099 527 I.e. what if more than one axis? How to specify which axis the checks relate to? %Nick? to add?
djmoffat@1099 528
djmoffat@1099 529 \subsection{Platform information}
djmoffat@1099 530 % what does it do, what does it look like
djmoffat@1099 531 % limitations?
djmoffat@1099 532 For troubleshooting and usage statistics purposes, information about the browser and the operating system is logged in the results XML file. This is especially useful in the case of remote tests, when it is not certain which operating system, browser and/or browser were used. Note that this information is not always available and/or accurate, e.g. when the subject has taken steps to be more anonymous, so it should be treated as a guide only.
djmoffat@1099 533
djmoffat@1099 534 Example:
djmoffat@1099 535 \begin{lstlisting}
djmoffat@1099 536 <navigator>
djmoffat@1099 537 <platform>MacIntel</platform>
djmoffat@1099 538 <vendor>Google Inc.</vendor>
djmoffat@1099 539 <uagent>Mozilla/5.0 ... </uagent>
djmoffat@1099 540 <screen innerHeight="1900px" innerWidth="1920px"/>
djmoffat@1099 541 </navigator>
djmoffat@1099 542 \end{lstlisting}
djmoffat@1099 543
djmoffat@1099 544 \subsection{Gain}
djmoffat@1099 545 It is possible to set the gain (in decibel) applied to the different audioelements, as an attribute of the \texttt{audioelement} nodes in the configuration XML file:
djmoffat@1099 546
djmoffat@1099 547 \texttt{<audioElements url="sample-01.wav" gain="-6" id="sample01quieter" />}\\
djmoffat@1099 548 Please note, there are no checks on this to detect if accidentaly typed in linear. This gain is applied \emph{after} any loudness normalisation.
djmoffat@1099 549
djmoffat@1099 550 \subsection{Loudness}
djmoffat@1099 551 \label{sec:loudness}
djmoffat@1099 552 % automatic loudness equalisation
djmoffat@1099 553 % guide to loudness.js
djmoffat@1099 554 Each audio fragment on loading has its loudness calculated. The tool uses the EBU R 128 recommendation following the ITU-R BS.1770-4 loduness calculations to return the integreated LUFS loudness. The attribute \texttt{loudness} will set the loudness from the scope it is applied in. Applying it in the \texttt{<setup>} node will set the loudness for all test pages. Applying it in the \texttt{<page>} node will set the loudness for that page. Applying it in the \texttt{<audioelement>} node will set the loudness for that fragment. The scope is set locally, so if there is a loudness on both the \texttt{<page>} and \texttt{<setup>} nodes, that test page will take the value associated with the \texttt{<page>}. The loudness attribute is set in LUFS
djmoffat@1099 555
djmoffat@1099 556 \subsection{Comment Boxes}
djmoffat@1099 557 \label{sec:commentboxes}
djmoffat@1099 558 There are two types of comment boxes which can be presented, those linked to the audio fragments on the page and those which pose a general question. The audio fragment boxes are shown by setting the attribute \texttt{showElementComments} to true of the page in question. This will then show a comment box below the main interface for every fragment on the page. There is some customisation around the text that accompanies the box, by default the text will read ``Comment on fragment'' followed by the fragment identifier (the number / letter shown by the interface). This `prefix' can be modified using the page node \texttt{<commentboxprefix>}, see \ref{sec:page} for where to place this node in the document. The comment box prefix node takes no attribute and the text contained by the node represents to the prefix. For instance if we have a node \texttt{<commentboxprefix> Describe fragment </commentboxprefix>}, then the interface will show ``Describe fragment'' followed by the identifier.
djmoffat@1099 559
djmoffat@1099 560 The second type of comment box is slightly more complex because it can handle different types of response data. These are called comment questions because they are located in the comment section of the test but pose a specific question.
djmoffat@1099 561
djmoffat@1099 562 \clearpage
djmoffat@1099 563
djmoffat@1099 564
djmoffat@1099 565 \section{Using the test create tool}
djmoffat@1099 566 We provide a test creation tool, available in the directory test\_create. This tool is a self-contained web page, so doubling clicking will launch the page in your system default browser.
djmoffat@1099 567
djmoffat@1099 568 The test creation tool can help you build a simple test very quickly. By simply selecting your interface and clicking check-boxes you can build a test in minutes.
djmoffat@1099 569
djmoffat@1099 570 Include audio by dragging and dropping the stimuli you wish to include.
djmoffat@1099 571
djmoffat@1099 572 The tool examines your XML before exporting to ensure you do not export an invalid XML structure which would crash the test.
djmoffat@1099 573
djmoffat@1099 574 This guide will help you to construct your own interface on top of the WAET (Web Audio Evaluation Tool) engine. The WAET engine resides in the core.js file, this contains prototype objects to handle most of the test creation, operation and data collection. The interface simply has to link into this at the correct points.
djmoffat@1099 575
djmoffat@1099 576 \section{Building your own interface}
djmoffat@1099 577
djmoffat@1099 578 \subsection{Nodes to familiarise}
djmoffat@1099 579 Core.js handles several very important nodes which you should become familiar with. The first is the Audio Engine, initialised and stored in variable `AudioEngineContext'. This handles the playback of the web audio nodes as well as storing the `AudioObjects'. The `AudioObjects' are custom nodes which hold the audio fragments for playback. These nodes also have a link to two interface objects, the comment box if enabled and the interface providing the ranking. On creation of an `AudioObject' the interface link will be nulled, it is up to the interface to link these correctly.
djmoffat@1099 580
djmoffat@1099 581 The specification document will be decoded and parsed into an object called `specification'. This will hold all of the specifications various nodes. The test pages and any pre/post test objects are processed by a test state which will proceed through the test when called to by the interface. Any checks (such as playback or movement checks) are to be completed by the interface before instructing the test state to proceed. The test state will call the interface on each page load with the page specification node.
djmoffat@1099 582
djmoffat@1099 583 \subsection{Modifying \texttt{core.js}}
djmoffat@1099 584 Whilst there is very little code actually needed, you do need to instruct core.js to load your interface file when called for from a specification node. There is a function called `loadProjectSpecCallback' which handles the decoding of the specification and setting any external items (such as metric collection). At the very end of this function there is an if statement, add to this list with your interface string to link to the source. There is an example in there for both the APE and MUSHRA tests already included. Note: Any updates to core.js in future work will most likely overwrite your changes to this file, so remember to check your interface is still here after any update that interferes with core.js.
djmoffat@1099 585 Any further files can be loaded here as well, such as css styling files. jQuery is already included.
djmoffat@1099 586
djmoffat@1099 587 \subsection{Building the Interface}
djmoffat@1099 588 Your interface file will get loaded automatically when the `interface' attribute of the setup node matches the string in the `loadProjectSpecCallback' function. The following functions must be defined in your interface file.
djmoffat@1099 589 \begin{itemize}
djmoffat@1099 590 \item \texttt{loadInterface} - Called once when the document is parsed. This creates any necessary bindings, such as to the metric collection classes and any check commands. Here you can also start the structure for your test such as placing in any common nodes (such as the title and empty divs to drop content into later).
djmoffat@1099 591 \item \texttt{loadTest(audioHolderObject)} - Called for each page load. The audioHolderObject contains a specification node holding effectively one of the audioHolder nodes.
djmoffat@1099 592 \item \texttt{resizeWindow(event)} - Handle for any window resizing. Simply scale your interface accordingly. This function must be here, but can me an empty function call.
djmoffat@1099 593 \end{itemize}
djmoffat@1099 594
djmoffat@1099 595 \subsubsection{loadInterface}
djmoffat@1099 596 This function is called by the interface once the document has been parsed since some browsers may parse files asynchronously. The best method is simply to put `loadInterface()' at the top of your interface file, therefore when the JavaScript engine is ready the function is called.
djmoffat@1099 597
djmoffat@1099 598 By default the HTML file has an element with id ``topLevelBody'' where you can build your interface. Make sure you blank the contents of that object. This function is the perfect time to build any fixed items, such as the page title, session titles, interface buttons (Start, Stop, Submit) and any holding and structure elements for later on.
djmoffat@1099 599
djmoffat@1099 600 At the end of the function, insert these two function calls: testState.initialise() and testState.advanceState();. This will actually begin the test sequence, including the pre-test options (if any are included in the specification document).
djmoffat@1099 601
djmoffat@1099 602 \subsubsection{loadTest(audioHolderObject)}
djmoffat@1099 603 This function is called on each new test page. It is this functions job to clear out the previous test and set up the new page. Use the function audioEngineContext.newTestPage(); to instruct the audio engine to prepare for a new page. ``audioEngineContext.audioObjects = [];'' will delete any audioObjects, interfaceContext.deleteCommentBoxes(); will delete any comment boxes and interfaceContext.deleteCommentQuestions(); will delete any extra comment boxes specified by commentQuestion nodes.
djmoffat@1099 604
djmoffat@1099 605 This function will need to instruct the audio engine to build each fragment. Just passing the constructor each element from the audioHolderObject will build the track, audioEngineContext.newTrack(element) (where element is the audioHolderObject audio element). This will return a reference to the constructed audioObject. Decoding of the audio will happen asynchronously.
djmoffat@1099 606
djmoffat@1099 607 You also need to link audioObject.interfaceDOM with your interface object for that audioObject. The interfaceDOM object has a few default methods. Firstly it must start disabled and become enabled once the audioObject has decoded the audio (function call: enable()). Next it must have a function exportXMLDOM(), this will return the xml node for your interface, however the default is for it to return a value node, with textContent equal to the normalised value. You can perform other functions, but our scripts may not work if something different is specified (as it will breach our results specifications). Finally it must also have a method getValue, which returns the normalised value.
djmoffat@1099 608
djmoffat@1099 609 It is also the job the interfaceDOM to call any metric collection functions necessary, however some functions may be better placed outside (for example, the APE interface uses drag and drop, therefore the best way was to call the metric functions from the dragEnd function, which is called when the interface object is dropped). Metrics based upon listening are handled by the audioObject. The interfaceDOM object must manage any movement metrics. For a list of valid metrics and their behaviours, look at the project specification document included in the repository/docs location. The same goes for any checks required when pressing the submit button, or any other method to proceed the test state.
djmoffat@1099 610
djmoffat@1099 611 \clearpage
djmoffat@1099 612 \section{Analysis and diagnostics}
djmoffat@1099 613 \subsection{In the browser}
djmoffat@1099 614 See `analysis.html' in the main folder: immediate visualisation of (by default) all results in the `saves/' folder.
djmoffat@1099 615
djmoffat@1099 616 \subsection{Python scripts}
djmoffat@1099 617 The package includes Python (2.7) scripts (in `scripts/') to extract ratings and comments, generate visualisations of ratings and timelines, and produce a fully fledged report.
djmoffat@1099 618
djmoffat@1099 619 Visualisation requires the free matplotlib toolbox (http://matplotlib.org), numpy and scipy.
djmoffat@1099 620 By default, the scripts can be run from the `scripts' folder, with the result files in the `saves' folder (the default location where result XMLs are stored). Each script takes the XML file folder as an argument, along with other arguments in some cases.
djmoffat@1099 621 Note: to avoid all kinds of problems, please avoid using spaces in file and folder names (this may work on some systems, but others don't like it).
djmoffat@1099 622
djmoffat@1099 623 \subsubsection{comment\_parser.py}
djmoffat@1099 624 Extracts comments from the output XML files corresponding with the different subjects found in `saves/'. It creates a folder per `audioholder'/page it finds, and stores a CSV file with comments for every `audioelement'/fragment within these respective `audioholders'/pages. In this CSV file, every line corresponds with a subject/output XML file. Depending on the settings, the first column containing the name of the corresponding XML file can be omitted (for anonymisation).
djmoffat@1099 625 Beware of Excel: sometimes the UTF-8 is not properly imported, leading to problems with special characters in the comments (particularly cumbersome for foreign languages).
djmoffat@1099 626
djmoffat@1099 627 \subsubsection{evaluation\_stats.py}
djmoffat@1099 628 Shows a few statistics of tests in the `saves/' folder so far, mainly for checking for errors. Shows the number of files that are there, the audioholder IDs that were tested (and how many of each separate ID), the duration of each page, the duration of each complete test, the average duration per page, and the average duration in function of the page number.
djmoffat@1099 629
djmoffat@1099 630 \subsubsection{generate\_report.py}
djmoffat@1099 631 Similar to `evaluation\_stats.py', but generates a PDF report based on the output files in the `saves/' folder - or any folder specified as command line argument. Uses pdflatex to write a LaTeX document, then convert to a PDF.
djmoffat@1099 632
djmoffat@1099 633 \subsubsection{score\_parser.py}
djmoffat@1099 634 Extracts rating values from the XML to CSV - necessary for running visualisation of ratings. Creates the folder `saves/ratings/' if not yet created, to which it writes a separate file for every `audioholder'/page in any of the output XMLs it finds in `saves/'. Within each file, rows represent different subjects (output XML file names) and columns represent different `audioelements'/fragments.
djmoffat@1099 635
djmoffat@1099 636 \subsubsection{score\_plot.py}
djmoffat@1099 637 Plots the ratings as stored in the CSVs created by score\_parser.py
djmoffat@1099 638 Depending on the settings, it displays and/or saves (in `saves/ratings/') a boxplot, confidence interval plot, scatter plot, or a combination of the aforementioned.
djmoffat@1099 639 Requires the free matplotlib library.
djmoffat@1099 640 At this point, more than one subjects are needed for this script to work.
djmoffat@1099 641
djmoffat@1099 642 \subsubsection{timeline\_view\_movement.py}
djmoffat@1099 643 Creates a timeline for every subject, for every `audioholder'/page, corresponding with any of the output XML files found in `saves/'. It shows the marker movements of the different fragments, along with when each fragment was played (red regions). Automatically takes fragment names, rating axis title, rating axis labels, and audioholder name from the XML file (if available).
djmoffat@1099 644
djmoffat@1099 645 \subsubsection{timeline\_view.py} % should be omitted or absorbed by the above soon
djmoffat@1099 646 Creates a timeline for every subject, for every `audioholder'/page, corresponding with any of the output XML files found in `saves/'. It shows when and for how long the subject listened to each of the fragments.
djmoffat@1099 647
djmoffat@1099 648
djmoffat@1099 649
djmoffat@1099 650 \clearpage
djmoffat@1099 651 \section{Troubleshooting} \label{sec:troubleshooting}
djmoffat@1099 652 \subsection{Reporting bugs and requesting features}
djmoffat@1099 653 Thanks to feedback from using the interface in experiments by the authors and others, many bugs have been caught and fatal crashes due to the interface seem to be a thing of the past entirely.
djmoffat@1099 654
djmoffat@1099 655 We continually develop this tool to fix issues and implement features useful to us or our user base. See \url{https://code.soundsoftware.ac.uk/projects/webaudioevaluationtool/issues} for a list of feature requests and bug reports, and their status.
djmoffat@1099 656
djmoffat@1099 657 Please contact the authors if you experience any bugs, if you would like additional functionality, if you spot any errors or gaps in the documentation, if you have questions about using the interface, or if you would like to give any feedback (even positive!) about the interface. We look forward to learning how the tool has (not) been useful to you.
djmoffat@1099 658
djmoffat@1099 659
djmoffat@1099 660 \subsection{First aid}
djmoffat@1099 661 Meanwhile, if things do go wrong or the test needs to be interrupted for whatever reason, all data is not lost. In a normal scenario, the test needs to be completed until the end (the final `Submit'), at which point the output XML is stored in the \texttt{saves/}. If this stage is not reached, open the JavaScript Console (see below for how to find it) and type
djmoffat@1099 662
djmoffat@1099 663 \texttt{createProjectSave()}
djmoffat@1099 664
djmoffat@1099 665 to present the result XML file on the client side, or
djmoffat@1099 666
djmoffat@1099 667 \texttt{createProjectSave(specification.projectReturn)}
djmoffat@1099 668
djmoffat@1099 669 to try to store it to the specified location, e.g. the `saves/' folder on the web server or the local machine (on failure the result XML should be presented directly in the web browser instead)
djmoffat@1099 670
djmoffat@1099 671 and hit enter. This will open a pop-up window with a hyperlink that reads `Save File'; click it and an XML file with results until that point should be stored in your download folder.
djmoffat@1099 672
djmoffat@1099 673 Alternatively, a lot of data can be read from the same console, in which the tool prints a lot of debug information. Specifically:
djmoffat@1099 674 \begin{itemize}
djmoffat@1099 675 \item the randomisation of pages and fragments are logged;
djmoffat@1099 676 \item any time a slider is played, its ID and the time stamp (in seconds since the start of the test) are displayed;
djmoffat@1099 677 \item any time a slider is dragged and dropped, the location where it is dropped including the time stamp are shown;
djmoffat@1099 678 \item any comments and pre- or post-test questions and their answers are logged as well.
djmoffat@1099 679 \end{itemize}
djmoffat@1099 680
djmoffat@1099 681 You can select all this and save into a text file, so that none of this data is lost. You may to choose to do this even when a test was successful as an extra precaution.
djmoffat@1099 682
djmoffat@1099 683 If you encounter any issue which you believe to be caused by any aspect of the tool, and/or which the documentation does not mention, please do let us know!
djmoffat@1099 684
djmoffat@1099 685 \subsubsection*{Opening the JavaScript Console}
djmoffat@1099 686 \begin{itemize}
djmoffat@1099 687 \item In Google Chrome, the JavaScript Console can be found in \textbf{View$>$Developer$>$JavaScript Console}, or via the keyboard shortcut Cmd + Alt + J (Mac OS X).
djmoffat@1099 688 \item In Safari, the JavaScript Console can be found in \textbf{Develop$>$Show Error Console}, or via the keyboard shortcut Cmd + Alt + C (Mac OS X). Note that for the Developer menu to be visible, you have to go to Preferences (Cmd + ,) and enable `Show Develop menu in menu bar' in the `Advanced' tab. \textbf{Note that as long as the Developer menu is not visible, nothing is logged to the console, i.e. you will only be able to see diagnostic information from when you switched on the Developer tools onwards.}
djmoffat@1099 689 \item In Firefox, go to \textbf{Tools$>$Web Developer$>$Web Console}, or hit Cmd + Alt + K.
djmoffat@1099 690 \end{itemize}
djmoffat@1099 691
djmoffat@1099 692 \subsection{Known issues and limitations}
djmoffat@1099 693 \label{sec:knownissues}
djmoffat@1099 694
djmoffat@1099 695 The following is a non-exhaustive list of problems and limitations you may experience using this tool, due to not being supported yet by us, or by the Web Audio API and/or (some) browsers.
djmoffat@1099 696
djmoffat@1099 697 \begin{itemize}
djmoffat@1099 698 \item Issue \href{https://code.soundsoftware.ac.uk/issues/1463}{\textbf{\#1463}}: \textbf{Firefox} only supports 8 bit and 16 bit WAV files. Pending automatic requantisation (which deteriorates the audio signal's dynamic range to some extent), WAV format stimuli need to adhere to these limitations in order for the test to be compatible with Firefox.
djmoffat@1099 699 \item Issues \href{https://code.soundsoftware.ac.uk/issues/1474}{\textbf{\#1474}} and \href{https://code.soundsoftware.ac.uk/issues/1462}{\textbf{\#1462}}: On occasions, audio is not working - or only a continuous `beep' can be heard - notably in \textbf{Safari}. Refreshing, quitting the browser and even enabling Developer tools in Safari's Preferences pane (`Advanced' tab: ``Show `Develop' menu in menu bar'') has helped resolve this. If no (high quality) audio can be heard, make sure your entire playback system's settings are all correct.
djmoffat@1099 700 \end{itemize}
djmoffat@1099 701
djmoffat@1099 702 \clearpage
djmoffat@1099 703 \bibliographystyle{ieeetr}
djmoffat@1099 704 \bibliography{Instructions}{}
djmoffat@1099 705
djmoffat@1099 706
djmoffat@1099 707 \clearpage
djmoffat@1099 708 \appendix
djmoffat@1099 709
djmoffat@1099 710 \section{Legacy}
djmoffat@1099 711 The APE interface and most of the functionality of the first WAET editions are inspired by the APE toolbox for MATLAB \cite{ape}. See \url{https://code.soundsoftware.ac.uk/projects/ape} for the source code and \url{http://brechtdeman.com/publications/aes136.pdf} for the corresponding paper.
djmoffat@1099 712
djmoffat@1099 713 \clearpage
djmoffat@1099 714
djmoffat@1099 715 \section{Listening test instructions example}
djmoffat@1099 716
djmoffat@1099 717 Before each test, show the instructions below or similar and make sure it is available to the subject throughout the test. Make sure to ask whether the participant has any questions upon seeing and/or reading the instructions.
djmoffat@1099 718
djmoffat@1099 719 \begin{itemize}
djmoffat@1099 720 \item You will be asked for your name (``John Smith'') and location (room identifier).
djmoffat@1099 721 \item An interface will appear, where you are asked to
djmoffat@1099 722 \begin{itemize}
djmoffat@1099 723 \item click green markers to play the different mixes;
djmoffat@1099 724 \item drag the markers on a scale to reflect your preference for the mixes;
djmoffat@1099 725 \item comment on these mixes, using text boxes with corresponding numbers (in your \textbf{native language});
djmoffat@1099 726 \item optionally comment on all mixes together, or on the song, in `General comments'.
djmoffat@1099 727 \end{itemize}
djmoffat@1099 728 \item You are asked for your personal, honest opinion. Feel free to use the full range of the scale to convey your opinion of the various mixes. Don?t be afraid to be harsh and direct.
djmoffat@1099 729 \item The markers appear at random positions at first (which means some markers may hide behind others).
djmoffat@1099 730 \item The interface can take a few seconds to start playback, but switching between mixes should be instantaneous.
djmoffat@1099 731 \item This is a research experiment, so please forgive us if things go wrong. Let us know immediately and we will fix it or restart the test.
djmoffat@1099 732 \item When the test is finished (after all songs have been evaluated), just call the experimenter, do NOT close the window.
djmoffat@1099 733 \item After the test, please fill out our survey about your background, experience and feedback on the test.
djmoffat@1099 734 \item By participating, you consent to us using all collected data for research. Unless asked explicitly, all data will be anonymised when shared.
djmoffat@1099 735 \end{itemize}
djmoffat@1099 736
djmoffat@1099 737 \clearpage
djmoffat@1099 738
djmoffat@1099 739 \section{Terminology} % just to keep track of what exactly we call things. Don't use terms that are too different, to avoid confusion.
djmoffat@1099 740 As a guide to better understand the Instructions, and to expand them later, here is a list of terms that may be unclear or ambiguous unless properly defined.
djmoffat@1099 741 \begin{description}
djmoffat@1099 742 \item[Subject] The word we use for a participant, user, ... of the test, i.e. not the experimenter who designs the test but the person who evaluates the audio under test as part of an experiment (or the preparation of one).
djmoffat@1099 743 \item[User] The person who uses the tool to configure, run and analyse the test - i.e. the experimenter, most likely a researcher - or at least
djmoffat@1099 744 \item[Page] A screen in a test; corresponds with an \texttt{audioholder}
djmoffat@1099 745 \item[Fragment] An element, stimulus or sample in a test; corresponds with an \texttt{audioelement}
djmoffat@1099 746 \item[Test] A complete test which can consist of several pages; corresponds with an entire configuration XML file
djmoffat@1099 747 \item[Configuration XML file] The XML file containing the necessary information on interface, samples, survey questions, configurations, ... which the JavaScript modules read to produce the desired test.
djmoffat@1099 748 \item[Results XML file] The output of a successful test, including ratings, comments, survey responses, timing information, and the complete configuration XML file with which the test was generated in the first place.
djmoffat@1099 749 \end{description}
djmoffat@1099 750
djmoffat@1099 751 \clearpage
djmoffat@1099 752
djmoffat@1099 753 \setcounter{secnumdepth}{0} % don't number this last bit
djmoffat@1099 754 \section{Contact details} % maybe add web pages, Twitter accounts, whatever you like
djmoffat@1099 755 \label{sec:contact}
djmoffat@1099 756
djmoffat@1099 757 \begin{itemize}
djmoffat@1099 758 \item Nicholas Jillings: \texttt{nicholas.jillings@mail.bcu.ac.uk}
djmoffat@1099 759 \item Brecht De Man: \texttt{b.deman@qmul.ac.uk}
djmoffat@1099 760 \item David Moffat: \texttt{d.j.moffat@qmul.ac.uk}
djmoffat@1099 761 \end{itemize}
djmoffat@1099 762
djmoffat@1099 763 \end{document}