annotate docs/ProjectSpecificationDocument.tex @ 693:a74cb47e779c

Creation of experimental variables and control methods document
author Dave Moffat <djmoffat@users.noreply.github.com>
date Thu, 09 Apr 2015 12:59:46 +0100
parents
children 869ed636f7c0 375410a5571d
rev   line source
djmoffat@693 1 \documentclass{article}
djmoffat@693 2
djmoffat@693 3 \usepackage[margin=2cm]{geometry}
djmoffat@693 4 \usepackage{listings}
djmoffat@693 5
djmoffat@693 6 \begin{document}
djmoffat@693 7
djmoffat@693 8 \large APE Browser Tool - Project Specification Document
djmoffat@693 9
djmoffat@693 10 \section{Document}
djmoffat@693 11
djmoffat@693 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!
djmoffat@693 13
djmoffat@693 14 \section{Root}
djmoffat@693 15
djmoffat@693 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.
djmoffat@693 17
djmoffat@693 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.
djmoffat@693 19
djmoffat@693 20 The root will also contain the following tags: setup and tracks.
djmoffat@693 21
djmoffat@693 22 \section{Setup tag}
djmoffat@693 23
djmoffat@693 24 The setup tag specifies certain global test settings including: the interface type to use, the project return location and any other setup instructions.
djmoffat@693 25
djmoffat@693 26 An example of this tag could be:
djmoffat@693 27
djmoffat@693 28 \texttt{<setup interface="APE" projectReturn="http://project.return.url/goes/here" />}
djmoffat@693 29
djmoffat@693 30 The setup should not have any element or any children.
djmoffat@693 31
djmoffat@693 32 \subsection{Attributes}
djmoffat@693 33 \begin{itemize}
djmoffat@693 34 \item \texttt{interface} - Mandatory, String. Defaults to APE, otherwise use to load any of the available interfaces. Currently only valid string is APE.
djmoffat@693 35 \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.
djmoffat@693 36 \end{itemize}
djmoffat@693 37
djmoffat@693 38 \subsection{Elements}
djmoffat@693 39 None
djmoffat@693 40
djmoffat@693 41 \section{AudioHolder tag}
djmoffat@693 42
djmoffat@693 43 There should be one audioHolder tag, inside which each audioElement is specified as children. The audioHolder tag can help to generalise certain objects.
djmoffat@693 44
djmoffat@693 45 \subsection{Attributes}
djmoffat@693 46 \begin{itemize}
djmoffat@693 47 \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.
djmoffat@693 48 \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.
djmoffat@693 49 \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.
djmoffat@693 50 \end{itemize}
djmoffat@693 51
djmoffat@693 52 \subsection{Elements}
djmoffat@693 53 Contain the audioElements tags.
djmoffat@693 54
djmoffat@693 55 \section{audioElements tag}
djmoffat@693 56
djmoffat@693 57 This must reside as children in the audioHolder tag. There must be one audioElement tag per sound sample to load into the test.
djmoffat@693 58
djmoffat@693 59 \subsection{Attributes}
djmoffat@693 60 \begin{itemize}
djmoffat@693 61 \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.
djmoffat@693 62 \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.
djmoffat@693 63 \end{itemize}
djmoffat@693 64
djmoffat@693 65 \section {CommentQuestion tag}
djmoffat@693 66
djmoffat@693 67 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.
djmoffat@693 68
djmoffat@693 69 \subsection{Attributes}
djmoffat@693 70 None.
djmoffat@693 71
djmoffat@693 72 \subsection{Elements}
djmoffat@693 73 The question to be presented.
djmoffat@693 74
djmoffat@693 75 \section {PreTest tag and PostTest tag}
djmoffat@693 76
djmoffat@693 77 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.
djmoffat@693 78
djmoffat@693 79 \subsection{Attributes}
djmoffat@693 80 None.
djmoffat@693 81
djmoffat@693 82 \subsection{Elements}
djmoffat@693 83 Takes the \texttt{statement} and \texttt{question} tags. The order these are presented in the XML define the order they appear on the screen.
djmoffat@693 84
djmoffat@693 85 \subsubsection{Statement}
djmoffat@693 86
djmoffat@693 87 The statement tag simply prints the included string verbatim on a 'pop-up' window with a next button.
djmoffat@693 88
djmoffat@693 89 \subsubsection{Question}
djmoffat@693 90
djmoffat@693 91 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.
djmoffat@693 92
djmoffat@693 93 \subsubsection{Resource}
djmoffat@693 94
djmoffat@693 95 The resource tag is only available in the postTest tag. This allows for the linking to some external resource via the href attribute.
djmoffat@693 96
djmoffat@693 97 \section{Example}
djmoffat@693 98
djmoffat@693 99 Here is an example XML structure
djmoffat@693 100
djmoffat@693 101 \begin{lstlisting}
djmoffat@693 102 <?xml version="1.0" encoding="utf-8"?>
djmoffat@693 103 <BrowserEvalProjectDocument>
djmoffat@693 104 <setup interface="APE" projectReturn="null" />
djmoffat@693 105 <AudioHolder hostURL="example_eval/" sampleRate="44100"
djmoffat@693 106 sampleRateExplicit="true">
djmoffat@693 107 <audioElements url="0.wav" ID="0"/>
djmoffat@693 108 <audioElements url="1.wav"/>
djmoffat@693 109 <audioElements url="2.wav"/>
djmoffat@693 110 <audioElements url="3.wav"/>
djmoffat@693 111 <audioElements url="4.wav"/>
djmoffat@693 112 <audioElements url="5.wav"/>
djmoffat@693 113 <audioElements url="6.wav"/>
djmoffat@693 114 <audioElements url="7.wav"/>
djmoffat@693 115 <audioElements url="8.wav"/>
djmoffat@693 116 <audioElements url="9.wav"/>
djmoffat@693 117 <audioElements url="10.wav"/>
djmoffat@693 118 </AudioHolder>
djmoffat@693 119 <CommentQuestion>What is your mixing experiance</CommentQuestion>
djmoffat@693 120 <PreTest>
djmoffat@693 121 <statement>Please listen to all mixes</statement>
djmoffat@693 122 </PreTest>
djmoffat@693 123 <PostTest>
djmoffat@693 124 <statement>Thank you for taking this listening test.</statement>
djmoffat@693 125 <question>Please enter your name.</question>
djmoffat@693 126 </PostTest>
djmoffat@693 127 </BrowserEvalProjectDocument>
djmoffat@693 128 \end{lstlisting}
djmoffat@693 129
djmoffat@693 130
djmoffat@693 131
djmoffat@693 132 \end{document}