1 <!DOCTYPE html> |
1 <!DOCTYPE html> |
2 <html lang="en"> |
2 <html lang="en"> |
3 <head> |
3 <head> |
4 <meta charset="utf-8"> |
4 <meta charset="utf-8"> |
5 <meta name="viewport" content="width=device-width,initial-scale=1"> |
5 <meta name="viewport" content="width=device-width,initial-scale=1"> |
6 <meta name="description" content=""> |
6 <meta name="description" content=""> |
7 <meta name="author" content="I.R.I"> |
7 <meta name="author" content="I.R.I"> |
8 <link rel="shortcut icon" href="/img/favicon.ico"> |
8 <link rel="shortcut icon" href="/img/favicon.ico"> |
9 |
9 |
10 <title>Horizontal Piano Roll</title> |
10 <title>Horizontal Piano Roll</title> |
11 |
11 |
12 <!-- Custom styles for this template --> |
12 <!-- Custom styles for this template --> |
13 <link href="/css/annotviz.css" rel="stylesheet"> |
13 <link href="/css/annotviz.css" rel="stylesheet"> |
14 </head> |
14 </head> |
15 |
15 |
16 <body> |
16 <body> |
17 <h1>Horizontal Piano Roll</h1> |
17 <h1>Horizontal Piano Roll</h1> |
18 <noscript>You must enable JavaScript</noscript> |
18 <noscript>You must enable JavaScript</noscript> |
19 <div id="canvasContainer"></div> |
19 <div id="canvasContainer"></div> |
20 <p> |
20 <p> |
21 <a href="#" onclick="stop(); return false;">stop intervals</a> - |
21 <a href="#" onclick="stop(); return false;">stop intervals</a> - <a |
22 <a href="#" onclick="start(); return false;">start intervals</a> - |
22 href="#" onclick="start(); return false;">start intervals</a> - temps |
23 temps écoulé : <span id="timeStarted"></span> |
23 écoulé : <span id="timeStarted"></span> |
24 </p> |
24 </p> |
25 <pre id="log"></pre> |
25 <pre id="log"></pre> |
26 <script src="/js/libs-annotviz.js"></script> |
26 <script src="/js/libs-annotviz.js"></script> |
27 <script src="/js/annotviz.js"></script> |
27 <script src="/js/annotviz.js"></script> |
28 <script> |
28 <script> |
29 var annotationChannel = 'PIANOROLL'; |
29 var annotationChannel = 'PIANOROLL'; |
30 var eventCode = 'test_1'; |
30 var eventCode = 'test_1'; |
31 var wsUri; |
31 var wsUri; |
32 if (window.location.protocol === 'file:') { |
32 if (window.location.protocol === 'file:') { |
33 wsUri = 'ws://127.0.0.1:8090/broadcast'; |
33 wsUri = 'ws://127.0.0.1:8090/broadcast'; |
38 wsUri += '?channel='+annotationChannel+'&event_code='+eventCode; |
38 wsUri += '?channel='+annotationChannel+'&event_code='+eventCode; |
39 |
39 |
40 var logger = new annotviz.HtmlLogger(false, 'log'); |
40 var logger = new annotviz.HtmlLogger(false, 'log'); |
41 |
41 |
42 var stageView = new annotviz.StageView({ |
42 var stageView = new annotviz.StageView({ |
43 logger: logger |
43 logger: logger, |
|
44 sceneWidth: 1280, |
44 }); |
45 }); |
45 |
46 |
46 var doubleroll = new annotviz.DoubleRoll({ |
47 var doubleroll = new annotviz.DoubleRoll({ |
47 logger: logger, |
48 logger: logger, |
48 stageView: stageView, |
49 stageView: stageView, |
49 ws: new annotviz.WsWrapper(wsUri) |
50 ws: new annotviz.WsWrapper(wsUri), |
|
51 orientation: 'horizontal', |
|
52 sceneWidth: 1280, |
|
53 zeroShift: 1, |
|
54 pianorolls : [ |
|
55 { |
|
56 height: 384, |
|
57 timeWidth: 10, |
|
58 lineInterval: 5000, |
|
59 noteHeight: undefined, |
|
60 range: { |
|
61 bottom: 40, |
|
62 top: 90, |
|
63 }, |
|
64 dynamicRange: true, |
|
65 }, |
|
66 { |
|
67 height: 384, |
|
68 timeWidth: 60, |
|
69 lineInterval: 5000, |
|
70 noteHeight: undefined, |
|
71 range:{ |
|
72 bottom: 0, |
|
73 top: 128, |
|
74 }, |
|
75 dynamicRange: false, |
|
76 }, |
|
77 ], |
50 }); |
78 }); |
51 |
79 |
52 function stop() { stageView.stop(); } |
80 function stop() { stageView.stop(); } |
53 function start() { stageView.start(); } |
81 function start() { stageView.start(); } |
54 |
82 |