# HG changeset patch # User ymh # Date 1422261121 -3600 # Node ID 44320144951a8c52d2e0fd8f696e604c34a1dabf # Parent 0b01cbd8ed9ef4355cc37faa0479b55926175634 add TODO diff -r 0b01cbd8ed9e -r 44320144951a client/annotviz/app/js/annotsvizview.js --- a/client/annotviz/app/js/annotsvizview.js Fri Apr 17 11:48:03 2015 +0200 +++ b/client/annotviz/app/js/annotsvizview.js Mon Jan 26 09:32:01 2015 +0100 @@ -6,7 +6,6 @@ * */ /*jshint unused: false */ - 'use strict'; var PIXI = require('pixi'); @@ -47,17 +46,17 @@ var eventCode = opts.eventCode; var eventCodeSessionDay2 = opts.eventCodeSessionDay2; - var eventCodeSessionDay1 = opts.eventCodeSessionDay1; + var eventCodeSessionDay1 = opts.eventCodeSessionDay1; var logger = opts.logger; - Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories); + Utils.getAnnotCategories(opts.urlCategories + eventCode, this.annotCategories); Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay2, this.annotCategoriesDay2); Utils.getAnnotCategories(opts.urlCategories + eventCodeSessionDay1, this.annotCategoriesDay1); stageView.registerComponent(this); var currentDay = new AnnotsTimeLine.AnnotsTimeLine({ - stageView : stageView, + stageView : stageView, logger: logger, ws: wsAnnot, xInit: 0, @@ -76,9 +75,9 @@ annotCategories: this.annotCategories }); - //Archive day 2 + //Archive day 2 var timeLineDay2 = new AnnotsTimeLine.AnnotsTimeLine({ - stageView : stageView, + stageView : stageView, xInit: 0, yInit: 0, width: 1024 - 200 - 200, @@ -99,9 +98,9 @@ archive: true }); - //Archive day 1 + //Archive day 1 var timeLineDay1 = new AnnotsTimeLine.AnnotsTimeLine({ - stageView : stageView, + stageView : stageView, xInit: 0, yInit: 0, width: 1024 - 200 - 200, diff -r 0b01cbd8ed9e -r 44320144951a client/annotviz/app/js/pianoroll.js --- a/client/annotviz/app/js/pianoroll.js Fri Apr 17 11:48:03 2015 +0200 +++ b/client/annotviz/app/js/pianoroll.js Mon Jan 26 09:32:01 2015 +0100 @@ -5,6 +5,10 @@ * */ +//TODO: add delay to adjust the "zero". this could should be given as an option +//or if explicitely null automatically adjusted from the mean of difference +//between the note timestamp and the current timestamp. + 'use strict'; @@ -84,6 +88,10 @@ var channel = data.content[2]; var sessionTs = data.content[1]; + if(velocity !== 0 && typeof(this.noteDict[channel]) !== 'undefined' && typeof(this.noteDict[channel][note] !== 'undefined')) { + this.addNote(note, ts, sessionTs, 0, channel, 0); + } + this.addNote(note, ts, sessionTs, velocity, channel, 0); };