-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsynthApp.html
More file actions
323 lines (255 loc) · 12.3 KB
/
synthApp.html
File metadata and controls
323 lines (255 loc) · 12.3 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
<!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</title>
<link rel="stylesheet" href="./css/synthApp.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.30.3/cytoscape.min.js"></script>
<!-- jQuery Library -->
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<!-- jQuery Knob Plugin -->
<script src="https://cdn.jsdelivr.net/npm/jquery-knob@1.2.13/dist/jquery.knob.min.js"></script>
</head>
<body>
<div id="container">
<div id="appHeader">
<h2>Forking Paths: Synth View</h2>
<button class="help-button" id="synthAppHelp">Help</button>
</div>
<div id="synthAndHistoryController">
<div id="cy">
</div>
<canvas id="draw"></canvas>
<div id="mouseTracker"></div>
<div id="cytoscapeTooltipContainer">
<p><h1 id="cytoscapeTooltipText"></h1></p>
<p id="signalAnalysisDisplay"></p>
</div>
<div id="collabPanel">
<div class="mb-4">
<div class="row">
<button class="help-button" id="workspaceAndCollabPanelHelp">Help</button>
</div>
<div class="menubar">
<!-- <div class="menu-item">File -->
<!-- <div class="dropdown"> -->
<!-- <hr> -->
<!-- <button id="newPatchHistory">New Patch History</button> -->
<!-- <input type="file" id="loadPatchHistoryButton" accept=".forkingpaths" /> -->
<!-- <button id="loadPatchHistory">Load Patch History...</button> -->
<!-- <button id="saveButton">Save Patch History</button> -->
<!-- </div> -->
<!-- </div> -->
<div class="menu-item" id="systemDropdown">System
<div class="dropdown">
<button class="action-button" id="settingsButton">Settings</button>
<hr>
<button class="action-button" id="audioToggleButton">Resume Audio</button>
<!-- <button class="action-button" id="audioToggleButton">Resume Audio</button> -->
</div>
</div>
<div class="menu-item flip-left">Give Feedback
<div class="dropdown">
<a href="https://forms.gle/aerpRUgBR7bH1xpB9" target="_blank" rel="noopener noreferrer">
<button class="action-button">Feedback Form</button>
</a>
<hr>
<button class="action-button" id="createGithubIssue">Send Bug Report</button>
</div>
</div>
</div>
<hr>
<h1>Workspace</h1>
<button class=workspaceButton id="openHistoryWindow">Open Patch History</button><br><br>
<button class=workspaceButton id="openSynthBrowser">Open Synth Browser</button><br><br>
<button class=workspaceButton id="openSynthDesigner">Open Synth Designer</button>
<br>
<!-- <hr> -->
<!-- <button class=workspaceButton id="loadPatchHistory">Load Patch History...</button> -->
<hr>
<br>
<!-- <button class=workspaceButton id="savePatchHistory">Save Patch History</button> -->
<div id='drawToolPanel'>
<h2>Draw Tool</h2>
<button class=workspaceButton id="eraseDrawing">Erase Drawing</button>
</div>
</div>
<!-- ! todo: figure out where to place this -->
<!-- <button class="action-button" id="clearGraph">Clear Cables</button> -->
<div class="scale-150">
<h1 class="mb-3">Collaboration Tools</h1>
<div class="mb-4">
<!-- <h2>Patch Histories</h2> -->
<div class="row">
<!-- <button class="btn btn-primary btn-sm me-1 mb-1" onclick="saveCurrentPatch()">Save</button> -->
<!-- <button class="btn btn-outline-secondary btn-sm mb-1" onclick="loadPrivatePatch()">Load Private</button> -->
<!-- <button class="btn btn-success btn-sm me-1 mb-1" onclick="proposeMerge()">Propose Merge</button> -->
<!-- <button class="btn btn-danger btn-sm mb-1" onclick="proposeReplace()">Propose Replace</button> -->
<p>
</div>
<div class="row">
<label for="versionRecallModeSelect" class="form-label">
Version Recall Mode <small class="text-muted">(applies when loading previous versions)</small>
</label>
<select id="versionRecallModeSelect" class="form-select">
<option value="openLoadVersion">Open</option>
<option value="closedLoadVersion">Closed</option>
<option disabled value="requestOpenLoadVersion">By Request</option>
</select>
<small id="remoteVersionRecallMode" class="form-text text-muted">
Remote peer mode: Waiting...
</small>
</div>
</div>
<div class="mb-4">
<h2>Patching Modes</h2>
(Coming soon!)
<div class="form-check">
<input class="form-check-input" type="checkbox" id="editLimitToggle" onchange="toggleEditLimit()">
<label class="form-check-label" for="editLimitToggle">5 Edits Per Turn</label>
</div>
<small class="text-muted" id="turnInfo">Waiting to start…</small>
</div>
<div>
<h2>Status</h2>
<h3 class="text-muted" id="roomInfo">Room: abc123</h3>
<ul class="list-unstyled mb-0">
<li><strong id="username"></strong></li>
<li id="remotePeerUsername">Waiting For Peer...</li>
</ul>
<small class="text-muted" id="lastUpdateTime">Last update: just now</small><br>
</div>
<div class="mb-4">
<!-- <h2>Chat </h2>
(Coming soon!)
<div class="border p-2 mb-2 bg-white" id="chatMessages" style="height: 100px; overflow-y: auto;"></div>
<input type="text" id="chatInput" class="form-control form-control-sm" placeholder="Type message..." onkeydown="if(event.key==='Enter'){sendChat()}"> -->
</div>
</div>
</div>
<div id="settingsOverlay" class="overlay">
<div class="overlay-content">
<h2>Settings</h2>
<button class="close-overlay" id="closeOverlayButton">Close</button>
<hr>
<div class="settings-options">
<!-- Add settings options here -->
<label for="settings_controlPointDistance">Cable Control Point Distance:</label>
<input type="range" id="settings_controlPointDistance" min="0" max="200" step="1" value="20">
<hr>
<p id="settings_sampleRate">coming soon: display sample rate</p>
<div class="container mt-4">
<div class="row align-items-center">
<div class="col-2">
<label for="volumeSlider" class="form-label">Volume</label>
</div>
<div class="col-8">
<input
type="range"
class="form-range"
id="volumeSlider"
min="0"
max="1"
step="0.01"
value="0.5"> <!-- Default to 50% if no saved value -->
</div>
<div class="col-2">
<span id="volumeValue">50%</span>
</div>
<div class="col-2">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="displaySignalAnalysisButton">
<label class="form-check-label" for="flexSwitchCheckDefault">Display Audio Output Analysis (Warning: High CPU Usage)</label>
</div>
</div>
</div>
</div>
<!-- <label>
<input type="checkbox" id="darkModeToggle" />
Enable Dark Mode
</label>
<label>
<input type="range" id="volumeControl" min="0" max="100" value="50" />
Volume
</label>
<label>
<select id="languageSelect">
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
</select>
Language
</label> -->
<!-- Add more settings as needed -->
</div>
</div>
</div>
</div>
<div id="snackbar">Patch history reset</div>
<!-- Hidden overlay container -->
<div id="synthAppHelpOverlay" class="hidden">
<button id="closeHelpOverlay">×</button>
<div id="synthAppHelpOverlayContent"></div>
</div>
<div id="workspaceAndCollabPanelHelpOverlay" class="hidden">
<button id="closeWorkspaceAndCollabPanelHelpOverlay">×</button>
<div id="workspaceAndCollabPanelHelpContent"></div>
</div>
<div id="firstTimeOverlay" style="
position: fixed;
top: 20%;
left: 50%;
transform: translateX(-50%);
background: rgba(0,0,0,0.85);
color: white;
padding: 20px 28px;
border-radius: 10px;
font-size: 30px;
line-height: 1.5;
z-index: 9999;
display: none;
max-width: 500px;
text-align: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
">
Welcome!<br>To get started, look for <button class="help-button">Help</button>
buttons located throughout the app.
<button id="closeFirstTimeOverlay" style="
margin-left: 16px;
background: none;
border: none;
color: #fff;
font-weight: bold;
font-size: 30px;
cursor: pointer;
position: relative;
">[✕] Close</button>
</div>
<div id="synthBrowserOverlay" class="hidden">
<button id="closeSynthBrowserOverlay">×</button>
<div id="browserContent">
<button id="loadDemoSynthButton" class="loadFile-button">Load Demo Synth</button>
<br><br>
<input type="file" id="loadSynthButton" accept=".fpsynth" />
<label for="loadSynthButton" class="loadFile-button">Load Synth From Disk...</label>
<h2>Browse Synth Files</h2>
<div>
<h3>Authors</h3>
<ul id="authorList"></ul>
</div>
<div>
<h3>Tags</h3>
<ul id="tagList"></ul>
</div>
<h3>Synth Files</h3>
<ul id="synthList"></ul>
<div>
</div>
</div>
</div>
<script type="module" src="src/scripts/synthApp.js"></script>
<div id="synthListTooltip"></div>
</body>
</html>