Mercurial > hg > webaudioevaluationtool
changeset 2354:ce406455f25b
Merge branch 'master' into Dev_main
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 16 May 2016 13:32:11 +0100 |
parents | 795fe4edf2c1 (diff) ceaccbd708cb (current diff) |
children | 33d2c4fd2625 |
files | js/core.js |
diffstat | 3 files changed, 89 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/css/core.css Mon May 16 13:30:41 2016 +0100 +++ b/css/core.css Mon May 16 13:32:11 2016 +0100 @@ -169,12 +169,25 @@ background-color: #000; } -div#master-volume-holder { - width: 250px; - float: left; +div.master-volume-holder-inline { + width: 100%; + padding: 5px; +} + +div.master-volume-holder-float { + position: absolute; + top: 20px; + left: 50px; + width: 250px%; + padding: 5px; +} + +div#master-volume-root { + margin:auto; border: black 1px solid; border-radius: 5px; - padding: 5px; + width: 250px; + height: 40px; } input#master-volume-control {
--- a/js/core.js Mon May 16 13:30:41 2016 +0100 +++ b/js/core.js Mon May 16 13:32:11 2016 +0100 @@ -1202,6 +1202,8 @@ this.metric = new sessionMetrics(this,specification); this.loopPlayback = false; + this.synchPlayback = false; + this.pageSpecification = null; this.pageStore = null; @@ -1409,7 +1411,8 @@ } else { interfaceContext.playhead.setTimePerPixel(this.audioObjects[id]); } - if (this.loopPlayback) { + if (this.synchPlayback && this.loopPlayback) { + // Traditional looped playback var setTime = audioContext.currentTime+specification.crossFade; for (var i=0; i<this.audioObjects.length; i++) { @@ -1420,7 +1423,7 @@ this.audioObjects[i].loopStop(setTime); } } - } else { + } else { var setTime = audioContext.currentTime+specification.crossFade; for (var i=0; i<this.audioObjects.length; i++) { @@ -1491,6 +1494,7 @@ this.newTestPage = function(audioHolderObject,store) { this.pageStore = store; + this.pageSpecification = audioHolderObject; this.status = 0; this.audioObjectsReady = false; this.metric.reset(); @@ -1501,6 +1505,7 @@ this.audioObjects = []; this.timer = new timer(); this.loopPlayback = audioHolderObject.loop; + this.synchPlayback = audioHolderObject.synchronous; }; this.checkAllPlayed = function() { @@ -1655,7 +1660,7 @@ event.currentTarget.owner.stop(audioContext.currentTime+1); } }; - if (this.bufferNode.loop == false) { + if (!audioEngineContext.loopPlayback || !audioEngineContext.synchPlayback) { this.metric.startListening(audioEngineContext.timer.getTestTime()); this.outputGain.gain.setValueAtTime(this.onplayGain,startTime); this.interfaceDOM.startPlayback(); @@ -1977,6 +1982,7 @@ this.resizeWindow = function(event) { popup.resize(event); + this.volume.resize(); for(var i=0; i<this.commentBoxes.length; i++) {this.commentBoxes[i].resize();} for(var i=0; i<this.commentQuestions.length; i++) @@ -2574,8 +2580,11 @@ // Volume does NOT reset to 0dB on each page load this.valueLin = 1.0; this.valueDB = 0.0; + this.root = document.createElement('div'); + this.root.id = 'master-volume-root'; this.object = document.createElement('div'); - this.object.id = 'master-volume-holder'; + this.object.className = 'master-volume-holder-float'; + this.object.appendChild(this.root); this.slider = document.createElement('input'); this.slider.id = 'master-volume-control'; this.slider.type = 'range'; @@ -2618,10 +2627,18 @@ title.style.fontSize = '0.75em'; title.style.width = "100%"; title.align = 'center'; - this.object.appendChild(title); + this.root.appendChild(title); - this.object.appendChild(this.slider); - this.object.appendChild(this.valueText); + this.root.appendChild(this.slider); + this.root.appendChild(this.valueText); + + this.resize = function(event) { + if (window.innerWidth < 1000) { + this.object.className = "master-volume-holder-inline" + } else { + this.object.className = 'master-volume-holder-float'; + } + } } this.calibrationModuleObject = null;
--- a/test_create/interface-specs.xml Mon May 16 13:30:41 2016 +0100 +++ b/test_create/interface-specs.xml Mon May 16 13:32:11 2016 +0100 @@ -262,12 +262,35 @@ </scale> </scaledefinitions> <tests> - <test name="APE" interface="APE"/> - <test name="vertical-sliders" interface="MUSHRA"/> - <test name="horizontal-sliders" interface="horizontal"/> - <test name="discrete" interface="discrete"/> - <test name="Comparison" interface="AB"/> + <test name="APE" interface="APE"> + <descriptions> + <description lang="en">Audio Perceptual Evaluation. A multi-stimulus test where each audio fragment is shown on one continuous slider. Fragments are randomnly positioned along the slider. The user clicks a fragment to play and drags to move.</description> + </descriptions> + </test> + <test name="vertical-sliders" interface="MUSHRA"> + <descriptions> + <description lang="en">Each element is given its own vertical slider with user defined scale markers.</description> + </descriptions> + </test> + <test name="horizontal-sliders" interface="horizontal"> + <descriptions> + <description lang="en">Each element is given its own horizontal slider with user defined scale markers.</description> + </descriptions> + </test> + <test name="discrete" interface="discrete"> + <descriptions> + <description lang="en">Each element is given a horizontal scale broken into a number of discrete choices. The number of choices is defined by the scale markers.</description> + </descriptions> + </test> + <test name="Comparison" interface="AB"> + <descriptions> + <description lang="en">An N-way comparison test. Each element is given its own selector box. The user can select one element per page for submission.</description> + </descriptions> + </test> <test name="MUSHRA" interface="MUSHRA"> + <descriptions> + <description lang="en">Multi-stimulus with hidden reference and anchor. Each fragment is shown on its own vertical slider. One fragment must be labelled as a reference and another labelled as an anchor. One external reference must also be shown.</description> + </descriptions> <checks> <entry name="fragmentMoved" support="none"/> <entry name="fragmentPlayed" support="none"/> @@ -289,6 +312,9 @@ <scale name="ACR"/> </test> <test name="Rank" interface="discrete"> + <descriptions> + <description lang="en">Each stimulus is placed on a discrete scale equalling the number of fragments. The fragments are then ranked based on the question posed. Only one element can occupy a rank position</description> + </descriptions> <checks> <entry name="fragmentPlayed" support="none"/> <entry name="fragmentFullPlayback" support="none"/> @@ -303,6 +329,9 @@ <scale name="undefined"/> </test> <test name="Likert" interface="discrete"> + <descriptions> + <description lang="en">Each stimulus is placed on a discrete scale. The scale is fixed to the Likert scale options of 'Strongly Disagree', 'Disagree', 'Neutral', 'Agree' and 'Strongly Agree'</description> + </descriptions> <checks> <entry name="fragmentPlayed" support="none"/> <entry name="fragmentFullPlayback" support="none"/> @@ -317,6 +346,9 @@ <scale name="Likert"/> </test> <test name="ABC/HR" interface="MUSHRA"> + <descriptions> + <description lang="en">Each stimulus is placed on a vertical slider. The scale is fixed with the labels 'Imperceptible' to 'Very Annoying'</description> + </descriptions> <checks> <entry name="fragmentMoved" support="none"/> <entry name="fragmentPlayed" support="none"/> @@ -332,6 +364,9 @@ <scale name="ABC"/> </test> <test name="Bipolar" interface="horizontal"> + <descriptions> + <description lang="en">Each stimulus is placed on a horizontal slider and initialised to the value '0'. The scale operates from -50 to +5-. In the results this is normalised, like all other interfaces, from 0 (-50) to 1 (+50).</description> + </descriptions> <checks> <entry name="fragmentMoved" support="mandatory"/> <entry name="fragmentPlayed" support="none"/> @@ -350,7 +385,11 @@ <scale name="Bipolar"/> </test> <test name="ACR" interface="discrete"> + <descriptions> + <description lang="en">Absolute Category Rating. Each element is on a discrete scale of 'Bad', 'Poor', 'Fair', 'Good' and 'Excellent'. Each element must be given a rating.</description> + </descriptions> <checks> + <entry name="fragmentMoved" support="mandatory"/> <entry name="fragmentPlayed" support="none"/> <entry name="fragmentFullPlayback" support="none"/> <entry name="fragmentComments" support="none"/> @@ -428,6 +467,9 @@ <scale name="ABC"/> </test> <test name="AB" interface="AB"> + <descriptions> + <description lang="en">Each page has only two audio fragments. The user must select one of the two fragments to proceed. There can be one hidden reference.</description> + </descriptions> <checks> <entry name="fragmentPlayed" support="none"/> <entry name="fragmentFullPlayback" support="none"/> @@ -441,7 +483,7 @@ </show> <elements> <number min="2" max="2"/> - <outsidereference min="0" max="0"/> + <outsidereference min="0" max="1"/> </elements> </test> <test name="ABX" interface="ABX"/>