
nicholas@9: \documentclass{article}
nicholas@9: 
nicholas@9: \usepackage[margin=2cm]{geometry}
nicholas@11: \usepackage{listings}
nicholas@9: 
nicholas@9: \begin{document}
nicholas@9: 
nicholas@9: \large APE Browser Tool - Project Specification Document
nicholas@9: 
nicholas@9: \section{Document}
nicholas@9: 
nicholas@9: 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!
nicholas@9: 
nicholas@9: \section{Root}
nicholas@9: 
nicholas@9: 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.
nicholas@9: 
nicholas@9: 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.
nicholas@9: 
nicholas@9: The root will also contain the following tags: setup and tracks.
nicholas@9: 
nicholas@9: \section{Setup tag}
nicholas@9: 
nicholas@9: The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
nicholas@9: 
nicholas@9: An example of this tag could be:
nicholas@9: 
nicholas@9: \texttt{<setup interface="APE" projectReturn="http://project.return.url/goes/here" />}
nicholas@9: 
n@13: The setup should not have any element or any children.
nicholas@9: 
nicholas@9: \subsection{Attributes}
nicholas@9: \begin{itemize}
n@13: \item \texttt{interface} - Mandatory, String. Defaults to APE, otherwise use to load any of the available interfaces. Currently only valid string is APE.
n@13: \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.
nicholas@9: \end{itemize}
nicholas@9: 
nicholas@9: \subsection{Elements}
nicholas@9: None
nicholas@9: 
n@13: \section{AudioHolder tag}
nicholas@9: 
n@13: There should be one audioHolder tag, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects.
nicholas@9: 
nicholas@9: \subsection{Attributes}
nicholas@9: \begin{itemize}
n@13: \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.
n@13: \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.
n@13: \item \texttt{sampleRateExplicit} - Optional, DEPRECATED. A true/false to determine if the sample rate given in the attribute \texttt{sampleRate} must be matched by the system. If the web audio API does not match, a browser alert is called and the rest of the interface loading is discarded. Media files are also not downloaded until this check can be corrected.
nicholas@9: \end{itemize}
nicholas@9: 
nicholas@9: \subsection{Elements}
n@13: Contain the audioElements tags.
nicholas@9: 
n@13: \section{audioElements tag}
nicholas@9: 
n@13: This must reside as children in the audioHolder tag. There must be one audioElement tag per sound sample to load into the test.
nicholas@9: 
nicholas@9: \subsection{Attributes}
nicholas@9: \begin{itemize}
n@13: \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.
n@13: \item \texttt{ID} - Optional, Number. Give the track a specific ID for the return. This will help if using multiple projects to spread a test across multiple sessions and/or locations, where each test will not use all the samples. If one audioElement is given the ID 3, the next audioElement (assuming it does not have an ID set itself) will have the ID of 4. This continues until the next audioElement with the ID attribute set is reached.
nicholas@9: \end{itemize}
nicholas@9: 
n@13: \section {CommentQuestion tag}
n@13: 
n@13: 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.
n@13: 
n@13: \subsection{Attributes}
n@13: None.
n@13: 
n@13: \subsection{Elements}
n@13: The question to be presented.
n@13: 
n@13: \section {PreTest tag and PostTest tag}
n@13: 
n@13: 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.
n@13: 
n@13: \subsection{Attributes}
n@13: None.
n@13: 
n@13: \subsection{Elements}
n@13: Takes the \texttt{statement} and \texttt{question} tags. The order these are presented in the XML define the order they appear on the screen.
n@13: 
n@13: \subsubsection{Statement}
n@13: 
n@13: The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
n@13: 
n@13: \subsubsection{Question}
n@13: 
n@13: 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. The optional attribute 'mandatory' defines whether the question can be blank or not, default is for optional. If mandatory, the next button is not available until something is entered.
n@13: 
n@13: \subsubsection{Resource}
n@13: 
n@13: The resource tag is only available in the postTest tag. This allows for the linking to some external resource via the href attribute.
n@13: 
nicholas@9: \section{Example}
nicholas@9: 
nicholas@11: Here is an example XML structure
nicholas@9: 
nicholas@11: \begin{lstlisting}
nicholas@11: <?xml version="1.0" encoding="utf-8"?>
nicholas@11: <BrowserEvalProjectDocument>
nicholas@11: 	<setup interface="APE" projectReturn="null" />
n@13: 	<AudioHolder hostURL="example_eval/" sampleRate="44100"
nicholas@11: 	sampleRateExplicit="true">
n@13: 		<audioElements url="0.wav" ID=0/>
n@13: 		<audioElements url="1.wav"/>
n@13: 		<audioElements url="2.wav"/>
n@13: 		<audioElements url="3.wav"/>
n@13: 		<audioElements url="4.wav"/>
n@13: 		<audioElements url="5.wav"/>
n@13: 		<audioElements url="6.wav"/>
n@13: 		<audioElements url="7.wav"/>
n@13: 		<audioElements url="8.wav"/>
n@13: 		<audioElements url="9.wav"/>
n@13: 		<audioElements url="10.wav"/>
n@13: 	</AudioHolder>
n@13: 	<CommentQuestion>What is your mixing experiance</CommentQuestion>
n@13: 	<PreTest>
n@13: 		<statement>Please listen to all mixes</statement>
n@13: 	</PreTest>
n@13: 	<PostTest>
n@13: 		<statement>Thank you for taking this listening test.</statement>
n@13: 		<question>Please enter your name.</question>
n@13: 	</PostTest>
nicholas@9: </BrowserEvalProjectDocument>
nicholas@11: \end{lstlisting}
nicholas@11: 
nicholas@9: 
nicholas@9: 
nicholas@9: \end{document}




