-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
446 lines (423 loc) · 19.7 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
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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./assets/css/style.css?1" />
<link rel="icon" href="./assets/images/favicon.ico" type="image/x-icon" />
<meta name="description"
content="Anglo Piano is a learning and composition tool for Anglo concertina players. Select a note or chord on the piano keyboard to see it highlighted on the Anglo keyboard.">
<title>Anglo Piano</title>
</head>
<body>
<header>
<div>
<image id="logo" src="./assets/images/logo.svg" />
<h1>Anglo Piano</h1>
</div>
<div>
<button id="keyboardShortcutsBtn"></button>
<button id="about">About</a>
</div>
</header>
<div id="viewer">
<div id="default-view-container">
<div id="keyboard-container">
<div id="keyboard">
<!-- piano keys -->
</div>
</div>
<div id="chords">
<button id="major" class="selected" onclick="findChord('maj')">Maj</button><button id="minor"
onclick="findChord('min')">min</button><button id="diminished"
onclick="findChord('dim')">dim</button><button id="seventh"
onclick="findChord('7')">7</button><button id="major7"
onclick="findChord('maj7')">Maj7</button><button id="minor7"
onclick="findChord('min7')">min7</button>
</div>
<div id="anglo-container">
<div id="anglo-keyboard">
<!-- concertina buttons -->
</div>
</div>
<div id="viewer-options">
<div>
<select id="layout">
<!-- layouts -->
</select>
<div>
<button id="editLayoutBtn">Edit layout</button>
<button id="getLinkBtn">Get link</button>
</div>
<div>
<button id="addToLayoutsBtn">Add to your layouts</button>
<button id="removeFromLayoutsBtn">Remove from your layouts</button>
</div>
</div>
<div>
<div>
<input type="radio" id="pushpull" name="bellows" value="pushpull" checked>
<label for="pushpull">push or pull</label>
</div>
<div>
<input type="radio" id="push" name="bellows" value="push">
<label for="push">push only</label>
</div>
<div>
<input type="radio" id="pull" name="bellows" value="pull">
<label for="pull">pull only</label>
</div>
<div id="sound-option">
<input type="checkbox" id="sound" name="sound" checked="checked">
<label for="sound"> Sound</label>
</div>
</div>
<div>
<div>
<input type="checkbox" id="matchoctave" name="matchoctave" checked="checked">
<label for="matchoctave"> Match octave</label>
</div>
<div>
<input type="checkbox" id="multiselect" name="multiselect" value="false">
<label for="multiselect">Select multiple notes [long-press]</label>
</div>
<div>
<input type="checkbox" id="coloroctave" name="coloroctave" value="false">
<label for="coloroctave">Color octaves</label>
</div>
<div>
<input type="checkbox" id="absent-notes" name="absent-notes" value="true" checked="checked">
<label for="absent-notes">Gray out absent notes</label>
</div>
<div>
<input type="checkbox" id="concertina-labels" name="concertina-labels" value="true"
checked="checked">
<label for="concertina-labels">Concertina labels</label>
</div>
<div>
<input type="checkbox" id="piano-labels" name="piano-labels" value="true" checked="checked">
<label for="piano-labels">Piano labels</label>
</div>
<div>
<input type="checkbox" id="accidentals" name="accidentals" value="true">
<label for="accidentals">Alternate accidental spellings</label>
</div>
<div id="highlight-option">
<input type="checkbox" id="highlights" name="highlights" value="true" checked="checked">
<label for="highlights">User highlights</label>
</div>
</div>
</div>
</div>
<div id="composer-container">
<div id="composer">
<div id="composer-controls">
<div>
<select id="composition"></select>
<button id="comp-new">New composition</button>
<button id="comp-import">Import...</button>
<button id="comp-export">Export...</button>
</div>
<div>
<button id="frame-save">Save frame</button>
<button id="frame-update">Update frame</button>
<button id="frame-delete" class="light-destructive">Delete frame</button>
</div>
<div>
<button id="comp-delete" class="light-destructive">Delete composition</button>
</div>
</div>
<div id="timeline-container">
<div id="timeline">
<!-- frames -->
</div>
<div id="playback-controls">
<button id="frame-prev">Prev</button>
<button id="frame-next">Next</button>
</div>
</div>
</div>
</div>
</div>
<div id="editor">
<div id="editor-header">
<input type="text" maxlength="120" id="layoutTitle" placeholder="Untitled layout">
<div id="editor-actions">
<button id="cancelBtn">Cancel</button>
<button id="finishedBtn">Finished</button>
</div>
</div>
<div id="editor-error">
<span class="error-text">Please correct the notes outlined in red. Buttons must have a valid push note and
pull note in the range of D2 - D7. Notes must include octave numbers. Use ‘b’ for flat and ‘#’ for
sharp.</span>
</div>
<div id="editor-anglo-container">
<div id="editor-anglo-keyboard">
<!-- button text inputs -->
</div>
</div>
<div id="editor-options-container">
<div id="mobile-note-picker">
<div>
<div id="mobile-notes">
<button>C</button>
<button>D</button>
<button>E</button>
<button>F</button>
<button>G</button>
<button>A</button>
<button>B</button>
</div>
<div id="mobile-accidental">
<button>♯</button>
<button>♭</button>
</div>
</div>
<div>
<div id="mobile-octave">
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
<button>6</button>
<button>7</button>
</div>
<div id="picker-nav">
<button id="prev-field"><span class="arrow left"></span></button>
<button id="next-field"><span class="arrow right"></span></button>
</div>
</div>
</div>
<div id="editor-options">
<div>
<span>Note:</span>
<button id="noteUp" title="Transpose note up [up]"><span class="arrow up"></button>
<button id="noteDown" title="Transpose note down [down]"><span class="arrow down"></span></button>
</div>
<div>
<span>Button:</span>
<button id="moveLeftBtn" title="Move button left [shift + left]"><span
class="arrow left"></span></button>
<button id="moveRightBtn" title="Move button right [shift + right]"><span
class="arrow right"></span></button>
</div>
<div>
<span>Insert...</span>
<button id="insertLeftBtn" title="Insert a button to the left">Button left</button>
<button id="insertRightBtn" title="Insert a button to the right">Button right</button>
<button id="newRowBtn" title="Insert a new row">New row</button>
</div>
<div>
<span>Delete</span>
<button id="deleteBtn" title="Delete current button [shift + backspace]">Delete button</button>
</div>
<div>
<span>Layout:</span>
<button id="layoutUp" title="Transpose entire layout up"><span class="arrow up"></button>
<button id="layoutDown" title="Transpose entire layout down"><span
class="arrow down"></span></button>
</div>
</div>
</div>
</div>
<!-- About Modal -->
<div id="about-modal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>About Anglo Piano</h2>
<p class="copyright">© 2022-2025 Luke Hillman</p>
<p>Anglo Piano is a learning, composition, and layout exploration tool for Anglo concertina players. You can
use it to figure out how to play difficult melodies and chords, design and share your ideal keyboard
layout, or just use it as a reference to compare different concertinas.</p>
<p>However you end up using it, I’d love to know so I can make improvements! Contact me via <a
href="https://www.concertina.net/forums/index.php?/topic/24636-anglo-piano-webapp/" target="_blank"
rel="noreferrer noopener">concertina.net</a>, <a rel="me noreferrer noopener"
href="https://wandering.shop/@luke" target="_blank">mastodon</a>, <a
href="https://www.youtube.com/lshillman" target="_blank" rel="noreferrer noopener">youtube</a>, or
email to ‘hi’ at this domain.</p>
<p>If you feel like it, you can <a href="https://ko-fi.com/luuke" target="_blank"
rel="noreferrer noopener">buy me a coffee</a>.</p>
<p>Or <a href="https://linkedin.com/in/lshillman/" target="_blank" rel="noreferrer noopener">offer me a
job</a>.</p>
</div>
</div>
<div id="remove-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Remove layout?</h2>
<p id="confirmRemoveMsg">Do you really want to remove LAYOUT_NAME from your layouts?</p>
<div class="modal-actions">
<button id="cancelRemoveBtn" onclick="closeModal()">Cancel</button>
<button id="finalRemoveBtn" class="destructive" onclick="removeUserLayout()">Remove</button>
</div>
</div>
</div>
<div id="add-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Add layout</h2>
<p>What do you want to call this layout?</p>
<input type="text" id="newLayoutName" placeholder="e.g., 'My custom 38b C/G'">
<span class="error-text" id="addLayoutError">Please enter a name for this layout</span>
<div class="modal-actions">
<button id="cancelAddBtn" onclick="closeModal()">Cancel</button>
<button id="addLayoutBtn" class="primary" onclick="addUserLayout()">Add layout</button>
</div>
</div>
</div>
<div id="share-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Get link</h2>
<p>You can share or bookmark this link:</p>
<input type="text" id="shareLink" readonly onclick="selectShareLink()">
<span class="success-text" id="copySuccessMsg">Link copied to clipboard.</span>
<div class="modal-actions">
<button onclick="closeModal()">Close</button>
<button id="copyLinkBtn" class="primary" onclick="copyToClipboard()">Copy link</button>
</div>
</div>
</div>
<div id="new-composition-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>New composition</h2>
<p>Enter a name for the composition:</p>
<input type="text" id="newCompTitle" placeholder="e.g., 'Hot Cross Buns'">
<span class="error-text" id="newCompError">Please enter a name for this composition</span>
<div class="modal-actions">
<button id="cancelCreateCompBtn" onclick="closeModal()">Cancel</button>
<button id="createCompBtn" class="primary">Create composition</button>
</div>
</div>
</div>
<div id="delete-composition-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Delete composition?</h2>
<p id="confirmDeleteCompMsg">Do you really want to delete COMPOSITION_NAME?</p>
<div class="modal-actions">
<button id="cancelDeleteBtn" onclick="closeModal()">Cancel</button>
<button id="finalDeleteBtn" class="destructive" onclick="deleteComposition()">Delete</button>
</div>
</div>
</div>
<div id="import-compositions-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Import compositions</h2>
<form id="upload-form">
<div>
<label for="file">Choose a file to import</label>
<input type="file" id="file" name="file" accept=".txt,.json" />
</div>
<div class="modal-actions">
<button id="cancelImportCompBtn">Cancel</button>
<button id="importCompFileBtn" class="primary" onclick="">Import</button>
</div>
</form>
</div>
</div>
<div id="export-compositions-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Export compositions</h2>
<p>Do you want to export all compositions, or the current one only?</p>
<div>
<input type="radio" id="currentComp" name="export-selection" value="current" checked>
<label for="currentComp">Current composition</label><br>
<input type="radio" id="allComp" name="export-selection" value="all">
<label for="allComp">All compositions</label>
</div>
<div class="modal-actions">
<button onclick="closeModal()">Cancel</button>
<button id="exportCompBtn" class="primary">Export</button>
</div>
</div>
</div>
<div id="parse-error-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Error reading layout</h2>
<p>I did everything I could, but something feels wrong.</p>
<p>Some buttons may be incorrect or missing. If you pasted a link from somewhere, make sure you copied the
whole thing.</p>
<div class="modal-actions">
<button onclick="closeModal()">Roger roger</button>
</div>
</div>
</div>
<div id="keyboard-shortcuts-modal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">×</span>
<h2>Keyboard controls</h2>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">left</span> / <span class="keyboard-button">right</span>
</div>
<div>
select the previous / next piano key
</div>
</div>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">shift</span> + click
</div>
<div>
select multiple notes on either keyboard
</div>
</div>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">1</span> - <span class="keyboard-button">6</span>
</div>
<div>
select chords
</div>
</div>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">esc</span>
</div>
<div>
close dialog boxes like this one
</div>
</div>
<h3>Editor:</h3>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">up</span> / <span class="keyboard-button">down</span>
</div>
<div>
transpose the current note up / down
</div>
</div>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">shift</span> + <span class="keyboard-button">left</span> / <span
class="keyboard-button">right</span>
</div>
<div>
move the current button left / right
</div>
</div>
<div class="keyboard-shortcut">
<div>
<span class="keyboard-button">shift</span> + <span class="keyboard-button">backspace</span>
</div>
<div>
delete the current button
</div>
</div>
</div>
</div>
<script src="./assets/js/notes.js"></script>
<script src="./assets/js/layouts.js"></script>
<script src="./assets/js/viewer.js"></script>
<script src="./assets/js/composer.js"></script>
<script src="./assets/js/editor.js"></script>
</body>
</html>