This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·78 lines (49 loc) · 1.64 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<html>
<head>
<script type="text/javascript" src="./modular.this.js"></script>
<link rel="stylesheet" href="style.css">
<style>
</style>
</head>
<body>
<center>
<div id='ui' style="width: 960px; height: 800px;">
<canvas width="960" height="200" id="canvas" class="waveform"></canvas>
<div style="width: 100%;" class="panel"></div>
<div style="width: 100%;height: 10%" class="menu"></div>
<div style="width: 960px; height: 600px; overflow: scroll;">
<svg width="1500" height="960" class="patchzone"></svg>
</div>
</div>
</center>
<script type="text/javascript">
start();
function start() {
/*
var lfo2 = new modular.create('Oscillator', {frequency: 5});
var lfo2Gain = new modular.create('NativeGain', {gain: 20.0});
*/
modular.setContainer('ui');
//var lfo1 = new modular.create('Oscillator', {frequency: 0.5});
//
//modular.patch(lfo2, lfo2Gain);
//
//modular.patch(lfo1, gain, 'gain');
var osc = new modular.create('Identity', {frequency: 440});
//var gain = new modular.create('NativeGain');
//gain.knob('gain').value = 1.0;
//modular.patch(osc, gain);
//modular.patch(lfo1, osc, 'frequency');
modular.patchToDevice(osc, 1.0);
modular.refresh();
var canvas = document.getElementById('canvas');
//var rmsMonitor = new modular.show('RMSMeter', {knob: osc.knob('frequency'), canvasElement: canvas, frameRateFps: 50});
var oscilloscopeMonitor = new modular.show('Oscilloscope', {
knob: osc.output,
canvasElement: canvas,
label: 'Osc'
});
}
</script>
</body>
</html>