annotate docs/ProjectSpecificationDocument.tex @ 1629:21381e163787

Session save to server falback to browser download if the server didn't save the file.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Wed, 27 May 2015 09:10:20 +0100
parents 45d3860b350a
children 06fbaccf3b58
rev   line source
b@1606 1 \documentclass{article}
b@1606 2
b@1606 3 \usepackage[margin=2cm]{geometry}
b@1606 4 \usepackage{listings}
b@1606 5
b@1606 6 \begin{document}
b@1606 7
b@1606 8 \large APE Browser Tool - Project Specification Document
b@1606 9
b@1606 10 \section{Document}
b@1606 11
b@1606 12 An XML file containing all project information to load and execute the project on the client. Certain interfaces are optional, however others are mandatory. This guide should reflect the changes in the XML project and keep track of the versions. Hopwfully this can remain simple!
b@1606 13
b@1606 14 \section{Root}
b@1606 15
b@1606 16 The XML root must be \texttt{<BrowserEvalProjectDocument>}. This should be sufficiently identifiable in both itself and in the JavaScript decoding as it will create an object called the root name.
b@1606 17
b@1606 18 There must also be a \texttt{<version>} tag which has the attribute \texttt{id} containing a numerical representation of the version. Currently everything in this document can be assumed to be version 1. If future updates or corrections are made post delivery this should give the flexibility to ensure past projects still work.
b@1606 19
b@1606 20 The root will also contain the following tags: setup and tracks.
b@1606 21
b@1606 22 \section{Setup tag}
b@1606 23
b@1606 24 The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
b@1606 25 Any general pre/post test questions must be specified in the relevant children tag. Any enabled metrics must also be specified in the metric child node.
b@1606 26
b@1606 27 \subsection{Attributes}
b@1606 28 \begin{itemize}
b@1606 29 \item \texttt{interface} - Mandatory, String. Defaults to APE, otherwise use to load any of the available interfaces. Currently only valid string is APE.
b@1606 30 \item \texttt{projectReturn} - Mandatory, String. Specify the URL to return the test results. If null client will generate XML locally and prompt user to return the file.
b@1606 31 \item \texttt{randomiseOrder} - Optional, default to false. Specify if the order of the tests can be randomised.
b@1606 32 \item \texttt{collectMetrics} - Optional, Boolean. Default to false. Determine if the test metrics should be collected. These include how long each test session took etc. The full metrics list can be modified in the 'metrics' tag.
b@1606 33 \end{itemize}
b@1606 34
b@1606 35 \subsection{Elements}
b@1606 36 None
b@1606 37
b@1606 38 \section{AudioHolder tag}
b@1606 39
b@1606 40 There should be one audioHolder tag per test session, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects. Each audioHolder instance specifies a separate listening test to be paged, each with their own specific requirements.
b@1606 41
b@1606 42 \subsection{Attributes}
b@1606 43 \begin{itemize}
b@1606 44 \item \texttt{id} - Mandatory, String. Give an ID string or number to identify the test in the result.
b@1606 45 \item \texttt{hostURL} - Optional, String. If all tracks are hosted from the same folder on a server, you can put in the lead here. For instance, if loading http://test.com/tracks/track1.wav and http://test.com/tracks/track2.wav, this could equal http://test.com/tracks/ and the url attribute in the track tag can be track1.wav or track2.wav. Equally http://test.com/ and then using tracks/track1.wav and tracks/track2.wav is valid.
b@1606 46 \item \texttt{sampleRate} - Optional, Number. If your test requires a specific sample rate, this should be set to the desired sample rate in Hertz. This does not set the browser to the correct sample rate, but forces the browser to check the sample rate matches. If this is undefined, no sample rate matching will occur.
b@1606 47 \item \texttt{randomiseOrder} - Optional, Boolean String. Defaults to false. Determine if the track order should be randomised. Must be true or false.
b@1606 48 \item \texttt{repeatCount} - Optional, Number. Defaults to 0 (ie: no repeats). The number of times a test should be repeated.
b@1606 49 \item \texttt{loop} - Optional, Boolean String. Defaults to false. Enable if audioElements should loop their playback or not.
b@1606 50 \end{itemize}
b@1606 51
b@1606 52 \subsection{Elements}
b@1606 53 Contain the audioElements tags and the interfaceSetup tag.
b@1606 54
b@1606 55 \section{audioElements tag}
b@1606 56
b@1606 57 This must reside as children in the audioHolder tag. There must be one audioElement tag per sound sample to load into the test.
b@1606 58
b@1606 59 \subsection{Attributes}
b@1606 60 \begin{itemize}
b@1606 61 \item \texttt{id} - Mandatory, String. Must give a string or number to identify each audio element. This id is used in the output to identify each track once randomised.
b@1606 62 \item \texttt{url} - Mandatory, String. Contain the full URL to the track. If the Tracks tag hostURL is set, concatenate this tag with the hostURL attribute to obtain the full URL.
b@1606 63 \end{itemize}
b@1606 64
b@1606 65 \section{interface tag}
b@1606 66
b@1606 67 This is contained within the audioHolder tag and outlines test instance specific requirements. These include the following children tags:
b@1606 68 \begin{itemize}
b@1606 69 \item 'title' - Contains the test title to be shown at the top of the page. Can only be one title node per interface.
b@1606 70 \item 'scale' - Takes the attribute position to be a value between 0 and 100 indicating where on the scale to place the text contained inside. Can be multiple scale tags per interface.
b@1606 71 \end{itemize}
b@1606 72
b@1606 73 \section {CommentQuestion tag}
b@1606 74
b@1606 75 This is a 1st level tag (same level as AudioHolder and setup). This allows another question and comment box to be presented on the page. The results of these are passed back in the results XML with both the comment and the question. The id attribute is set to keep track at the results XML.
b@1606 76
b@1606 77 \section {PreTest tag and PostTest tag}
b@1606 78
b@1606 79 These are 1st level tags. The PreTest tag allows for the specifying of pre test instructions and questions. These appear as a pop-up style window with next buttons and other automatic GUI. The postTest tag allows for specifying post test instructions, questions and resources. These appear as a pop-up style window after the submit button is pressed.
b@1606 80
b@1606 81 \subsection{Attributes}
b@1606 82 None.
b@1606 83
b@1606 84 \subsection{Elements}
b@1606 85 Takes the \texttt{statement} and \texttt{question} tags. The order these are presented in the XML define the order they appear on the screen.
b@1606 86
b@1606 87 \subsubsection{Statement}
b@1606 88
b@1606 89 The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
b@1606 90
b@1606 91 \subsubsection{Question}
b@1606 92
b@1606 93 This allows for a question to be asked pre/post the test. This is added to the response XML in the same location as the other common/global questions. The response includes both the question asked and the response. This takes two attributes, id and mandatory. ID is a mandatory field. The same ID will be used in the results so it is important it is properly entered. Mandatory is optional. True means the field must be entered before continuing.
b@1606 94
b@1606 95 \subsubsection{Resource}
b@1606 96
b@1606 97 The resource tag is only available in the postTest tag. This allows for the linking to some external resource via the href attribute.
b@1606 98
b@1606 99 \section{Metric tag}
b@1606 100 A 1st level tag, metrics must be declared in the setup tag. This takes a set of children 'metricEnable' to define which metrics to collect and present.
b@1606 101
b@1606 102 \subsection{metricEnable tag}
b@1606 103 This takes a single attribute to determine which metric to enable for collection. Some of these are a global, per track or per test instance.
b@1606 104 \begin{itemize}
b@1606 105 \item testTimer - Return the global test timer and test instance timers. Measures the time between the first start and final submit.
b@1606 106 \item elementTimer - Return the total time each audioElement in each test was listened too. Measures time between successive clicks on the track changer
b@1606 107 \item elementTracker - Return the initial position of each track
b@1606 108 \item elementTrackerFull - Return an enumerated pair of time and position. Track the entire movement of each element position. NOTE: Will override the elementTracker option above and throw an error into the browser console.
b@1606 109 \item elementFlagListenedTo - Return a boolean per elementck to see if the element was listened to
b@1606 110 \item elementFlagMoved - Return a boolean per element to see if the element slider was moved.
b@1606 111 \item elementFlagComments - Return a boolean per element to see if the element has comments.
b@1606 112 \end{itemize}
b@1606 113
b@1606 114 \section{Feature List}
b@1606 115 \begin{itemize}
b@1606 116 \item Paging listening tests - eg. Ask multiple questions in each experiment
b@1606 117 \item Labels on X axis - scale
b@1606 118 \item Input questions/comment at top to guide towards the question being asked.
b@1606 119 \item Randomise track numbers -(inc. comment boxes and relate back to correct reference track)
b@1606 120 \item Randomise order of individual tests
b@1606 121 \item Save output XML file to remote server
b@1606 122 \item Tests Metrics
b@1606 123 \begin{itemize}
b@1606 124 \item Duration of listening to each track
b@1606 125 \item Time spent on each individual test
b@1606 126 \item Start and end position of every track
b@1606 127 \item Flags on each track, to ensure each track (but may not restrict users from submitting)
b@1606 128 \begin{itemize}
b@1606 129 \item Has been listened to
b@1606 130 \item Has been moved
b@1606 131 \item Has comments about it
b@1606 132 \end{itemize}
b@1606 133 \end{itemize}
b@1606 134 \end{itemize}
b@1606 135
b@1606 136 \subsection{Advanced feature list}
b@1606 137 \begin{itemize}
b@1606 138 \item Repeat each tests number of times (2 or 3?) to remove learning / experience bias and ensure that the order is consistent
b@1606 139 \item Perform Loudness equalisation on all tracks
b@1606 140 \item Selection of test type
b@1606 141 \item Pre-test of some basic hearing test
b@1606 142 \begin{itemize}
b@1606 143 \item MUSHRA (with vertical slider per track)
b@1606 144 \item APE (Single horizontal slider)
b@1606 145 \item AB Test
b@1606 146 \end{itemize}
b@1606 147 \end{itemize}
b@1606 148
b@1606 149
b@1606 150
b@1606 151 \section{Example}
b@1606 152
b@1606 153 Here is an example XML structure
b@1606 154
b@1606 155 \begin{lstlisting}
b@1606 156 <?xml version="1.0" encoding="utf-8"?>
b@1606 157 <BrowserEvalProjectDocument>
b@1606 158 <setup interface="APE" projectReturn="null" randomiseOrder='true' collectMetrics='true'>
b@1606 159 <PreTest>
b@1606 160 <statement>Please listen to all mixes</statement>
b@1606 161 <question id="location" mandatory="true">Please enter your listening location</question>
b@1606 162 </PreTest>
b@1606 163 <PostTest>
b@1606 164 <statement>Thank you for taking this listening test.</statement>
b@1606 165 <question id="SessionID">Please enter your name.</question>
b@1606 166 </PostTest>
b@1606 167 <Metric>
b@1606 168 <metricEnable>testTimer</metricEnable>
b@1606 169 <metricEnable>elementTimer</metricEnable>
b@1606 170 <metricEnable>elementTracker</metricEnable>
b@1606 171 <metricEnable>elementFlagListenedTo</metricEnable>
b@1606 172 <metricEnable>elementFlagMoved</metricEnable>
b@1606 173 </Metric>
b@1606 174 </setup>
b@1606 175 <audioHolder id='0' hostURL="example_eval/" sampleRate="44100" randomiseOrder='true' repeatCount='1'>
b@1606 176 <interface>
b@1606 177 <title>Example Test Question</title>
b@1606 178 <scale position="0">Min</scale>
b@1606 179 <scale position="100">Max</scale>
b@1606 180 <scale position="50">Middle</scale>
b@1606 181 <scale position="20">20</scale>
b@1606 182 </interface>
b@1606 183 <audioElements url="0.wav" id="0"/>
b@1606 184 <audioElements url="1.wav" id="1"/>
b@1606 185 <audioElements url="2.wav" id="2"/>
b@1606 186 <audioElements url="3.wav" id="3"/>
b@1606 187 <audioElements url="4.wav" id="4"/>
b@1606 188 <audioElements url="5.wav" id="5"/>
b@1606 189 <audioElements url="6.wav" id="6"/>
b@1606 190 <audioElements url="7.wav" id="7"/>
b@1606 191 <audioElements url="8.wav" id="8"/>
b@1606 192 <audioElements url="9.wav" id="9"/>
b@1606 193 <audioElements url="10.wav" id="10"/>
b@1606 194 <CommentQuestion id='mixingExperiance'>What is your mixing experiance</CommentQuestion>
b@1606 195 <PreTest>
b@1606 196 <statement>Start the Test 3</statement>
b@1606 197 </PreTest>
b@1606 198 <PostTest>
b@1606 199 <statement>Please take a break before the next test</statement>
b@1606 200 <question id="testComment">How did you find the test</question>
b@1606 201 </PostTest>
b@1606 202 </audioHolder>
b@1606 203 </BrowserEvalProjectDocument>
b@1606 204 \end{lstlisting}
b@1606 205
b@1606 206
b@1606 207
b@1606 208 \end{document}