annotate docs/Instructions/Instructions.tex @ 1321:1021863dd506

Removed Schema document and xmllint for validation. Schema not possible for <survey> ordering of any element any order any number type.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Tue, 29 Dec 2015 11:39:46 +0000
parents 64541cd9265d
children fb062819d956
rev   line source
nickjillings@1318 1 \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
nickjillings@1318 2 \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
nickjillings@1318 3 \geometry{letterpaper} % ... or a4paper or a5paper or ...
nickjillings@1318 4 %\geometry{landscape} % Activate for rotated page geometry
nickjillings@1318 5 \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
nickjillings@1318 6 \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
nickjillings@1318 7 % TeX will automatically convert eps --> pdf in pdflatex
nickjillings@1318 8
nickjillings@1318 9 \usepackage{listings} % Source code
nickjillings@1318 10 \usepackage{xcolor} % colour (source code for instance)
nickjillings@1318 11 \definecolor{grey}{rgb}{0.1,0.1,0.1}
nickjillings@1318 12 \definecolor{darkblue}{rgb}{0.0,0.0,0.6}
nickjillings@1318 13 \definecolor{cyan}{rgb}{0.0,0.6,0.6}
nickjillings@1318 14
nickjillings@1318 15 \usepackage{amssymb}
nickjillings@1318 16 \usepackage{cite}
nickjillings@1318 17 \usepackage{hyperref} % Hyperlinks
nickjillings@1318 18 \usepackage[nottoc,numbib]{tocbibind} % 'References' in TOC
nickjillings@1318 19
nickjillings@1318 20 \graphicspath{{img/}} % Relative path where the images are stored.
nickjillings@1318 21
nickjillings@1318 22 \title{Instructions for \\ Web Audio Evaluation Tool}
nickjillings@1318 23 \author{Nicholas Jillings, Brecht De Man and David Moffat}
nickjillings@1318 24 \date{7 December 2015} % Activate to display a given date or no date
nickjillings@1318 25
nickjillings@1318 26 \begin{document}
nickjillings@1318 27 \maketitle
nickjillings@1318 28
nickjillings@1318 29 These instructions are about use of the Web Audio Evaluation Tool on Windows and Mac OS X platforms.
nickjillings@1318 30
nickjillings@1318 31 We request that you acknowledge the authors and cite our work when using it \cite{waet}, see also CITING.txt.
nickjillings@1318 32
nickjillings@1318 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.
nickjillings@1318 34
nickjillings@1318 35 % TO DO: Linux (Android, iOS)
nickjillings@1318 36
nickjillings@1318 37 \tableofcontents
nickjillings@1318 38
nickjillings@1318 39 \clearpage
nickjillings@1318 40
nickjillings@1318 41 \section{Installation}
nickjillings@1318 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).
nickjillings@1318 43
nickjillings@1318 44 \subsection{Contents}
nickjillings@1318 45 The folder should contain the following elements: \\
nickjillings@1318 46
nickjillings@1318 47 \textbf{Main folder:}
nickjillings@1318 48 \begin{itemize}
nickjillings@1318 49 \item \texttt{analyse.html}: analysis and diagnostics of a set of result XML files
nickjillings@1318 50 \item \texttt{ape.css, core.css, graphics.css, mushra.css, structure.css}: style files (edit to change appearance)
nickjillings@1318 51 \item \texttt{ape.js}: JavaScript file for APE-style interface \cite{ape}
nickjillings@1318 52 \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.
nickjillings@1318 53 \item \texttt{core.js}: JavaScript file with core functionality
nickjillings@1318 54 \item \texttt{index.html}: webpage where interface should appear (includes link to test configuration XML)
nickjillings@1318 55 \item \texttt{jquery-2.1.4.js}: jQuery JavaScript Library
nickjillings@1318 56 \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
nickjillings@1318 57 \item \texttt{mushra.js}: JavaScript file for MUSHRA-style interface \cite{mushra}
nickjillings@1318 58 \item \texttt{pythonServer.py}: webserver for running tests locally
nickjillings@1318 59 \item \texttt{pythonServer-legacy.py}: webserver with limited functionality (no automatic storing of output XML files)
nickjillings@1318 60 \item \texttt{save.php}: PHP script to store result XML files to web server\\
nickjillings@1318 61 \end{itemize}
nickjillings@1318 62 \textbf{Documentation (./docs/)}
nickjillings@1318 63 \begin{itemize}
nickjillings@1318 64 \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'')
nickjillings@1318 65 \item Instructions: PDF and \LaTeX source of these instructions
nickjillings@1318 66 \item Project Specification Document (\LaTeX/PDF)
nickjillings@1318 67 \item Results Specification Document (\LaTeX/PDF)
nickjillings@1318 68 \item SMC15: PDF and \LaTeX source of 12th Sound and Music Computing Conference paper \cite{waet}
nickjillings@1318 69 \item WAC2016: PDF and \LaTeX source of 2nd Web Audio Conference paper\\
nickjillings@1318 70 \end{itemize}
nickjillings@1318 71 \textbf{Example project (./example\_eval/)}
nickjillings@1318 72 \begin{itemize}
nickjillings@1318 73 \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).\\
nickjillings@1318 74 \end{itemize}
nickjillings@1318 75 \textbf{Output files (./saves/)}
nickjillings@1318 76 \begin{itemize}
nickjillings@1318 77 \item The output XML files of tests will be stored here by default by the \texttt{pythonServer.py} script.\\
nickjillings@1318 78 \end{itemize}
nickjillings@1318 79 \textbf{Auxiliary scripts (./scripts/)}
nickjillings@1318 80 \begin{itemize}
nickjillings@1318 81 \item Helpful Python scripts for extraction and visualisation of data.\\
nickjillings@1318 82 \end{itemize}
nickjillings@1318 83 \textbf{Test creation tool (./test\_create/)}
nickjillings@1318 84 \begin{itemize}
nickjillings@1318 85 \item Webpage for easily setting up your own test without having to delve into the XML.\\
nickjillings@1318 86 \end{itemize}
nickjillings@1318 87
nickjillings@1318 88 \subsection{Compatibility}
nickjillings@1318 89 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).
nickjillings@1318 90
nickjillings@1318 91 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
nickjillings@1318 92
nickjillings@1318 93 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.
nickjillings@1318 94
nickjillings@1318 95 \clearpage
nickjillings@1318 96
nickjillings@1318 97
nickjillings@1318 98 \section{Test setup}
nickjillings@1318 99
nickjillings@1318 100 \subsection{Sample rate}
nickjillings@1318 101 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.
nickjillings@1318 102
nickjillings@1318 103 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.
nickjillings@1318 104
nickjillings@1318 105 Note that upon changing the sampling rate, the browser will have to be restarted for the change to take effect.
nickjillings@1318 106
nickjillings@1318 107 \subsubsection{Mac OS X}
nickjillings@1318 108 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.
nickjillings@1318 109 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.
nickjillings@1318 110
nickjillings@1318 111 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.
nickjillings@1318 112
nickjillings@1318 113 \begin{figure}[tb]
nickjillings@1318 114 \centering
nickjillings@1318 115 \includegraphics[width=.65\textwidth]{img/audiomidisetup.png}
nickjillings@1318 116 \caption{The Audio MIDI Setup window in Mac OS X}
nickjillings@1318 117 \label{fig:audiomidisetup}
nickjillings@1318 118 \end{figure}
nickjillings@1318 119
nickjillings@1318 120 \subsubsection{Windows}
nickjillings@1318 121 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
nickjillings@1318 122 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.
nickjillings@1318 123
nickjillings@1318 124 \subsection{Local test}
nickjillings@1318 125 If the test is hosted locally, you will need to run the local webserver provided with this tool.
nickjillings@1318 126
nickjillings@1318 127 \subsubsection{Mac OS X \& Linux}
nickjillings@1318 128
nickjillings@1318 129 On Mac OS X, Python comes preinstalled, as with most Unix/Linux distributions.
nickjillings@1318 130
nickjillings@1318 131 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
nickjillings@1318 132
nickjillings@1318 133 \texttt{cd /Users/John/Documents/test/}
nickjillings@1318 134
nickjillings@1318 135 Then hit enter and run the Python script by typing
nickjillings@1318 136
nickjillings@1318 137 \texttt{python pythonServer.py}
nickjillings@1318 138
nickjillings@1318 139 and hit enter again. See also Figure \ref{fig:terminal}.
nickjillings@1318 140
nickjillings@1318 141 \begin{figure}[htbp]
nickjillings@1318 142 \begin{center}
nickjillings@1318 143 \includegraphics[width=.75\textwidth]{pythonServer.png}
nickjillings@1318 144 \caption{Mac OS X: The Terminal window after going to the right folder (\texttt{cd [folder\_path]}) and running \texttt{pythonServer.py}.}
nickjillings@1318 145 \label{fig:terminal}
nickjillings@1318 146 \end{center}
nickjillings@1318 147 \end{figure}
nickjillings@1318 148
nickjillings@1318 149 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
nickjillings@1318 150
nickjillings@1318 151 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/.
nickjillings@1318 152
nickjillings@1318 153 To start the test, open the browser and type
nickjillings@1318 154
nickjillings@1318 155 \texttt{localhost:8000}
nickjillings@1318 156
nickjillings@1318 157 and hit enter. The test should start (see Figure \ref{fig:test}).
nickjillings@1318 158
nickjillings@1318 159 To quit the server, either close the terminal window or press Ctrl+C on your keyboard to forcibly shut the server.
nickjillings@1318 160
nickjillings@1318 161 \subsubsection{Windows}
nickjillings@1318 162
nickjillings@1318 163 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.
nickjillings@1318 164
nickjillings@1318 165 Simply double click the Python script \texttt{pythonServer.py} in the folder you downloaded.
nickjillings@1318 166
nickjillings@1318 167 You may see a warning like the one in Figure \ref{fig:warning}. Click `Allow access'.
nickjillings@1318 168
nickjillings@1318 169 \begin{figure}[htbp]
nickjillings@1318 170 \begin{center}
nickjillings@1318 171 \includegraphics[width=.6\textwidth]{warning.png}
nickjillings@1318 172 \caption{Windows: Potential warning message when executing \texttt{pythonServer.py}.}
nickjillings@1318 173 \label{fig:warning}
nickjillings@1318 174 \end{center}
nickjillings@1318 175 \end{figure}
nickjillings@1318 176
nickjillings@1318 177 The process should now start, in the Command prompt that opens - see Figure \ref{fig:python}.
nickjillings@1318 178
nickjillings@1318 179 \begin{figure}[htbp]
nickjillings@1318 180 \begin{center}
nickjillings@1318 181 \includegraphics[width=.75\textwidth]{python.png}
nickjillings@1318 182 \caption{Windows: The Command Prompt after running \texttt{pythonServer.py} and opening the corresponding website.}
nickjillings@1318 183 \label{fig:python}
nickjillings@1318 184 \end{center}
nickjillings@1318 185 \end{figure}
nickjillings@1318 186
nickjillings@1318 187 You can leave this running throughout the different experiments (i.e. leave the Command Prompt open).
nickjillings@1318 188
nickjillings@1318 189 To start the test, open the browser and type
nickjillings@1318 190
nickjillings@1318 191 \texttt{localhost:8000}
nickjillings@1318 192
nickjillings@1318 193 and hit enter. The test should start (see Figure \ref{fig:test}).
nickjillings@1318 194
nickjillings@1318 195 \begin{figure}[htb]
nickjillings@1318 196 \begin{center}
nickjillings@1318 197 \includegraphics[width=.8\textwidth]{test.png}
nickjillings@1318 198 \caption{The start of the test in Google Chrome on Windows 7.}
nickjillings@1318 199 \label{fig:test}
nickjillings@1318 200 \end{center}
nickjillings@1318 201 \end{figure}
nickjillings@1318 202
nickjillings@1318 203 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}.
nickjillings@1318 204
nickjillings@1318 205 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}.
nickjillings@1318 206
nickjillings@1318 207 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.
nickjillings@1318 208
nickjillings@1318 209 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.
nickjillings@1318 210
nickjillings@1318 211
nickjillings@1318 212 \subsection{Remote test}
nickjillings@1318 213 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.
nickjillings@1318 214
nickjillings@1318 215 Make sure the \texttt{projectReturn} attribute of the \texttt{setup} node is set to the \texttt{save.php} script.
nickjillings@1318 216
nickjillings@1318 217 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.
nickjillings@1318 218
nickjillings@1318 219 \subsection{Multiple test documents}
nickjillings@1318 220 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}.
nickjillings@1318 221
nickjillings@1318 222 \clearpage
nickjillings@1318 223
nickjillings@1318 224 \section{Interfaces}
nickjillings@1318 225
nickjillings@1318 226 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.
nickjillings@1318 227
nickjillings@1318 228 To set the interface style for the whole test, %Nick? change when this is not the case anymore, i.e. when the interface can be set per page
nickjillings@1318 229 add \texttt{interface="APE"} to the \texttt{setup} node, where \texttt{"APE"} is one of the interface names below.
nickjillings@1318 230
nickjillings@1318 231 \subsection{APE}
nickjillings@1318 232 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.
nickjillings@1318 233 It also contains an optional text box for each element, to allow for clarification by the subject, tagging, and so on.
nickjillings@1318 234
nickjillings@1318 235 \subsection{MUSHRA}
nickjillings@1318 236 This is a straightforward implementation of \cite{mushra}, especially common for the rating of audio quality, for instance for the evaluation of audio codecs.
nickjillings@1318 237
nickjillings@1318 238
nickjillings@1318 239 \clearpage
nickjillings@1318 240
nickjillings@1318 241 \section{Features}
nickjillings@1318 242
nickjillings@1318 243 This section covers the different features implemented in the Web Audio Evaluation Tool, how to use them, and what to know about them.
nickjillings@1318 244
nickjillings@1318 245 Unless otherwise specified, \emph{each} feature described here is optional, i.e. it can be enabled or disabled and adjusted to some extent.
nickjillings@1318 246
nickjillings@1318 247 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.
nickjillings@1318 248
nickjillings@1318 249 \subsection{Interface layout}
nickjillings@1318 250 The \texttt{interface} node (child of \texttt{audioholder}) contains
nickjillings@1318 251
nickjillings@1318 252 Example:
nickjillings@1318 253
nickjillings@1318 254 \begin{lstlisting}
nickjillings@1318 255 <interface name="quality">
nickjillings@1318 256 <title>Audio Quality</title>
nickjillings@1318 257 <scale position="10">Poor</scale>
nickjillings@1318 258 <scale position="90">Excellent</scale>
nickjillings@1318 259 <commentBoxPrefix>Comment on fragment</commentBoxPrefix>
nickjillings@1318 260 </interface>
nickjillings@1318 261 \end{lstlisting}
nickjillings@1318 262
nickjillings@1318 263 \subsubsection{Title}
nickjillings@1318 264 Specifies the axis title as displayed on the interface.
nickjillings@1318 265
nickjillings@1318 266 If this tag is absent, the title will default to `Axis \emph{[number]}'. Therefore, if no title is desired, just add the title tag (\texttt{<title/>}) without text.
nickjillings@1318 267
nickjillings@1318 268 \subsubsection{Annotation}
nickjillings@1318 269 Words or numbers can be placed on specific positions of the scale with the \texttt{scale} tag. The \texttt{position} attribute is a value from 0 to 100, corresponding to the percentage of the width/height of the scale where you want the string to be placed.
nickjillings@1318 270
nickjillings@1318 271 \subsubsection{Comment box prefix}
nickjillings@1318 272 If comment boxes corresponding with the fragments are enabled, this sets the comment box string after which the fragment number is appended.
nickjillings@1318 273
nickjillings@1318 274 The default value is ``Comment on fragment''. So in this case, each comment box would have a header ``Comment on fragment \emph[number]''.
nickjillings@1318 275
nickjillings@1318 276 \subsubsection{Multiple scales}
nickjillings@1318 277 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.
nickjillings@1318 278
nickjillings@1318 279 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.
nickjillings@1318 280 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.
nickjillings@1318 281
nickjillings@1318 282
nickjillings@1318 283 \subsection{Surveys}
nickjillings@1318 284 Surveys are conducted through an in-page popup window which can collect data using various HTML functions, see Survey elements below for a list. Survey questions are placed into the \texttt{<pretest>} or \texttt{<posttest>} nodes. Appending these nodes to the \texttt{<setup>} node will have the survey options appear before any test pages (if in the \texttt{<pretest>} node) or after all test pages. Placing the survey options in the \texttt{<audioholder>} node will have them appear before or after the test page they are a child of.
nickjillings@1318 285 \subsubsection{Survey elements}
nickjillings@1318 286 All survey elements (which `pop up' in the centre of the browser) have an \texttt{id} attribute, for retrieval of the responses in post-processing of the results, and a \texttt{mandatory} attribute, which if set to ``true'' requires the subjects to respond before they can continue.
nickjillings@1318 287
nickjillings@1318 288 \begin{description}
nickjillings@1318 289 \item[statement] Simply shows text to the subject until `Next' or `Start' is clicked.
nickjillings@1318 290 \item[question] Expects a text answer (in a text box). Has the \texttt{boxsize} argument: set to ``large'' or ``huge'' for a bigger box size, or ``small'' for small.
nickjillings@1318 291 \item[number] Only accepts a numerical value. Attribute \texttt{min="0"} specifies the minimum value - in this case the answer must be stricly positive before the subject can continue.
nickjillings@1318 292 \item[radio] Radio buttons. Presents a list of options to the user using radio buttons, where only one option from the list can be selected.
nickjillings@1318 293 \item[checkbox] Checkboxes. Note that when making a checkbox question ``mandatory'', the subject is forced to select at least one option (which could be e.g. `Other' or `None').\\
nickjillings@1318 294 \end{description}
nickjillings@1318 295
nickjillings@1318 296 \textbf{Example usage:}\\
nickjillings@1318 297
nickjillings@1318 298 \lstset{
nickjillings@1318 299 basicstyle=\ttfamily,
nickjillings@1318 300 columns=fullflexible,
nickjillings@1318 301 showstringspaces=false,
nickjillings@1318 302 commentstyle=\color{grey}\upshape
nickjillings@1318 303 }
nickjillings@1318 304
nickjillings@1318 305 \lstdefinelanguage{XML}
nickjillings@1318 306 {
nickjillings@1318 307 morestring=[b]",
nickjillings@1318 308 morestring=[s]{>}{<},
nickjillings@1318 309 morecomment=[s]{<?}{?>},
nickjillings@1318 310 stringstyle=\color{black} \bfseries,
nickjillings@1318 311 identifierstyle=\color{darkblue} \bfseries,
nickjillings@1318 312 keywordstyle=\color{cyan} \bfseries,
nickjillings@1318 313 morekeywords={xmlns,version,type},
nickjillings@1318 314 breaklines=true% list your attributes here
nickjillings@1318 315 }
nickjillings@1318 316 \scriptsize
nickjillings@1318 317 \lstset{language=XML}
nickjillings@1318 318
nickjillings@1318 319 \begin{lstlisting}
nickjillings@1318 320 <PostTest>
nickjillings@1318 321 <question id="location" mandatory="true" boxsize="large">Please enter your location. (example mandatory text question)</question>
nickjillings@1318 322 <number id="age" min="0">Please enter your age (example non-mandatory number question)</number>
nickjillings@1318 323 <radio id="rating">
nickjillings@1318 324 <statement>Please rate this interface (example radio button question)</statement>
nickjillings@1318 325 <option name="bad">Bad</option>
nickjillings@1318 326 <option name="poor">Poor</option>
nickjillings@1318 327 <option name="good">Good</option>
nickjillings@1318 328 <option name="great">Great</option>
nickjillings@1318 329 </radio>
nickjillings@1318 330 <checkbox id="background" mandatory="true">
nickjillings@1318 331 <statement>Please select with which activities you have any experience (example checkbox question)</statement>
nickjillings@1318 332 <option name="musician">Playing a musical instrument</option>
nickjillings@1318 333 <option name="soundengineer">Recording or mixing audio</option>
nickjillings@1318 334 </checkbox>
nickjillings@1318 335 <statement>Thank you for taking this listening test. Please click 'Submit' and your results will appear in the 'saves/' folder.</statement>
nickjillings@1318 336 </PostTest>
nickjillings@1318 337 \end{lstlisting}
nickjillings@1318 338
nickjillings@1318 339
nickjillings@1318 340
nickjillings@1318 341 \subsection{Randomisation}
nickjillings@1318 342 [WORK IN PROGRESS]
nickjillings@1318 343
nickjillings@1318 344 \subsubsection{Randomisation of configuration XML files}
nickjillings@1318 345 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}.
nickjillings@1318 346 % how to
nickjillings@1318 347 % explain how this is implemented in the pythonServer
nickjillings@1318 348 %Nick? already implemented in the PHP?
nickjillings@1318 349 % Needs to be implemented in PHP and automated better, will complete soon
nickjillings@1318 350
nickjillings@1318 351
nickjillings@1318 352 \subsubsection{Randomsation of page order}
nickjillings@1318 353 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.
nickjillings@1318 354
nickjillings@1318 355 \subsubsection{Randomisation of axis order}
nickjillings@1318 356
nickjillings@1318 357 \subsubsection{Randomisation of fragment order}
nickjillings@1318 358 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.
nickjillings@1318 359
nickjillings@1318 360 \subsubsection{Randomisation of initial slider position}
nickjillings@1318 361 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.
nickjillings@1318 362 % /subsubsection{Randomisation of survey question order}
nickjillings@1318 363 % should be an attribute of the individual 'pretest' and 'posttest' elements
nickjillings@1318 364 % uncomment once we have it
nickjillings@1318 365
nickjillings@1318 366 \subsection{Looping}
nickjillings@1318 367 Looping enables the fragments to loop until stopped by the user. Looping is synchronous between samples so all samples start at the same time.
nickjillings@1318 368 Individual test pages can have their playback looped by the \texttt{<audioholder>} attribute \texttt{loop} with a value of "true" or "false".
nickjillings@1318 369 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.
nickjillings@1318 370
nickjillings@1318 371 Note that fragments cannot be played until all page fragments are loaded when in looped mode, as the engine needs to know the amount to pad the fragments.
nickjillings@1318 372
nickjillings@1318 373 \subsection{Sample rate}
nickjillings@1318 374 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 - so that a warning message is shown alerting the subject the system's sample rate is different from this enforced sample rate. This of course means that in one test, all sample rates must be equal as it is impossible to change the system's sample rates during the test (even if you were to manually change it, then the browser must be restarted for it to take effect).
nickjillings@1318 375
nickjillings@1318 376 \subsection{Scrubber bar}
nickjillings@1318 377 The scrubber bar, or transport bar (that is the name of the visualisation of the playhead thing with an indication of time and showing the portion of the file played so far) is at this point just a visual, and not a controller to adjust the playhead position.
nickjillings@1318 378
nickjillings@1318 379 Make visible by adding \texttt{<option name='playhead'/>} to the \texttt{interface} node (see Section \ref{sec:checks}: Checks).
nickjillings@1318 380
nickjillings@1318 381 \subsection{Metrics}
nickjillings@1318 382 Enable the collection of metrics by adding \texttt{collectMetrics=`true'} in the \texttt{setup} node. % Should this always be on??
nickjillings@1318 383
nickjillings@1318 384 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.
nickjillings@1318 385
nickjillings@1318 386 \begin{lstlisting}
nickjillings@1318 387 <Metric>
nickjillings@1318 388 <metricEnable>testTimer</metricEnable>
nickjillings@1318 389 <metricEnable>elementTimer</metricEnable>
nickjillings@1318 390 <metricEnable>elementInitialPosition</metricEnable>
nickjillings@1318 391 <metricEnable>elementTracker</metricEnable>
nickjillings@1318 392 <metricEnable>elementFlagListenedTo</metricEnable>
nickjillings@1318 393 <metricEnable>elementFlagMoved</metricEnable>
nickjillings@1318 394 <metricEnable>elementListenTracker</metricEnable>
nickjillings@1318 395 </Metric>
nickjillings@1318 396 \end{lstlisting}
nickjillings@1318 397
nickjillings@1318 398 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.
nickjillings@1318 399
nickjillings@1318 400 \subsubsection{Time test duration}
nickjillings@1318 401 \texttt{testTimer}\\
nickjillings@1318 402 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.
nickjillings@1318 403
nickjillings@1318 404 \subsubsection{Time fragment playback}
nickjillings@1318 405 \texttt{elementTimer}\\
nickjillings@1318 406 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.
nickjillings@1318 407
nickjillings@1318 408 \subsubsection{Initial positions}
nickjillings@1318 409 \texttt{elementInitialPosition}\\
nickjillings@1318 410 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>}.
nickjillings@1318 411
nickjillings@1318 412 \subsubsection{Track movements}
nickjillings@1318 413 \texttt{elementTracker}\\
nickjillings@1318 414 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.
nickjillings@1318 415 \subsubsection{Which fragments listened to}
nickjillings@1318 416 \texttt{elementFlagListenedTo}\\
nickjillings@1318 417 One per audio fragment per test page. Boolean response, set to true if listened to.
nickjillings@1318 418 \subsubsection{Which fragments moved}
nickjillings@1318 419 \texttt{elementFlagMoved}\\
nickjillings@1318 420 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.
nickjillings@1318 421
nickjillings@1318 422 \subsubsection{elementListenTracker}
nickjillings@1318 423 \texttt{elementListenTracker}\\
nickjillings@1318 424 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.
nickjillings@1318 425
nickjillings@1318 426 \subsection{References and anchors}
nickjillings@1318 427 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.
nickjillings@1318 428 \subsubsection{Outside Reference}
nickjillings@1318 429 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.
nickjillings@1318 430 \subsubsection{Hidden reference}
nickjillings@1318 431 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.
nickjillings@1318 432 \subsubsection{Hidden anchor}
nickjillings@1318 433 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.
nickjillings@1318 434
nickjillings@1318 435 \subsection{Checks}
nickjillings@1318 436 \label{sec:checks}
nickjillings@1318 437
nickjillings@1318 438 %blabla
nickjillings@1318 439 These checks are enabled in the \texttt{interface} node, which is a child of the \texttt{setup} node.
nickjillings@1318 440 \subsubsection{Playback checks}
nickjillings@1318 441 % what it does/is
nickjillings@1318 442 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.
nickjillings@1318 443 % how to enable/disable
nickjillings@1318 444
nickjillings@1318 445 Alternatively, one can check whether the \emph{entire} fragment was listened to at least once.
nickjillings@1318 446 % how to enable
nickjillings@1318 447
nickjillings@1318 448 Add \texttt{<check name="fragmentPlayed"/>} to the \texttt{interface} node.
nickjillings@1318 449
nickjillings@1318 450
nickjillings@1318 451 \subsubsection{Movement check}
nickjillings@1318 452 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.
nickjillings@1318 453 If there are several axes, the warning will specify which samples have to be moved on which axis.
nickjillings@1318 454
nickjillings@1318 455 Add \texttt{<check name="fragmentMoved"/>} to the \texttt{interface} node.
nickjillings@1318 456
nickjillings@1318 457 \subsubsection{Comment check}
nickjillings@1318 458 % How to enable/disable?
nickjillings@1318 459
nickjillings@1318 460 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.
nickjillings@1318 461
nickjillings@1318 462 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?
nickjillings@1318 463
nickjillings@1318 464 Add \texttt{<check name="fragmentComments"/>} to the \texttt{interface} node.
nickjillings@1318 465
nickjillings@1318 466 %ADD: how to add a custom comment box
nickjillings@1318 467
nickjillings@1318 468 \subsubsection{Scale use check}
nickjillings@1318 469 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.
nickjillings@1318 470
nickjillings@1318 471 Add \texttt{<check name="scalerange" min="25" max="75"/>} to the \texttt{interface} node.
nickjillings@1318 472
nickjillings@1318 473 \subsubsection{Note on the use of multiple rating axes}
nickjillings@1318 474 I.e. what if more than one axis? How to specify which axis the checks relate to? %Nick? to add?
nickjillings@1318 475
nickjillings@1318 476 \subsection{Platform information}
nickjillings@1318 477 % what does it do, what does it look like
nickjillings@1318 478 % limitations?
nickjillings@1318 479 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.
nickjillings@1318 480
nickjillings@1318 481 Example:
nickjillings@1318 482 \begin{lstlisting}
nickjillings@1318 483 <navigator>
nickjillings@1318 484 <platform>MacIntel</platform>
nickjillings@1318 485 <vendor>Google Inc.</vendor>
nickjillings@1318 486 <uagent>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36</uagent>
nickjillings@1318 487 </navigator>
nickjillings@1318 488 \end{lstlisting}
nickjillings@1318 489
nickjillings@1318 490 \subsection{Show progress}
nickjillings@1318 491 Add \texttt{<option name="page-count"/>} to the \texttt{interface} node (see Section \ref{sec:checks}: Checks) to add the current page number and the total number of pages to the interface.
nickjillings@1318 492
nickjillings@1318 493 \subsection{Gain}
nickjillings@1318 494 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:
nickjillings@1318 495
nickjillings@1318 496 \texttt{<audioElements url="sample-01.wav" gain="-6" id="sample01quieter" />}\\
nickjillings@1318 497 Please note, there are no checks on this to detect if accidentaly typed in linear.
nickjillings@1318 498
nickjillings@1318 499 \subsection{Loudness}
nickjillings@1318 500 % automatic loudness equalisation
nickjillings@1318 501 % guide to loudness.js
nickjillings@1318 502 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{<audioholder>} 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{<audioholder>} and \texttt{<setup>} nodes, that test page will take the value associated with the \texttt{<audioholder>}. The loudness attribute is set in LUFS
nickjillings@1318 503
nickjillings@1318 504 \clearpage
nickjillings@1318 505
nickjillings@1318 506
nickjillings@1318 507 \section{Using the test create tool}
nickjillings@1318 508 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.
nickjillings@1318 509
nickjillings@1318 510 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.
nickjillings@1318 511
nickjillings@1318 512 Include audio by dragging and dropping the stimuli you wish to include.
nickjillings@1318 513
nickjillings@1318 514 The tool examines your XML before exporting to ensure you do not export an invalid XML structure which would crash the test.
nickjillings@1318 515
nickjillings@1318 516 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.
nickjillings@1318 517
nickjillings@1318 518 \section{Building your own interface}
nickjillings@1318 519
nickjillings@1318 520 \subsection{Nodes to familiarise}
nickjillings@1318 521 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.
nickjillings@1318 522
nickjillings@1318 523 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.
nickjillings@1318 524
nickjillings@1318 525 \subsection{Modifying \texttt{core.js}}
nickjillings@1318 526 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.
nickjillings@1318 527 Any further files can be loaded here as well, such as css styling files. jQuery is already included.
nickjillings@1318 528
nickjillings@1318 529 \subsection{Building the Interface}
nickjillings@1318 530 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.
nickjillings@1318 531 \begin{itemize}
nickjillings@1318 532 \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).
nickjillings@1318 533 \item \texttt{loadTest(audioHolderObject)} - Called for each page load. The audioHolderObject contains a specification node holding effectively one of the audioHolder nodes.
nickjillings@1318 534 \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.
nickjillings@1318 535 \end{itemize}
nickjillings@1318 536
nickjillings@1318 537 \subsubsection{loadInterface}
nickjillings@1318 538 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.
nickjillings@1318 539
nickjillings@1318 540 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.
nickjillings@1318 541
nickjillings@1318 542 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).
nickjillings@1318 543
nickjillings@1318 544 \subsubsection{loadTest(audioHolderObject)}
nickjillings@1318 545 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.
nickjillings@1318 546
nickjillings@1318 547 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.
nickjillings@1318 548
nickjillings@1318 549 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.
nickjillings@1318 550
nickjillings@1318 551 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.
nickjillings@1318 552
nickjillings@1318 553 \clearpage
nickjillings@1318 554 \section{Analysis and diagnostics}
nickjillings@1318 555 \subsection{In the browser}
nickjillings@1318 556 See `analysis.html' in the main folder: immediate visualisation of (by default) all results in the `saves/' folder.
nickjillings@1318 557
nickjillings@1318 558 \subsection{Python scripts}
nickjillings@1318 559 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.
nickjillings@1318 560
nickjillings@1318 561 Visualisation requires the free matplotlib toolbox (http://matplotlib.org), numpy and scipy.
nickjillings@1318 562 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.
nickjillings@1318 563 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).
nickjillings@1318 564
nickjillings@1318 565 \subsubsection{comment\_parser.py}
nickjillings@1318 566 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).
nickjillings@1318 567 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).
nickjillings@1318 568
nickjillings@1318 569 \subsubsection{evaluation\_stats.py}
nickjillings@1318 570 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.
nickjillings@1318 571
nickjillings@1318 572 \subsubsection{generate\_report.py}
nickjillings@1318 573 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.
nickjillings@1318 574
nickjillings@1318 575 \subsubsection{score\_parser.py}
nickjillings@1318 576 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.
nickjillings@1318 577
nickjillings@1318 578 \subsubsection{score\_plot.py}
nickjillings@1318 579 Plots the ratings as stored in the CSVs created by score\_parser.py
nickjillings@1318 580 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.
nickjillings@1318 581 Requires the free matplotlib library.
nickjillings@1318 582 At this point, more than one subjects are needed for this script to work.
nickjillings@1318 583
nickjillings@1318 584 \subsubsection{timeline\_view\_movement.py}
nickjillings@1318 585 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).
nickjillings@1318 586
nickjillings@1318 587 \subsubsection{timeline\_view.py} % should be omitted or absorbed by the above soon
nickjillings@1318 588 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.
nickjillings@1318 589
nickjillings@1318 590
nickjillings@1318 591
nickjillings@1318 592 \clearpage
nickjillings@1318 593 \section{Troubleshooting} \label{sec:troubleshooting}
nickjillings@1318 594 \subsection{Reporting bugs and requesting features}
nickjillings@1318 595 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.
nickjillings@1318 596
nickjillings@1318 597 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.
nickjillings@1318 598
nickjillings@1318 599 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.
nickjillings@1318 600
nickjillings@1318 601
nickjillings@1318 602 \subsection{First aid}
nickjillings@1318 603 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
nickjillings@1318 604
nickjillings@1318 605 \texttt{createProjectSave()}
nickjillings@1318 606
nickjillings@1318 607 to present the result XML file on the client side, or
nickjillings@1318 608
nickjillings@1318 609 \texttt{createProjectSave(specification.projectReturn)}
nickjillings@1318 610
nickjillings@1318 611 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)
nickjillings@1318 612
nickjillings@1318 613 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.
nickjillings@1318 614
nickjillings@1318 615 Alternatively, a lot of data can be read from the same console, in which the tool prints a lot of debug information. Specifically:
nickjillings@1318 616 \begin{itemize}
nickjillings@1318 617 \item the randomisation of pages and fragments are logged;
nickjillings@1318 618 \item any time a slider is played, its ID and the time stamp (in seconds since the start of the test) are displayed;
nickjillings@1318 619 \item any time a slider is dragged and dropped, the location where it is dropped including the time stamp are shown;
nickjillings@1318 620 \item any comments and pre- or post-test questions and their answers are logged as well.
nickjillings@1318 621 \end{itemize}
nickjillings@1318 622
nickjillings@1318 623 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.
nickjillings@1318 624
nickjillings@1318 625 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!
nickjillings@1318 626
nickjillings@1318 627 \subsubsection*{Opening the JavaScript Console}
nickjillings@1318 628 \begin{itemize}
nickjillings@1318 629 \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).
nickjillings@1318 630 \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.}
nickjillings@1318 631 \item In Firefox, go to \textbf{Tools$>$Web Developer$>$Web Console}, or hit Cmd + Alt + K.
nickjillings@1318 632 \end{itemize}
nickjillings@1318 633
nickjillings@1318 634 \subsection{Known issues and limitations}
nickjillings@1318 635 \label{sec:knownissues}
nickjillings@1318 636
nickjillings@1318 637 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.
nickjillings@1318 638
nickjillings@1318 639 \begin{itemize}
nickjillings@1318 640 \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.
nickjillings@1318 641 \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.
nickjillings@1318 642 \end{itemize}
nickjillings@1318 643
nickjillings@1318 644 \clearpage
nickjillings@1318 645 \bibliographystyle{ieeetr}
nickjillings@1318 646 \bibliography{Instructions}{}
nickjillings@1318 647
nickjillings@1318 648
nickjillings@1318 649 \clearpage
nickjillings@1318 650 \appendix
nickjillings@1318 651
nickjillings@1318 652 \section{Legacy}
nickjillings@1318 653 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.
nickjillings@1318 654
nickjillings@1318 655 \clearpage
nickjillings@1318 656
nickjillings@1318 657 \section{Listening test instructions example}
nickjillings@1318 658
nickjillings@1318 659 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.
nickjillings@1318 660
nickjillings@1318 661 \begin{itemize}
nickjillings@1318 662 \item You will be asked for your name (``John Smith'') and location (room identifier).
nickjillings@1318 663 \item An interface will appear, where you are asked to
nickjillings@1318 664 \begin{itemize}
nickjillings@1318 665 \item click green markers to play the different mixes;
nickjillings@1318 666 \item drag the markers on a scale to reflect your preference for the mixes;
nickjillings@1318 667 \item comment on these mixes, using text boxes with corresponding numbers (in your \textbf{native language});
nickjillings@1318 668 \item optionally comment on all mixes together, or on the song, in `General comments'.
nickjillings@1318 669 \end{itemize}
nickjillings@1318 670 \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.
nickjillings@1318 671 \item The markers appear at random positions at first (which means some markers may hide behind others).
nickjillings@1318 672 \item The interface can take a few seconds to start playback, but switching between mixes should be instantaneous.
nickjillings@1318 673 \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.
nickjillings@1318 674 \item When the test is finished (after all songs have been evaluated), just call the experimenter, do NOT close the window.
nickjillings@1318 675 \item After the test, please fill out our survey about your background, experience and feedback on the test.
nickjillings@1318 676 \item By participating, you consent to us using all collected data for research. Unless asked explicitly, all data will be anonymised when shared.
nickjillings@1318 677 \end{itemize}
nickjillings@1318 678
nickjillings@1318 679 \clearpage
nickjillings@1318 680
nickjillings@1318 681 \section{Terminology} % just to keep track of what exactly we call things. Don't use terms that are too different, to avoid confusion.
nickjillings@1318 682 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.
nickjillings@1318 683 \begin{description}
nickjillings@1318 684 \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).
nickjillings@1318 685 \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
nickjillings@1318 686 \item[Page] A screen in a test; corresponds with an \texttt{audioholder}
nickjillings@1318 687 \item[Fragment] An element, stimulus or sample in a test; corresponds with an \texttt{audioelement}
nickjillings@1318 688 \item[Test] A complete test which can consist of several pages; corresponds with an entire configuration XML file
nickjillings@1318 689 \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.
nickjillings@1318 690 \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.
nickjillings@1318 691 \end{description}
nickjillings@1318 692
nickjillings@1318 693 \clearpage
nickjillings@1318 694
nickjillings@1318 695 \setcounter{secnumdepth}{0} % don't number this last bit
nickjillings@1318 696 \section{Contact details} % maybe add web pages, Twitter accounts, whatever you like
nickjillings@1318 697 \label{sec:contact}
nickjillings@1318 698
nickjillings@1318 699 \begin{itemize}
nickjillings@1318 700 \item Nicholas Jillings: \texttt{nicholas.jillings@mail.bcu.ac.uk}
nickjillings@1318 701 \item Brecht De Man: \texttt{b.deman@qmul.ac.uk}
nickjillings@1318 702 \item David Moffat: \texttt{d.j.moffat@qmul.ac.uk}
nickjillings@1318 703 \end{itemize}
nickjillings@1318 704
nickjillings@1318 705 \end{document}