annotate docs/ProjectSpecificationDocument.tex @ 1694:49ef6d04d03c

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