Mercurial > hg > webaudioevaluationtool
changeset 2245:152eada7bd03
Merge branch 'Dev_main'
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 18 Apr 2016 19:49:25 +0100 |
parents | 27f3cbb3a960 (current diff) 1e1b689e2a60 (diff) |
children | d052405e29e2 ae2bf6a1693e |
files | test_create/test_core.js |
diffstat | 5 files changed, 43 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Apr 15 15:56:45 2016 +0100 +++ b/js/core.js Mon Apr 18 19:49:25 2016 +0100 @@ -1174,6 +1174,8 @@ } else { audioContext.decodeAudioData(bufferObj.xmlRequest.response, function(decodedData) { bufferObj.buffer = decodedData; + bufferObj.status = 2; + calculateLoudness(bufferObj,"I"); }, function(e){ // Should only be called if there was an error, but sometimes gets called continuously // Check here if the error is genuine
--- a/js/specification.js Fri Apr 15 15:56:45 2016 +0100 +++ b/js/specification.js Mon Apr 18 19:49:25 2016 +0100 @@ -370,6 +370,11 @@ var node = doc.createElement("interface"); if (typeof name == "string") node.setAttribute("name",this.name); + if (typeof this.title == "string") { + var titleNode = doc.createElement("title"); + titleNode.textContent = this.title; + node.appendChild(titleNode); + } for (var option of this.options) { var child = doc.createElement("interfaceoption");
--- a/scripts/evaluation_stats.py Fri Apr 15 15:56:45 2016 +0100 +++ b/scripts/evaluation_stats.py Mon Apr 18 19:49:25 2016 +0100 @@ -81,17 +81,18 @@ # number of comments (interesting if comments not mandatory) for audioelement in audioelements: - response = audioelement.find("./comment/response") - was_played = audioelement.find("./metric/metricresult/[@name='elementFlagListenedTo']") - was_moved = audioelement.find("./metric/metricresult/[@name='elementFlagMoved']") - if response.text is not None and len(response.text) > 1: - number_of_comments += 1 - else: - number_of_missing_comments += 1 - if was_played is not None and was_played.text == 'false': - not_played += 1 - if was_moved is not None and was_moved.text == 'false': - not_moved += 1 + if audioelement.get("type") != "outside-reference": + response = audioelement.find("./comment/response") + was_played = audioelement.find("./metric/metricresult/[@name='elementFlagListenedTo']") + was_moved = audioelement.find("./metric/metricresult/[@name='elementFlagMoved']") + if response.text is not None and len(response.text) > 1: + number_of_comments += 1 + else: + number_of_missing_comments += 1 + if was_played is not None and was_played.text == 'false': + not_played += 1 + if was_moved is not None and was_moved.text == 'false': + not_moved += 1 # update global counters total_empty_comments += number_of_missing_comments
--- a/scripts/timeline_view_movement.py Fri Apr 15 15:56:45 2016 +0100 +++ b/scripts/timeline_view_movement.py Mon Apr 18 19:49:25 2016 +0100 @@ -116,7 +116,7 @@ # get move events, initial and eventual position initial_position = float(initial_position_temp.text) - move_events = audioelement.findall("./metric/metricresult/[@name='elementTrackerFull']/timepos") + move_events = audioelement.findall("./metric/metricresult/[@name='elementTrackerFull']/movement") final_position = float(audioelement.find("./value").text) # get listen events @@ -144,8 +144,8 @@ plot_empty = False # get time and final position of move event - new_time = float(event.find("./time").text)-time_offset - new_position = float(event.find("./position").text) + new_time = float(event.get("time"))-time_offset + new_position = float(event.get("value")) # get play/stop events since last move until current move event stop_times = []
--- a/test_create/test_core.js Fri Apr 15 15:56:45 2016 +0100 +++ b/test_create/test_core.js Mon Apr 18 19:49:25 2016 +0100 @@ -1586,6 +1586,27 @@ this.buttonDOM = obj.buttonsDOM; this.HTMLPoint = parent; this.rootDOM.removeChild(this.attributeDOM); + if (parent.id != "setup") { + // Put in the <title> node: + this.titleNode = { + root: document.createElement("div"), + label: document.createElement("span"), + input: document.createElement("input"), + parent: this, + handleEvent: function(event) { + this.parent.specification.title = event.currentTarget.value; + } + } + this.titleNode.label.textContent = "Axis Title:"; + this.titleNode.root.className = "node-children"; + this.titleNode.root.appendChild(this.titleNode.label); + this.titleNode.root.appendChild(this.titleNode.input); + this.titleNode.input.addEventListener("change",this.titleNode,false); + this.titleNode.input.value = this.specification.title; + this.children.push(this.titleNode); + this.childrenDOM.appendChild(this.titleNode.root); + } + // Put in the check / show options as individual children var checks = this.parent.createGeneralNodeDOM("Checks","setup-interface-checks",this);