Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 2059:c5b5a5ee2020
Log slider movements to console
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Wed, 01 Jul 2015 11:35:52 +0100 |
parents | 003e98fdbf51 |
children | 6bd41ef8b1e0 |
comparison
equal
deleted
inserted
replaced
2058:003e98fdbf51 | 2059:c5b5a5ee2020 |
---|---|
31 { | 31 { |
32 }; | 32 }; |
33 | 33 |
34 audioEngineContext.metric.sliderMoved = function() | 34 audioEngineContext.metric.sliderMoved = function() |
35 { | 35 { |
36 | |
37 var id = this.data; | 36 var id = this.data; |
38 this.data = -1; | 37 this.data = -1; |
39 var position = convSliderPosToRate(id); | 38 var position = convSliderPosToRate(id); |
40 console.log('slider ' + id + ': '+ position + ' (' + time + ')'); // DEBUG/SAFETY: show position and slider id | 39 console.log('slider ' + id + ': '+ position + ' (' + time + ')'); // DEBUG/SAFETY: show position and slider id |
41 if (audioEngineContext.timer.testStarted) | 40 if (audioEngineContext.timer.testStarted) |
493 } | 492 } |
494 } | 493 } |
495 var time = audioEngineContext.timer.getTestTime(); | 494 var time = audioEngineContext.timer.getTestTime(); |
496 var id = Number(ev.srcElement.getAttribute('trackindex')); | 495 var id = Number(ev.srcElement.getAttribute('trackindex')); |
497 audioEngineContext.audioObjects[id].metric.moved(time,convSliderPosToRate(ev.srcElement)); | 496 audioEngineContext.audioObjects[id].metric.moved(time,convSliderPosToRate(ev.srcElement)); |
497 console.log('slider '+id+' moved to '+convSliderPosToRate(ev.srcElement)+' ('+time+')'); | |
498 } | 498 } |
499 | 499 |
500 function buttonSubmitClick() // TODO: Only when all songs have been played! | 500 function buttonSubmitClick() // TODO: Only when all songs have been played! |
501 { | 501 { |
502 var checks = testState.currentStateMap[testState.currentIndex].interfaces[0].options; | 502 var checks = testState.currentStateMap[testState.currentIndex].interfaces[0].options; |