annotate docs/ProjectSpecificationDocument.tex @ 1972:422a31f65e70

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