-
Notifications
You must be signed in to change notification settings - Fork 29
/
index.html
175 lines (174 loc) · 8.17 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html ng-app="synthApp">
<head>
<title>DX7 Synth</title>
<link rel="stylesheet" type="text/css" href="synth.css">
</head>
<body ng-controller="MidiCtrl as midiCtrl">
<div class="dx7-container" ng-controller="PresetCtrl as presetCtrl">
<div class="dx7-top-panel">
<div class="dx7-logo"></div>
<div class="display">
<div class="lcd-text" ng-bind="presetCtrl.paramDisplayText"></div>
<div id="analysis" class="analysis" ng-click="midiCtrl.onVizClick()"></div>
<select ng-model="presetCtrl.selectedIndex"
ng-change="presetCtrl.onChange($event)"
ng-options="presetCtrl.presets.indexOf(preset) as preset.name for preset in presetCtrl.presets"
class="lcd"></select>
</div>
<div class="dx7-buttons-row-1">
<button class="dx7-button purple" ng-click="midiCtrl.onVizClick()">Viz</button>
<button class="dx7-button teal" ng-click="midiCtrl.onDemoClick(0)">Demo 1</button>
<button class="dx7-button teal" ng-click="midiCtrl.onDemoClick(1)">Demo 2</button>
<button class="dx7-button pink" ng-click="presetCtrl.save()">Save</button>
<button class="dx7-button pink" ng-click="presetCtrl.reset()">Reset</button>
</div>
<div class="dx7-buttons-row-2">
MIDI Device: <select class="dx7-button" id="midiIn"></select>
</div>
</div>
<div class="dx7-operators">
<div class="algorithm-diagram" style="background-image: url(images/algorithm-{{ ('0' + presetCtrl.params.algorithm).slice(-2) }}.svg)"></div>
<div class="operator" ng-repeat="operator in presetCtrl.presets[presetCtrl.selectedIndex].operators | reverse" ng-controller="OperatorCtrl">
<div class="param-group">
<div ng-show="$first" class="param-group-heading heading-algorithm">Algorithm</div>
<div ng-show="$first" class="param-group-heading">Operator</div>
<div class="param">
<div class="param-label">On/Off</div>
<toggle-button ng-model="operator.enabled"></toggle-button>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Level" ng-model="operator.volume"></knob>
</div>
<div class="param">
<knob step="1" min="-50" max="50" to-number label="Pan" ng-model="operator.pan"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="7" to-number label="Vel Sens" ng-model="operator.velocitySens"></knob>
</div>
<div class="param">
<knob step="1" min="-3" max="3" to-number label="LFO Sens" ng-model="operator.lfoAmpModSens"></knob>
</div>
</div>
<div class="param-group">
<div ng-show="$first" class="param-group-heading">Frequency</div>
<div class="param">
<div class="param-label">Fixed</div>
<toggle-button ng-model="operator.oscMode"></toggle-button>
</div>
<div class="param">
<knob step="1" min="0" max="31" to-number ng-if="operator.oscMode == 0" label="Coarse" ng-model="operator.freqCoarse"></knob>
<knob step="1" min="0" max="3" to-number ng-if="operator.oscMode == 1" label="Coarse" ng-model="operator.freqCoarse"></knob>
</div>
<div class="frequency-display" ng-bind="freqDisplay"></div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Fine" ng-model="operator.freqFine"></knob>
</div>
<div class="param">
<knob step="1" min="-7" max="7" to-number label="Detune" ng-model="operator.detune"></knob>
</div>
</div>
<div class="param-group param-group-sliders">
<div ng-show="$first" class="param-group-heading">EG Rate</div>
<div class="param narrow" ng-repeat="i in [0,1,2,3]">
<slider step="1" min="0" max="99" to-number label="EG R{{i+1}}" ng-model="operator.rates[i]"></slider>
</div>
</div>
<div class="param-group param-group-sliders">
<div ng-show="$first" class="param-group-heading">EG Level</div>
<div class="param narrow" ng-repeat="i in [0,1,2,3]">
<slider step="1" min="0" max="99" to-number label="EG L{{i+1}}" ng-model="operator.levels[i]"></slider>
</div>
</div>
<div class="param-group">
<div ng-show="$first" class="param-group-heading">Keyboard Scaling <span style="opacity: 0.2">Not implemented</span></div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Rate" ng-model="operator.keyScaleRate"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Depth" ng-model="operator.keyScaleDepthL"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Curve" ng-model="operator.keyScaleCurveL"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Breakpt" ng-model="operator.keyScaleBreakpoint"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Curve" ng-model="operator.keyScaleCurveR"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Depth" ng-model="operator.keyScaleDepthR"></knob>
</div>
</div>
</div>
</div>
<div class="dx7-bottom-panel">
<div class="param wide">
<knob step="1" min="1" max="32" to-number label="Algorithm" ng-model="presetCtrl.params.algorithm"></knob>
</div>
<div class="param wide">
<knob step="1" min="0" max="7" to-number label="Feedback" ng-model="presetCtrl.params.feedback"></knob>
</div>
<!--
<div class="group-name">LFO</div>
-->
<div class="param extra-wide">
<div class="param-label">Waveform</div>
<select class="dx7-button"
ng-model="presetCtrl.presets[presetCtrl.selectedIndex].lfoWaveform"
ng-change="presetCtrl.onLFOChange()"
ng-options="presetCtrl.lfoWaveformOptions.indexOf(wave) as wave for wave in presetCtrl.lfoWaveformOptions"></select>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Speed" ng-model="presetCtrl.params.lfoSpeed"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Delay" ng-model="presetCtrl.params.lfoDelay"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Amp Mod" ng-model="presetCtrl.params.lfoAmpModDepth"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Pitch Mod" ng-model="presetCtrl.params.lfoPitchModDepth"></knob>
</div>
<div class="param">
<knob step="1" min="0" max="7" to-number label="Pitch Sens" ng-model="presetCtrl.params.lfoPitchModSens"></knob>
</div>
<div class="param">
<div class="param-label">After Touch</div>
<toggle-button ng-true-value="1" ng-false-value="0" ng-model="presetCtrl.params.aftertouchEnabled"></toggle-button>
</div>
<div class="param">
<knob step="1" min="0" max="99" to-number label="Reverb" ng-model="presetCtrl.reverb"></knob>
</div>
<select class="dx7-button"
ng-model="midiCtrl.midiFileIndex"
ng-options="midiCtrl.midiFiles.indexOf(file) as file for file in midiCtrl.midiFiles"></select>
<button class="dx7-button teal" ng-click="midiCtrl.onMidiPlay()">Play</button>
<button class="dx7-button teal" ng-click="midiCtrl.onMidiStop()">Stop</button>
<!-- TODO: Sync and Pitch EG
<div class="param">
<div class="param-label">Sync</div>
<label for="lfoSync">
<toggle-button ng-true-value="1" ng-false-value="0" ng-model="presetCtrl.params.lfoSync"></toggle-button>
</label>
</div>
<div class="param-group param-group-sliders">
<div class="param-group-heading below">Pitch EG Rate</div>
<div class="param narrow" ng-repeat="i in [0,1,2,3]">
<slider step="1" min="0" max="99" to-number label="Pitch R{{i+1}}" ng-model="presetCtrl.params.pitchEnvelope.rates[i]"></slider>
</div>
</div>
<div class="param-group param-group-sliders">
<div class="param-group-heading below">Pitch EG Level</div>
<div class="param narrow" ng-repeat="i in [0,1,2,3]">
<slider step="1" min="0" max="99" to-number label="Pitch L{{i+1}}" ng-model="presetCtrl.params.pitchEnvelope.levels[i]"></slider>
</div>
</div>
-->
</div>
</div>
<script src="bundle.js"></script>
</body>
</html>