-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatchHistory.html
More file actions
348 lines (309 loc) · 17.8 KB
/
patchHistory.html
File metadata and controls
348 lines (309 loc) · 17.8 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./assets/favicon.ico" type="image/x-icon">
<title>Forking Paths: Patch History</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.21.1/cytoscape.min.js"></script>
<!-- <link rel="stylesheet" href="historySequencer.css"> -->
<link rel="stylesheet" href="./css/historySequencer.css">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.4/css/bulma.min.css"> -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- Main container -->
<div class="container-fluid h-100">
<div class="row h-100">
<!-- Left Column (File/Database, Peer Stuff, & Query Tool) -->
<div class="col-2 border-end p-2" id="databasePeersAndQueries">
<div class="row h-50">
<div class="row">
<div class="col-9">
<label class="form-label"><h2>Patch Histories</h2></label>
</div>
<div class="col-1">
<button class="help-button" id="patchHistoryToolHelp">Help</button>
</div>
<div id="patchHistoryDatabaseAndFiles">
<button class=workspaceButton2 id="newPatchHistory">New Patch History</button>
<!-- <input type="file" id="loadPatchHistoryButton" accept=".forkingpaths" /> -->
<hr>
<button class=workspaceButton id="savePatchHistory">Save Patch History</button>
<button class=workspaceButton id="loadPatchHistory">Load Patch History</button>
<br>
</div>
</div>
</div>
<hr>
<div class="row h-50">
<div id="historyAnalysis" class="p-3" style="height: 100%;">
<div class="row">
<div class="col-9">
<label class="form-label"><h3>History Query Tool</h3></label>
</div>
<div class="col-1">
<button class="help-button" id="queryToolHelp">Help</button>
</div>
</div>
<div id="getHistoryAnalysisMenuCheckboxes" class="mb-3">
<h5>Change-Based</h5>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="history-paramUpdate"
name="getHistoryAnalysisMenu"
value="paramUpdate"
>
<label class="form-check-label" for="history-paramUpdate">
Param Changes
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="history-getGestures"
name="getHistoryAnalysisMenu"
value="gesture"
>
<label class="form-check-label" for="history-getGestures">
Gestures
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="history-connect"
name="getHistoryAnalysisMenu"
value="connect"
>
<label class="form-check-label" for="history-connect">
Connect Changes
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="history-disconnect"
name="getHistoryAnalysisMenu"
value="disconnect"
>
<label class="form-check-label" for="history-disconnect">
Disconnect Changes
</label>
</div>
<div class="form-check">
<input disabled
class="form-check-input"
type="checkbox"
id="history-getSelectedModuleChanges"
name="getHistoryAnalysisMenu"
value="getSelectedModuleChanges"
>
<label class="form-check-label" for="history-getSelectedModuleChanges">
Selected Module Changes
</label>
</div>
<h5>Graph-Based</h5>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="history-getLeaves"
name="getHistoryAnalysisMenu"
value="leaves"
>
<label class="form-check-label" for="history-getLeaves">
Leaves (Latest Change per Branch)
</label>
</div>
</div>
</div>
</div>
</div>
<!-- Middle Column (Cytoscape History Graph) -->
<div class="col-5 p-2" id="graphColumn">
<div class="row">
<div class="col-4">
<h3>Patch History Graph</h3>
</div>
<div class="col-1">
<button class="help-button" id="historyGraphHelp">Help</button>
</div>
<div class="col-2">
<button class="button" id="showFullGraph">Show Full Graph</button>
</div>
<div class="col-5">
<h5>Zoom: Hold 'z' and scroll with mouse</h5>
</div>
</div>
<div id="docHistory-cy" class="border p-3 full-height overflow-hidden">
<!-- History graph content -->
</div>
</div>
<!-- Right Column (Sequencer + Gesture Editor) -->
<div class="col-5 border-start p-2 d-flex flex-column" id="rightColumn">
<div class="row">
<!-- <div class="col-8 border overflow-auto" id="historyController"> -->
<div class="p-3">
<div class="row">
<div class="row">
<div class="col-5">
<h3>History Sequencer</h3>
</div>
<div class="col-3">
<button class="help-button" id="historySequencerHelp">Help</button>
</div>
<div class="col-2">
<button id="saveSequenceButton" class="btn btn-primary" disabled>Save Sequence</button>
</div>
</div>
<div class="col-6">
<label class="form-label">BPM Slider</label>
<input type="range" id="bpmSlider" min="30" max="300" step="1" value="120" class="form-range">
<p>BPM: <span id="bpmValue">60</span></p>
<button id="startStopSequencerButton" class="btn btn-primary" disabled>Start Sequencer</button>
<button id="clearSequencerButton" class="btn btn-info">Clear Sequencer</button>
</div>
<div class="col-3">
<label class="form-label">Step Length Function</label>
<select id="stepLengthFunction" class="form-select mb-3">
<option value="setAllTo4n">Set all to 4n</option>
<option selected value="userEditable">User Editable</option>
<option disabled value="closenessCentrality">Closeness Centrality</option>
<option value="euclideanDistance">Euclidean Distance</option>
</select>
<label class="form-label">Sequence Order</label>
<select id="sequenceOrder" class="form-select">
<option selected value="forward">Forward</option>
<option disabled value="topologicalSort">Topological Sort</option>
<option value="random">Random</option>
</select>
</div>
<div class="col-3">
<label class="form-label">Playback Mode</label>
<select id="playbackMode" class="form-select">
<option value="mono" selected>Monophonic</option>
<option disabled value="poly">Polyphonic</option>
</select>
<label class="form-label">Empty Step Mode</label>
<select id="emptyStepMode" class="form-select">
<option value="passThrough" selected>Pass-Through</option>
<option value="blank">Blank Patch</option>
<option value="skip">Skip Step</option>
</select>
</div>
</div>
<table class="table table-bordered table-hover mt-3">
<thead>
<tr>
<th></th>
<th>Step [cmd-click to set]</th>
<th>Length</th>
<th></th>
</tr>
</thead>
<tbody id="dynamicTableBody2">
<!-- Rows dynamically added -->
</tbody>
</table>
</div>
</div>
<!-- </div> -->
<div class="row h-50 border">
<div class="d-flex flex-column p-3">
<div class="row">
<div class="col-2">
<h4 class="mb-2">Gesture Editor</h4> <!-- Header with minimal margin -->
<button class="help-button" id="gestureEditorHelp">Help</button>
</div>
<div class="col-1">
<button id="playStopGestureButton" class="btn btn-primary">Play</button>
<div class="form-check form-switch">
<label class="form-check-label" for="flexSwitchCheckDefault">Loop</label>
<input class="form-check-input" type="checkbox" id="loopGesturesButton">
</div>
</div>
<div class="col-2">
<b>Gesture Point Value:</b>
<b><div id="displayPointValue"></div></b>
</div>
<div class="col-2">
<label for="gestureEasing">Ease Function</label>
<select id="gestureEasing" class="form-select mb-0">
<option value="linear" selected>Linear</option>
<option value="inverted">Inverted</option>
<option value="easeIn">Ease In</option>
<option value="easeOut">Ease Out</option>
<option value="easeInOut">Ease In-Out</option>
<option value="easeInExpo">Ease In (Expo)</option>
<option value="easeOutExpo">Ease Out (Expo)</option>
<option value="log">Logarithmic</option>
<option value="easeInOutSine">Ease In-Out (Sine)</option>
<option value="easeOutBack">Ease Out (Back)</option>
<option value="easeOutBounce">Ease Out (Bounce)</option>
<option value="easeOutElastic">Ease Out (Elastic)</option>
<option value="triangle">Triangle</option>
<option value="saw">Sawtooth</option>
<option value="stepped">Stepped</option>
<option value="power">Power (xⁿ)</option>
<option value="bezierEase">Bezier Ease</option>
</select>
</div>
<div class="col-2">
<label for="assignGestureToParam">Assign to Param</label>
<select id="assignGestureToParam" class="form-select mb-0" >
<option value="none" disabled selected>Assign...</option>
</select>
</div>
<div class="col-1">
<button id="saveGestureButton" class="btn btn-primary" disabled>Save Gesture</button>
</div>
</div>
<div id="gestureCyContainer" class="flex-grow-1 border overflow-hidden mt-0">
<div id="gestureCy"></div>
</div>
</div>
</div>
</div>
</div>
<div id="snackbar"></div>
<!-- floating overlay for the graph node info popup -->
<div id="historyNodeOverlay" style="
position: absolute;
pointer-events: none;
background: rgba(255,255,255,0.95);
border: 1px solid #ccc;
border-radius: 6px;
padding: 8px 12px;
font-size: 16px;
color: #333;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
z-index: 9999;
display: none;
"></div>
</div>
<!-- Hidden overlay container -->
<div id="helpOverlay" class="hidden">
<button id="closeHelpOverlay">×</button>
<div id="helpOverlayContent"></div>
</div>
<!-- peer cursor canvas -->
<canvas id="peerCursorsCanvas" style="position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:9999;"></canvas>
<!-- syncd sequencer playback confirmation modal (opens on load if sequencer state from peer and sequencer is currently running) -->
<div id="playbackModal" style="display:none;">
<p>Sequencer is synced with peer and is currently running on their end. Your browser requires a click to enable the sequencer — click below to start.</p>
<button id="startPlaybackButton">Start Playback</button>
</div>
<!-- <div class="peer-cursor" id="peer-cursor">
<div class="cursor-dot"></div>
<div class="cursor-name">Alice</div>
</div> -->
<script type="module" src="/src/scripts/patchHistory.js">
</script>
</body>
</html>