author | rougeronj |
Thu, 16 Apr 2015 11:09:13 +0200 | |
changeset 151 | 8468703ef93c |
parent 108 | 082b64a5c699 |
child 153 | 60bd2b36b9dc |
permissions | -rw-r--r-- |
28 | 1 |
<html> |
2 |
<head> |
|
3 |
<meta charset="UTF-8"> |
|
76
029cdbeebf03
filter pianoroll annotation by channel & event
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
4 |
<title>Piano Roll {{event.label}}</title> |
108 | 5 |
<link href="{{ config['STATIC_URL'] }}/css/annotviz.min.css" rel="stylesheet"> |
28 | 6 |
</head> |
7 |
<body> |
|
76
029cdbeebf03
filter pianoroll annotation by channel & event
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
8 |
<h1>Piano Roll {{event.label}}</h1> |
28 | 9 |
<noscript>You must enable JavaScript</noscript> |
10 |
<div id="canvasContainer"></div> |
|
46 | 11 |
<p> |
108 | 12 |
<a href="#" onclick="stop(); return false;">stop intervals</a> - |
13 |
<a href="#" onclick="start(); return false;">start intervals</a> - |
|
14 |
temps écoulé : <span id="timeStarted"></span> |
|
15 |
</p> |
|
28 | 16 |
<pre id="log"></pre> |
108 | 17 |
<script src="{{ config['STATIC_URL'] }}/js/libs-annotviz.min.js"></script> |
18 |
<script src="{{ config['STATIC_URL'] }}/js/annotviz.min.js"></script> |
|
76
029cdbeebf03
filter pianoroll annotation by channel & event
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
19 |
<script> |
108 | 20 |
var annotationChannel = 'PIANOROLL'; |
21 |
var eventCode = '{{event.code}}'; |
|
22 |
var wsUri; |
|
23 |
if (window.location.protocol === 'file:') { |
|
24 |
wsUri = 'ws://127.0.0.1:8090/broadcast'; |
|
25 |
} |
|
26 |
else { |
|
27 |
wsUri = 'ws://' + window.location.hostname + ':8090/broadcast'; |
|
28 |
} |
|
29 |
wsUri += '?channel='+annotationChannel+'&event_code='+eventCode; |
|
30 |
||
31 |
var logger = new annotviz.HtmlLogger(false, 'log'); |
|
32 |
||
33 |
var stageView = new annotviz.StageView({ |
|
151 | 34 |
logger: logger, |
35 |
sceneWidth: 1024, |
|
108 | 36 |
}); |
151 | 37 |
|
108 | 38 |
var doubleroll = new annotviz.DoubleRoll({ |
151 | 39 |
logger: logger, |
108 | 40 |
stageView: stageView, |
151 | 41 |
ws: new annotviz.WsWrapper(wsUri), |
42 |
orientation: 'horizontal', |
|
43 |
sceneWidth: 1024, |
|
44 |
sceneHeight: 768, |
|
45 |
zeroShift: 1, |
|
46 |
pianorolls : [ |
|
47 |
{ |
|
48 |
height: 384, |
|
49 |
timeWidth: 10, |
|
50 |
lineInterval: 5000, |
|
51 |
noteHeight: undefined, |
|
52 |
range: { |
|
53 |
bottom: 40, |
|
54 |
top: 90, |
|
55 |
}, |
|
56 |
dynamicRange: true, |
|
57 |
}, |
|
58 |
{ |
|
59 |
height: 384, |
|
60 |
timeWidth: 60, |
|
61 |
lineInterval: 5000, |
|
62 |
noteHeight: undefined, |
|
63 |
range:{ |
|
64 |
bottom: 0, |
|
65 |
top: 128, |
|
66 |
}, |
|
67 |
dynamicRange: false, |
|
68 |
}, |
|
69 |
], |
|
108 | 70 |
}); |
151 | 71 |
|
108 | 72 |
|
73 |
function stop() { stageView.stop(); } |
|
74 |
function start() { stageView.start(); } |
|
75 |
||
76 |
window.onload = function() { |
|
77 |
stageView.init(); |
|
78 |
start(); |
|
79 |
} |
|
76
029cdbeebf03
filter pianoroll annotation by channel & event
ymh <ymh.work@gmail.com>
parents:
49
diff
changeset
|
80 |
</script> |
28 | 81 |
</body> |
42
926f0426ce78
add event + event session + admin + category json management. Must rebuild database
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
82 |
</html> |