-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.php
2855 lines (2559 loc) · 152 KB
/
index.php
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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
if (false) die('DeepSID is being updated. Please return again in a few minutes.');
require_once("php/class.account.php"); // Includes setup
$user_id = $account->CheckLogin() ? $account->UserID() : 0;
require_once("tracking.php"); // Also called every 5 minutes by 'main.js'
// @link https://stackoverflow.com/a/60199374/2242348
// $inside_iframe = isset($_SERVER['HTTP_SEC_FETCH_DEST']) && $_SERVER['HTTP_SEC_FETCH_DEST'] == 'iframe';
// Detect and block if the URL contains unwanted characters
// Example: https://deepsid.chordian.net/?file=%22%3E%3Ch1%3Efoobarbaz
$special_chars = array('[', ']', '<', '>', ';', ',', '"', '*');
$url = urldecode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
foreach ($special_chars as $char)
if (strpos($url, $char) !== false)
die("Malignant switch contents detected. Please fix the URL and try again.");
function MiniPlayer() {
return isset($_GET['mini'])
? $_GET['mini']
: 0;
}
function isMobile() {
return isset($_GET['mobile'])
? $_GET['mobile']
: preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
function isEmulator($emulator) {
return (isset($_GET['emulator']) && strtolower($_GET['emulator']) == $emulator) ||
(isset($_COOKIE['emulator']) && strtolower($_COOKIE['emulator']) == $emulator);
}
function isLemon() {
$lemon = isset($_GET['lemon']) ? $_GET['lemon'] : 0;
if ($lemon) {
if (!isset($_SESSION)) session_start();
$_SESSION['lemon'] = true;
return true;
} else if (!isset($_GET['lemon']) && isset($_SESSION) && isset($_SESSION['lemon'])) {
return true;
} else {
if (!isset($_SESSION)) session_start();
$_SESSION['lemon'] = null;
unset($_SESSION['lemon']);
return false;
}
}
?>
<!DOCTYPE html>
<html lang="en-US" style="overflow:scroll-x;">
<head>
<meta charset="utf-8" />
<script type="text/javascript">
var viewport = document.createElement("meta");
viewport.setAttribute("name", "viewport");
viewport.setAttribute("content", "width="+(screen.width < 450 ? "450" : "1320"));
document.head.appendChild(viewport);
</script>
<meta name="description" content="A modern online SID player for the High Voltage and Compute's Gazette SID collections." /> <!-- Max 150 characters -->
<meta name="keywords" content="c64,commodore 64,sid,6581,8580,hvsc,high voltage,cgsc,compute's gazette,visualizer,stil,websid,hermit,asid,webusb,usbsid" />
<meta name="author" content="Jens-Christian Huus" />
<title>DeepSID | Chordian.net</title>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans%3A400%2C700%2C400italic%2C700italic%7CQuestrial%7CMontserrat&subset=latin%2Clatin-ext" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Asap+Condensed" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Kanit" />
<link rel="stylesheet" type="text/css" href="//blog.chordian.net/wordpress/wp-content/themes/olivi/style.css" />
<link rel="stylesheet" type="text/css" href="css/chartist.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<?php if (isLemon()): ?>
<!-- For Lemon64: START -->
<link rel="stylesheet" type="text/css" href="https://www.lemon64.com/assets/external/deepsid/style.css" />
<!-- For Lemon64: END -->
<?php endif ?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
var supportsWASM = false;
try { // @link https://stackoverflow.com/a/47880734/2242348
if (typeof WebAssembly === "object"
&& typeof WebAssembly.instantiate === "function") {
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
if (module instanceof WebAssembly.Module)
supportsWASM = new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
} catch (e) { /* Nothing */ }
if (!supportsWASM) {
document.write('\
<div style="padding-left:24px;">\
<h2>WebAssembly not detected</h2>\
<p>DeepSID needs WASM for its most advanced SID emulators.</p>\
</div>\
');
window.stop();
}
window.WASM_SEARCH_PATH = "js/handlers/"; // Used by all of JW's emulators
</script>
<?php if (isset($_GET['websiddebug'])): ?>
<script type="text/javascript" src="http://www.wothke.ch/tmp/scriptprocessor_player.min.js"></script>
<script type="text/javascript" src="http://www.wothke.ch/tmp/backend_websid.js"></script>
<?php else: ?>
<script type="text/javascript" src="js/handlers/scriptprocessor_player.min.js"></script>
<script type="text/javascript" src="js/handlers/backend_tinyrsid.js"></script>
<script type="text/javascript" src="js/handlers/backend_websid.js"></script>
<script type="text/javascript" src="js/handlers/backend_websidplay.js"></script>
<?php endif ?>
<!--<script type="text/javascript" src="js/handlers/jsidplay2.js"></script>-->
<script type="text/javascript" src="js/handlers/jsSID-modified.js"></script>
<script type="text/javascript" src="js/handlers/howler.min.js"></script>
<script type="text/javascript" src="js/chartist.min.js"></script>
<?php // @link https://github.com/madmurphy/cookies.js ?>
<script type="text/javascript" src="js/cookies.min.js"></script>
<script type="text/javascript" src="js/select.js"></script>
<script type="text/javascript" src="js/player.js"></script>
<script type="text/javascript" src="js/controls.js"></script>
<script type="text/javascript" src="js/browser.js"></script>
<script type="text/javascript" src="js/lib/opl.js"></script>
<script type="text/javascript" src="js/opljs-if.js"></script>
<?php if (isset($_GET['websiddebug'])): ?>
<script type="text/javascript" src="http://www.wothke.ch/tmp/channelstreamer.js"></script>
<?php else: ?>
<script type="text/javascript" src="js/handlers/channelstreamer.min.js"></script>
<?php endif ?>
<script type="text/javascript" src="js/viz.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<?php if (isLemon()): ?>
<!-- For Lemon64: START -->
<script type="text/javascript" src="https://www.lemon64.com/assets/external/deepsid/main.js"></script>
<!-- For Lemon64: END -->
<?php endif ?>
<script type="text/javascript">
var colorTheme = 0;
function setTheme() {
colorTheme = localStorage.getItem("theme");
if (colorTheme == 1)
$("body").attr("data-theme", "dark");
}
</script>
<link rel="icon" href="images/deepsid_icon_32x32.png" sizes="32x32" />
<link rel="apple-touch-icon-precomposed" href="//chordian.net/images/avatar_c_olivi_128x128.png" />
<meta name="msapplication-TileImage" content="//chordian.net/images/avatar_c_olivi_128x128.png" />
<?php // @link https://developers.facebook.com/tools/debug/sharing/ and https://cards-dev.twitter.com/validator ?>
<meta property="fb:app_id" content="285373918828438" />
<meta property="og:title" content="<?php
// Example: Rob Hubbard - Commando
$file = isset($_GET['file']) ? $_GET['file'] : '';
if (empty($file) || substr($file, 0, 2) == '/!' || substr($file, 0, 2) == '/$') {
echo 'DeepSID';
} else {
if (substr($file, 0, 6) == '/DEMOS' || substr($file, 0, 6) == '/GAMES' || substr($file, 0, 10) == '/MUSICIANS')
$file = '_High Voltage SID Collection'.$file;
else if (substr($file, 0, 12) == '/SID Happens')
$file = str_replace('/SID', '_SID', $file);
try {
if ($_SERVER['HTTP_HOST'] == LOCALHOST)
$db = new PDO(PDO_LOCALHOST, USER_LOCALHOST, PWD_LOCALHOST);
else
$db = new PDO(PDO_ONLINE, USER_ONLINE, PWD_ONLINE);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->exec("SET NAMES UTF8");
if (substr($file, -4) == '.sid' || substr($file, -4) == '.mus') {
// It's a specific file
$select = $db->query('SELECT name, author FROM hvsc_files WHERE fullname = "'.$file.'" LIMIT 1');
$select->setFetchMode(PDO::FETCH_OBJ);
if ($select->rowCount()) {
// Rob Hubbard - Commando
$row = $select->fetch();
$author = $row->author;
if (substr($author, -1) == ')')
// If the handle is present in brackets, only show that
$author = substr($author, strrpos($author, '(') + 1, -1);
$title = $author.' - '.$row->name;
} else {
// Fallback: Commando.sid
$array = explode('/', $file);
$title = substr(end($array), 0);
}
} else {
// It's a composer folder
$select = $db->query('SELECT name FROM composers WHERE fullname = "'.substr($file, 0, -1).'" LIMIT 1');
$select->setFetchMode(PDO::FETCH_OBJ);
if ($select->rowCount()) {
// Rob Hubbard
$title = $select->fetch()->name;
} else {
// Fallback: Composer
$title = 'Composer';
}
}
} catch(PDOException $e) {
// Use default then
$title = 'DeepSID';
}
echo $title;
}
?>" />
<meta property="og:type" content="website" />
<meta property="og:image" content="<?php
function MergeImage($image) {
// @link https://stackoverflow.com/a/2269459/2242348
$png = imagecreatefrompng('images/og_overlay.png');
$jpeg = imagecreatefromjpeg('images/composers/'.$image);
list($width, $height) = getimagesize('images/composers/'.$image);
list($newwidth, $newheight) = getimagesize('images/og_overlay.png');
$out = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($out, $jpeg, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagecopyresampled($out, $png, 0, 0, 0, 0, $newwidth, $newheight, $newwidth, $newheight);
// 100 is best quality
imagejpeg($out, $_SERVER['DOCUMENT_ROOT'].'/deepsid/images/composers/play/'.$image, 100);
echo HOST.'images/composers/play/'.$image;
}
if (isset($_GET['file']) && (strtolower(substr($_GET['file'], 0, 10))) == '/musicians') {
$file = substr($_GET['file'], -4) == '.sid'
? substr($_GET['file'], 0, strrpos($_GET['file'], '/'))
: $_GET['file'];
$image = strtolower(str_replace('/', '_', trim($file, '/'))).'.jpg';
if (file_exists('images/composers/'.$image))
if (substr($_GET['file'], -4) == '.sid' || substr($_GET['file'], -4) == '.mus')
MergeImage($image);
else
echo 'https://chordian.net/deepsid/images/composers/'.$image;
else if (substr($_GET['file'], -4) == '.sid')
echo 'https://chordian.net/deepsid/images/example_play.png';
else
echo 'https://chordian.net/deepsid/images/composer.png';
} else if (isset($_GET['file']) && (strtolower(substr($_GET['file'], 0, 12))) == '/sid happens') {
$image = '';
try {
if ($_SERVER['HTTP_HOST'] == LOCALHOST)
$db = new PDO(PDO_LOCALHOST, USER_LOCALHOST, PWD_LOCALHOST);
else
$db = new PDO(PDO_ONLINE, USER_ONLINE, PWD_ONLINE);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->exec("SET NAMES UTF8");
// Get the ID of the SH file
$select = $db->prepare('SELECT id FROM hvsc_files WHERE fullname = :fullname LIMIT 1');
$select->execute(array(':fullname'=>str_replace('/SID', '_SID', $_GET['file'])));
$select->setFetchMode(PDO::FETCH_OBJ);
if ($select->rowCount()) {
// Get the ID of the composer profile
$select_upload = $db->query('SELECT composers_id FROM uploads WHERE files_id = '.$select->fetch()->id.' LIMIT 1');
$select_upload->setFetchMode(PDO::FETCH_OBJ);
if ($select_upload->rowCount()) {
// Get the full path to the real composer profile
$select_comp = $db->query('SELECT fullname FROM composers WHERE id = '.$select_upload->fetch()->composers_id.' LIMIT 1');
$select_comp->setFetchMode(PDO::FETCH_OBJ);
if ($select_comp->rowCount()) {
// Figure out the name of the thumbnail (if it exists)
$fullname = str_replace('_High Voltage SID Collection/', '', $select_comp->fetch()->fullname);
$fullname = str_replace("_Compute's Gazette SID Collection/", "cgsc_", $fullname);
$fullname = strtolower(str_replace('/', '_', $fullname));
$image = $fullname.'.jpg';
}
}
}
} catch(PDOException $e) {
// Never mind then
}
if (!empty($image) && file_exists('images/composers/'.$image))
MergeImage($image);
else if (substr($_GET['file'], -4) == '.sid')
echo 'https://chordian.net/deepsid/images/example_play.png';
else
echo 'https://chordian.net/deepsid/images/composers/_sh.png';
} else
echo 'https://chordian.net/deepsid/images/example.png';
?>" />
<meta property="og:url" content="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" />
<meta property="og:description" content="<?php
// Example: /MUSICIANS/H/Hubbard_Rob/Commando.sid
$hvsc = 'High Voltage SID Collection';
$cgsc = "Compute's Gazette SID Collection";
if (empty($_GET['file']))
echo "A modern online SID player for the High Voltage and Compute's Gazette SID collections.";
else if (strpos($_GET['file'], $hvsc))
echo substr($_GET['file'], strpos($_GET['file'], $hvsc) + strlen($hvsc));
else if (strpos($_GET['file'], $cgsc))
echo substr($_GET['file'], strpos($_GET['file'], $cgsc) + strlen($cgsc));
else
echo $_GET['file'];
?>" />
<meta name="twitter:card" content="summary" />
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8WGW8WKDN4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-8WGW8WKDN4');
</script>
<body class="entry-content" data-mobile="<?php echo isMobile(); ?>" data-theme="" data-mini="<?php echo MiniPlayer(); ?>" data-notips="<?php echo isLemon() ? 1 : 0; ?>">
<?php if (!isLemon()): ?>
<script type="text/javascript">setTheme();</script>
<?php endif ?>
<div id="dialog-cover"></div>
<div id="click-to-play-cover">
<div class="center">
<div class="play"></div>
<span class="text-below"><?php echo isMobile() ? 'Touch' : 'Click'; ?> to play</span>
</div>
</div>
<div id="dialog-register" class="dialog-box">
<div class="dialog-text"></div>
<div class="dialog-buttons"><button class="dialog-button-yes">Yes</button><button class="dialog-button-no">No</button></div>
</div>
<div id="dialog-tags" class="dialog-box">
<a href="tags.htm" target="_blank" style="position:absolute;top:20px;right:21px;font-size:14px;">Guidelines</a>
<div class="dialog-text"></div>
<select id="dialog-all-tags" name="all-tags" multiple></select>
<div class="dialog-transfer">
<button id="dialog-tags-left" class="dialog-to-left">
<svg height="24" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M30.83 32.67l-9.17-9.17 9.17-9.17-2.83-2.83-12 12 12 12z"/><path d="M0-.5h48v48h-48z" fill="none"/></svg>
</button>
<button id="dialog-tags-right" class="dialog-to-right" style="margin-left:2px;">
<svg height="24" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M17.17 32.92l9.17-9.17-9.17-9.17 2.83-2.83 12 12-12 12z"/><path d="M0-.25h48v48h-48z" fill="none"/></svg>
</button>
</div>
<select id="dialog-song-tags" name="song-tags" size="6" multiple></select>
<div class="dialog-new">
<label for="new-tag">New tag:</label><br />
<form onsubmit="return false;" autocomplete="off"><input type="text" name="new-tag" id="new-tag" maxlength="32" />
<button id="dialog-tags-plus" class="disabled" style="float:right;">
<svg height="16" style="enable-background:new 0 0 512 512;" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><polygon points="448,224 288,224 288,64 224,64 224,224 64,224 64,288 224,288 224,448 288,448 288,288 448,288 "/></svg>
</button></form>
</div>
<div class="dialog-buttons" style="width:136px;"><button class="dialog-button-yes dialog-auto" style="float:left;margin:0;">OK</button><button class="dialog-button-no dialog-auto" style="float:right;margin:0;">Cancel</button></div>
</div>
<div id="dialog-ev-subtunes" class="dialog-box dialog-wizard">
<div class="dialog-text"></div>
<div style="margin-top:16px;">
<label for="dd-subtune">Subtune </label>
<select id="ev-dd-subtune" name="dd-subtune"></select>
</div>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-yes dialog-auto">Next</button></div>
</div>
<div id="dialog-playlist-rename" class="dialog-box">
<div class="dialog-text"></div>
<form id="form-edit-file" onsubmit="return false;" autocomplete="off">
<div style="margin-top:16px;">
<label for="dd-newplname" style="width:100px;">New name </label>
<input type="text" name="dd-newplname" id="pr-newplname" maxlength="128" value="My favorites" />
</div>
</form>
<div style="font-size:13px;margin-top:16px;">If you skip this, it will just have the filename. However, you can rename it later by right-clicking it in the root.</div>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Skip</a><button class="dialog-button-yes dialog-auto">Rename</button></div>
</div>
<div id="dialog-edit-videos" class="dialog-box">
<a id="ev-corner-link" href="#" target="_blank" style="position:absolute;top:24px;right:24px;font-size:13px;">Open Tabs</a>
<small>Use <b>Firefox</b> for this</small>
<div class="dialog-text"></div>
<fieldset style="height:200px;"><legend>Song</legend>
<div class="ev-tabs">
<span>Tab</span>
<span><input type="checkbox" id="ev-cb-1" /></span>
<span><input type="checkbox" id="ev-cb-2" /></span>
<span><input type="checkbox" id="ev-cb-3" /></span>
<span><input type="checkbox" id="ev-cb-4" /></span>
<span><input type="checkbox" id="ev-cb-5" /></span>
</div>
<div class="ev-default">
<span>Default</span>
<span><input type="radio" name="ev-rb" id="ev-rb-1" disabled /></span>
<span><input type="radio" name="ev-rb" id="ev-rb-2" disabled /></span>
<span><input type="radio" name="ev-rb" id="ev-rb-3" disabled /></span>
<span><input type="radio" name="ev-rb" id="ev-rb-4" disabled /></span>
<span><input type="radio" name="ev-rb" id="ev-rb-5" disabled /></span>
</div>
<div class="ev-channel">
<span>Channel name</span>
<form onsubmit="return false;" autocomplete="off">
<span><input type="text" id="ev-tb-cn-1" maxlength="32" disabled /> <button id="ev-se-1" type="button" class="disabled"><img src="images/search.svg" alt="" /></button></span>
<span><input type="text" id="ev-tb-cn-2" maxlength="32" disabled /> <button id="ev-se-2" type="button" class="disabled"><img src="images/search.svg" alt="" /></button></span>
<span><input type="text" id="ev-tb-cn-3" maxlength="32" disabled /> <button id="ev-se-3" type="button" class="disabled"><img src="images/search.svg" alt="" /></button></span>
<span><input type="text" id="ev-tb-cn-4" maxlength="32" disabled /> <button id="ev-se-4" type="button" class="disabled"><img src="images/search.svg" alt="" /></button></span>
<span><input type="text" id="ev-tb-cn-5" maxlength="32" disabled /> <button id="ev-se-5" type="button" class="disabled"><img src="images/search.svg" alt="" /></button></span>
</form>
</div>
<div class="ev-video">
<span>Video ID</span>
<form onsubmit="return false;" autocomplete="off">
<span><input type="text" id="ev-tb-vi-1" maxlength="20" disabled /></span>
<span><input type="text" id="ev-tb-vi-2" maxlength="20" disabled /></span>
<span><input type="text" id="ev-tb-vi-3" maxlength="20" disabled /></span>
<span><input type="text" id="ev-tb-vi-4" maxlength="20" disabled /></span>
<span><input type="text" id="ev-tb-vi-5" maxlength="20" disabled /></span>
</form>
</div>
<div class="ev-position">
<span>Position</span>
<span><button id="ev-up-1" type="button" class="disabled">Up</button> <button id="ev-dn-1" type="button" class="disabled">Dn</button></span>
<span><button id="ev-up-2" type="button" class="disabled">Up</button> <button id="ev-dn-2" type="button" class="disabled">Dn</button></span>
<span><button id="ev-up-3" type="button" class="disabled">Up</button> <button id="ev-dn-3" type="button" class="disabled">Dn</button></span>
<span><button id="ev-up-4" type="button" class="disabled">Up</button> <button id="ev-dn-4" type="button" class="disabled">Dn</button></span>
<span><button id="ev-up-5" type="button" class="disabled">Up</button> <button id="ev-dn-5" type="button" class="disabled">Dn</button></span>
</div>
<div id="ev-dd2">
<input type="checkbox" id="ev-dd2-checkbox" />
<label for="ev-dd2-checkbox" class="disabled">Edit subtune </label>
<select id="ev-dd2-subtune" class="disabled" disabled></select>
<label for="ev-dd2-checkbox" class="disabled"> next</label>
</div>
</fieldset>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-yes dialog-auto">Save</button></div>
</div>
<div id="dialog-edit-file" class="dialog-box">
<div class="dialog-text"></div>
<form id="form-edit-file" onsubmit="return false;" autocomplete="off">
<label id="label-edit-file-name" for="edit-file-name" style="margin-bottom:15px;">Name</label>
<input type="text" name="edit-file-name" id="edit-file-name-input" maxlength="64" style="margin-bottom:11px;" /><br />
<label id="label-edit-file-player" for="edit-file-player" style="margin-bottom:15px;">Player</label>
<input type="text" name="edit-file-player" id="edit-file-player-input" maxlength="48" style="margin-bottom:11px;" /><br />
<label id="label-edit-file-author" for="edit-file-author">Author</label>
<input type="text" name="edit-file-author" id="edit-file-author-input" maxlength="128" /><br />
<label id="label-edit-file-copyright" for="edit-file-copyright">Copyright</label>
<input type="text" name="edit-file-copyright" id="edit-file-copyright-input" maxlength="128" />
</form>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-yes dialog-auto">OK</button></div>
</div>
<div id="dialog-delete-file" class="dialog-box">
<div class="dialog-text"></div>
<div id="file-name-delete" class="clink-text ellipsis"></div>
<div class="dialog-buttons"><button class="dialog-button-yes">Yes</button><button class="dialog-button-no">No</button></div>
</div>
<div id="dialog-add-clink" class="dialog-box">
<div class="dialog-text"></div>
<form onsubmit="return false;" autocomplete="off">
<label id="label-clink-name" for="edit-clink-name">Name</label>
<input type="text" name="edit-clink-name" id="edit-clink-name-input" maxlength="128" /><br />
<label id="label-clink-url" for="edit-clink-url">URL</label>
<input type="text" name="edit-clink-url" id="edit-clink-url-input" maxlength="512" /><br />
</form>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-yes dialog-auto">Save</button></div>
</div>
<div id="dialog-delete-clink" class="dialog-box">
<div class="dialog-text"></div>
<div id="clink-name-delete" class="clink-text ellipsis"></div>
<div id="clink-url-delete" class="clink-text ellipsis"></div>
<div class="dialog-buttons"><button class="dialog-button-yes">Yes</button><button class="dialog-button-no">No</button></div>
</div>
<input id="upload-new" type="file" accept=".sid" style="display:none;" />
<div id="dialog-upload-wiz2" class="dialog-box dialog-wizard">
<div class="dialog-text"></div>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-no dialog-auto">Back</button><button class="dialog-button-yes dialog-auto">Next</button></div>
</div>
<div id="dialog-upload-wiz3" class="dialog-box dialog-wizard">
<div class="dialog-text"></div>
<label for="upload-profile">Connect <b>profile</b> page from HVSC/MUSICIANS:</label>
<select id="dropdown-upload-profile" name="upload-profile"></select>
<label for="upload-csdb">Connect <b>CSDb</b> ID:</label><form onsubmit="return false;" autocomplete="off" style="float:right;"><span class="url">https://csdb.dk/release/?id<span style="margin:0 2px;">=</span></span><input type="text" name="upload-csdb" id="upload-csdb-id" onkeypress='return event.charCode >= 48 && event.charCode <= 57;' maxlength="6" value="0" /></form>
<label id="label-lengths" for="upload-lengths" style="white-space:nowrap;">Define <b>lengths</b> of tunes:</label><br />
<form id="form-lengths" onsubmit="return false;" autocomplete="off"><input type="text" name="upload-lengths" id="upload-lengths-list" onkeypress='return event.charCode >= 48 && event.charCode <= 57 || event.key == ":" || event.charCode == 32;' /></form>
<p>If you don't know the <span id="span-lengths">lengths just leave them</span> as is for now. You can edit the file again later.</p>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-no dialog-auto">Back</button><button class="dialog-button-yes dialog-auto">Next</button></div>
</div>
<div id="dialog-upload-wiz4" class="dialog-box dialog-wizard">
<div class="dialog-text"></div>
<form id="form-upload-file" onsubmit="return false;" autocomplete="off">
<label id="label-upload-file-name" for="upload-file-name">Filename</label>
<input type="text" name="upload-file-name" id="upload-file-name-input" maxlength="64" /><br />
<div style="margin-top:16px;">
<label id="label-upload-file-player" for="upload-file-player">Player</label>
<input type="text" name="upload-file-player" id="upload-file-player-input" maxlength="48" /><br />
</div>
<div style="margin-top:16px;">
<label id="label-upload-file-author" for="upload-file-author">Author</label>
<input type="text" name="upload-file-author" id="upload-file-author-input" maxlength="128" /><br />
</div>
<div style="margin-top:6px;">
<label id="label-upload-file-copyright" for="upload-file-copyright">Copyright</label>
<input type="text" name="upload-file-copyright" id="upload-file-copyright-input" maxlength="128" />
</div>
</form>
<p>This only affects the lines you see in the folder list as the top left box reflects the SID file itself.</p>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-no dialog-auto">Back</button><button class="dialog-button-yes dialog-auto">Next</button></div>
</div>
<div id="dialog-upload-wiz5" class="dialog-box dialog-wizard">
<div class="dialog-text"></div>
<label for="upload-stil">Custom text for the <b>STIL</b> tabs:</label>
<textarea id="upload-stil-text" name="upload-stil" maxlength="8192"></textarea>
<div class="dialog-buttons"><a href="#" class="dialog-cancel">Cancel</a><button class="dialog-button-no dialog-auto">Back</button><button class="dialog-button-yes dialog-auto">Finish</button></div>
</div>
<iframe id="download" style="display:none;"></iframe>
<input id="upload-test" type="file" accept=".sid" style="display:none;" multiple required />
<div id="panel">
<div id="top">
<div id="logo" class="unselectable">D e e p S I D
<?php if (MiniPlayer()) echo '<div style="position:absolute;top:24px;left:200px;white-space:nowrap;">mini-player</div>'; ?>
</div>
<select id="dropdown-topleft-emulator" name="select-topleft-emulator" style="visibility:hidden;">
<option value="resid">reSID (BETA)</option>
<!--<option value="resid">reSID (WebSidPlay)</option>-->
<option value="jsidplay2">JSIDPlay2 (reSID)</option>
<option value="websid">WebSid emulator</option>
<option value="legacy">WebSid (Legacy)</option>
<option value="hermit">Hermit's (+FM)</option>
<option value="webusb">WebUSB (Hermit)</option>
<option value="asid">ASID (MIDI)</option>
<option value="lemon">Lemon's MP3 files</option>
<option value="youtube">YouTube videos</option>
<option value="download">Download SID file</option>
</select>
<div id="theme-selector" title="Click here to toggle the color theme"><div></div></div>
<?php if (!MiniPlayer()): ?>
<?php if ($user_id) : ?>
<div id="logged-in">
<span id="logged-username"><?php echo $account->UserName(); ?></span>
<button id="logout" title="Log out">
<svg height="14" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M704 1440q0 4 1 20t.5 26.5-3 23.5-10 19.5-20.5 6.5h-320q-119 0-203.5-84.5t-84.5-203.5v-704q0-119 84.5-203.5t203.5-84.5h320q13 0 22.5 9.5t9.5 22.5q0 4 1 20t.5 26.5-3 23.5-10 19.5-20.5 6.5h-320q-66 0-113 47t-47 113v704q0 66 47 113t113 47h312l11.5 1 11.5 3 8 5.5 7 9 2 13.5zm928-544q0 26-19 45l-544 544q-19 19-45 19t-45-19-19-45v-288h-448q-26 0-45-19t-19-45v-384q0-26 19-45t45-19h448v-288q0-26 19-45t45-19 45 19l544 544q19 19 19 45z"/></svg>
</button>
</div>
<?php else : ?>
<form id="userform" action="<?php echo $account->Self(); ?>" method="post" accept-charset="UTF-8">
<fieldset>
<div id="response">Login or register to rate tunes</div>
<input type="hidden" name="submitted" value="1" />
<input type="text" class="spmhidip" name="<?php echo $account->SpamTrapName(); ?>" style="display:none;" />
<label for="username">User</label>
<input type="text" name="username" id="username" value="<?php echo $account->PostValue('username'); ?>" maxlength="64" />
<label for="password">Pw</label>
<input type="password" name="password" id="password" maxlength="32" />
<label>
<input type="submit" name="submit" value="Submit" style="display:none;" />
<button title="Log in or register">
<svg height="14" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1312 896q0 26-19 45l-544 544q-19 19-45 19t-45-19-19-45v-288h-448q-26 0-45-19t-19-45v-384q0-26 19-45t45-19h448v-288q0-26 19-45t45-19 45 19l544 544q19 19 19 45zm352-352v704q0 119-84.5 203.5t-203.5 84.5h-320q-13 0-22.5-9.5t-9.5-22.5q0-4-1-20t-.5-26.5 3-23.5 10-19.5 20.5-6.5h320q66 0 113-47t47-113v-704q0-66-47-113t-113-47h-312l-11.5-1-11.5-3-8-5.5-7-9-2-13.5q0-4-1-20t-.5-26.5 3-23.5 10-19.5 20.5-6.5h320q119 0 203.5 84.5t84.5 203.5z"/></svg>
</button>
</label>
</fieldset>
</form>
<?php endif; ?>
<?php endif ?>
</div>
<div id="webusb-connect" style="display:none;">
<button id="device-connect">Connect</button>
<label id="connect-text" for="device-connect">to USB device</label>
<label id="status-text" for="device-connect"></label>
</div>
<div id="asid-midi" style="display:none;">
<label for="select-midi-outputs">MIDI port for ASID</label>
<!--<select id="asid-midi-outputs" name="select-midi-outputs" style="visibility:hidden;"></select>-->
<select id="asid-midi-outputs" name="select-midi-outputs"></select>
</div>
<div id="youtube-tabs">
<div class="tab unselectable selected">DeepSID</div>
</div>
<div id="info">
<div id="info-text">
<?php if (MiniPlayer()): ?>
<div style="text-align:center;font-size:12px;">
<span style="position:relative;top:2px;">Please specify a tune to play with the <code style="font-size:12px;">?file=</code> URL parameter.<br />
Optionally add <code style="font-size:12px;">&wait=100</code> to prepare the tune but not play it yet.<br />
Optionally add <code style="font-size:12px;">&sundry=scope</code> to select the <b>Scope</b> tab as default.<br /></span>
</div>
<?php else : ?>
<div style="text-align:center;font-size:12px;">
<span style="position:relative;top:2px;">DeepSID is an online SID player for the High Voltage SID Collection and<br />
more. It plays music created for the <a href="https://en.wikipedia.org/wiki/Commodore_64" target="_top">Commodore 64</a> home computer.</span><br />
<span style="position:relative;top:8px;">Click any of the folder items below to start browsing the collection.</span>
</div>
<?php endif ?>
</div>
<div id="youtube">
<div id="youtube-loading">Initializing YouTube...</div>
<div id="youtube-player"></div>
</div>
<div id="memory-bar"><div id="memory-lid"></div><div id="memory-chunk"></div><div id="memory-screen"></div><div id="memory-basic">BASIC</div><div id="memory-kernel">KERNEL</div></div>
</div>
<div id="sundry-tabs">
<div class="tab unselectable" data-topic="stil" id="stab-stil">News</div>
<?php if (!MiniPlayer()): ?>
<div class="tab unselectable" data-topic="tags" id="stab-tags">Tags</div>
<?php endif ?>
<div class="tab unselectable" data-topic="osc" id="stab-osc">Scope</div>
<?php if (!MiniPlayer()): ?>
<div class="tab unselectable" data-topic="filter" id="stab-filter">Filter</div>
<?php endif ?>
<div class="tab unselectable" data-topic="stereo" id="stab-stereo">Stereo</div>
<div id="sundry-ctrls"></div>
</div>
<div id="sundry">
<div id="stopic-stil" class="stopic">
<?php if (!MiniPlayer()): ?>
<div id="sundry-news">
<span>The <a href="https://www.hvsc.c64.org/" target="_top">High Voltage SID Collection</a> has been upgraded to the latest version #82. Click <a href="//deepsid.chordian.net/?search=82&type=new">here</a> to see what's new in this update.</span>
<!--<span><a href="http://www.c64music.co.uk/" target="_top">Compute's Gazette SID Collection</a> has been upgraded to the latest version #146. Click <a href="//deepsid.chordian.net/?search=146&type=new">here</a> to see what's new in this update.</span>-->
<!--<a href="https://xparty.net/"><img src="images/sundry_x2024.png" alt="X'2024" /></a>-->
<!--<span>I changed some Javascript files so make sure your browser cache is up to date. On Windows, hit <b style="color:#77c;">Ctrl+F5</b> while viewing the site, on Mac, hit <b style="color:#77c;">Cmd+Shift+R</b>.</span>-->
<!--<span>Want to learn how to make SID tunes? Check out <a href="https://www.youtube.com/watch?v=nXNtLetxFUg">this tutorial video</a> now on YouTube.</span>-->
</div>
<?php endif ?>
</div>
<div id="stopic-tags" class="stopic" style="display:none;"></div>
<div id="stopic-osc" class="stopic" style="display:none;"></div>
<div id="stopic-filter" class="stopic" style="display:none;">
<form onsubmit="return false;" autocomplete="off">
<div style="float:left;width:48%;padding-bottom:2px;">
<div class="sundry-control">
<label class="disabled unselectable">Minimum</label>
<input id="filter-base-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-base-slider" class="disabled" type="range" min="0" max="0.3" value="0" step="0.0012" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Maximum</label>
<input id="filter-max-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-max-slider" class="disabled" type="range" min="0" max="1" value="0" step="0.004" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Steepness</label>
<input id="filter-steepness-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-steepness-slider" class="disabled" type="range" min="1" max="1000" value="1" step="3.996" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">X-Offset</label>
<input id="filter-x_offset-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-x_offset-slider" class="disabled" type="range" min="0" max="3000" value="0" step="12" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Kink</label>
<input id="filter-kink-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-kink-slider" class="disabled" type="range" min="0" max="2000" value="0" step="8" disabled="disabled" />
</div>
</div>
<div style="float:right;width:48%;">
<div class="sundry-control">
<label class="disabled unselectable">Distortion</label>
<input id="filter-distort-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-distort-slider" class="disabled" type="range" min="0" max="20" value="0" step="0.08" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Dist. Offset</label>
<input id="filter-distortOffset-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-distortOffset-slider" class="disabled" type="range" min="0" max="200000" value="0" step="800" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Dist. Scale</label>
<input id="filter-distortScale-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-distortScale-slider" class="disabled" type="range" min="0" max="300" value="0" step="0.16" disabled="disabled" />
</div>
<div class="sundry-control">
<label class="disabled unselectable">Dist. Threshold</label>
<input id="filter-distortThreshold-edit" class="disabled" type="text" maxlength="12" onkeypress="NumericInput(event)" disabled="disabled" />
<input id="filter-distortThreshold-slider" class="disabled" type="range" min="0" max="4000" value="0" step="16" disabled="disabled" />
</div>
</div>
<div id="filter-revisions">
<button id="filter-r2" class="disabled" disabled="disabled">R2</button>
<button id="filter-r3" class="disabled" disabled="disabled">R3</button>
<button id="filter-r4" class="disabled" disabled="disabled">R4</button>
</div>
</form>
<div id="filter-websid" class="sundryMsg" style="display:none;">This tab requires the <button class="set-websid">WebSid</button> emulator.</div>
</div>
<div id="stopic-stereo" class="stopic" style="display:none;">
<?php // Sundry tab: Stereo controls for WebSid ?>
<div id="stereo-websid">
<table>
<tr>
<td class="stereo-header">
<span id="stereo-sh1"><b>SID 1</b></span>
</td>
<td class="stereo-s1">
<label class="voice unselectable">Voice 1</label><br />
<div id="stereo-s1v1-scope" class="stereo-scope"><label class="stereo-letter left unselectable">L</label><input id="stereo-s1v1-slider" type="range" min="0" max="100" value="50" step="1" /><label class="stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s1">
<label class="voice unselectable">Voice 2</label><br />
<div id="stereo-s1v2-scope" class="stereo-scope"><label class="stereo-letter left unselectable">L</label><input id="stereo-s1v2-slider" type="range" min="0" max="100" value="50" step="1" /><label class="stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s1">
<label class="voice unselectable">Voice 3</label><br />
<div id="stereo-s1v3-scope" class="stereo-scope"><label class="stereo-letter left unselectable">L</label><input id="stereo-s1v3-slider" type="range" min="0" max="100" value="50" step="1" /><label class="stereo-letter right unselectable">R</label></div>
</td>
</tr>
<tr>
<td class="stereo-header">
<span id="stereo-sh2" class="disabled"><b>SID 2</b></span>
</td>
<td class="stereo-s2">
<label class="disabled voice unselectable">Voice 1</label><br />
<div id="stereo-s2v1-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s2v1-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s2">
<label class="disabled voice unselectable">Voice 2</label><br />
<div id="stereo-s2v2-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s2v2-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s2">
<label class="disabled voice unselectable">Voice 3</label><br />
<div id="stereo-s2v3-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s2v3-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
</tr>
<tr>
<td class="stereo-header">
<span id="stereo-sh3" class="disabled"><b>SID 3</b></span>
</td>
<td class="stereo-s3">
<label class="disabled voice unselectable">Voice 1</label><br />
<div id="stereo-s3v1-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s3v1-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s3">
<label class="disabled voice unselectable">Voice 2</label><br />
<div id="stereo-s3v2-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s3v2-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
<td class="stereo-s3">
<label class="disabled voice unselectable">Voice 3</label><br />
<div id="stereo-s3v3-scope" class="stereo-scope"><label class="disabled stereo-letter left unselectable">L</label><input id="stereo-s3v3-slider" class="disabled" type="range" min="0" max="100" value="50" step="1" disabled="disabled" /><label class="disabled stereo-letter right unselectable">R</label></div>
</td>
</tr>
</table>
<div class="edit" style="margin-top:6px;padding-right:0;">
<label class="unselectable" style="position:relative;top:-1px;margin-right:4px;">Mode</label>
<select id="dropdown-stereo-mode" name="select-stereo-mode" style="position:relative;top:-1px;">
<option value="-1" selected="selected">No stereo</option>
<option value="0">Enhance off</option>
<option value="16384">Low enhance</option>
<option value="24576">Medium enhance</option>
<option value="32767">High enhance</option>
</select>
<div style="display:inline-block;margin-left:20px;">
<input type="checkbox" id="stereo-headphones" name="hptoggle" class="unselectable" unchecked /><label for="stereo-headphones" class="unselectable" title="Headphones"><svg id="svg-headphones" height="16" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 32C114.52 32 0 146.496 0 288v48a32 32 0 0 0 17.689 28.622l14.383 7.191C34.083 431.903 83.421 480 144 480h24c13.255 0 24-10.745 24-24V280c0-13.255-10.745-24-24-24h-24c-31.342 0-59.671 12.879-80 33.627V288c0-105.869 86.131-192 192-192s192 86.131 192 192v1.627C427.671 268.879 399.342 256 368 256h-24c-13.255 0-24 10.745-24 24v176c0 13.255 10.745 24 24 24h24c60.579 0 109.917-48.098 111.928-108.187l14.382-7.191A32 32 0 0 0 512 336v-48c0-141.479-114.496-256-256-256z"/></svg></label>
</div>
<label class="unselectable" style="margin-right:8px;">Reverb</label><input id="stereo-reverb-slider" style="position:relative;top:3px;width:60px;" type="range" min="0" max="100" value="100" step="1" />
</div>
</div>
<?php // Sundry tab: Stereo controls for JSIDPLAY2 ?>
<div id="stereo-jsidplay2">
<table>
<tr>
<td class="stereo-header">
<span id="stereo-jp2-bh"><b>Balance</b></span>
</td>
<td class="stereo-jp2-b1 stereo-cell">
<label class="voice unselectable">SID chip 1</label><br />
<label class="stereo-letter left unselectable">L</label><input id="stereo-jp2-b1-slider" type="range" min="0" max="1" value="0.3" step="0.1" /><label class="stereo-letter right unselectable">R</label>
</td>
<td class="stereo-jp2-b2 stereo-cell">
<label class="voice unselectable">SID chip 2</label><br />
<label class="stereo-letter left unselectable">L</label><input id="stereo-jp2-b2-slider" type="range" min="0" max="1" value="0.7" step="0.1" /><label class="stereo-letter right unselectable">R</label>
</td>
<td class="stereo-jp2-b3 stereo-cell">
<label class="voice unselectable">SID chip 3</label><br />
<label class="stereo-letter left unselectable">L</label><input id="stereo-jp2-b3-slider" type="range" min="0" max="1" value="0.5" step="0.1" /><label class="stereo-letter right unselectable">R</label>
</td>
</tr>
<tr>
<td class="stereo-header">
<span id="stereo-jp2-dh"><b>Delay</b></span>
</td>
<td class="stereo-jp2-d1 stereo-cell">
<label class="voice unselectable">SID chip 1</label><br />
<label class="stereo-letter-dense left-dense unselectable">0 ms </label><input id="stereo-jp2-d1-slider" type="range" min="0" max="50" value="10" step="1" /><label class="stereo-letter-dense right unselectable">50</label>
</td>
<td class="stereo-jp2-d2 stereo-cell">
<label class="voice unselectable">SID chip 2</label><br />
<label class="stereo-letter-dense left-dense unselectable">0 ms </label><input id="stereo-jp2-d2-slider" type="range" min="0" max="50" value="0" step="1" /><label class="stereo-letter-dense right unselectable">50</label>
</td>
<td class="stereo-jp2-d3 stereo-cell">
<label class="voice unselectable">SID chip 3</label><br />
<label class="stereo-letter-dense left-dense unselectable">0 ms </label><input id="stereo-jp2-d3-slider" type="range" min="0" max="50" value="0" step="1" /><label class="stereo-letter-dense right unselectable">50</label>
</td>
</tr>
</table>
<div class="edit" style="margin-top:6px;padding-right:0;">
<label class="unselectable" style="position:relative;top:0;margin-right:4px;">Stereo mode</label>
<select id="dropdown-jp2-stereo-mode" name="select-jp2-stereo-mode">
<option value="AUTO" selected="selected">Auto</option>
<option value="STEREO">Stereo</option>
<option value="THREE_SID">3SID</option>
</select>
<div style="display:inline-block;position:relative;top:2px;margin-left:15px;">
<input type="checkbox" id="stereo-fake" name="faketoggle" class="unselectable" unchecked /><label for="stereo-fake" class="unselectable">Fake stereo, using</label>
</div>
<select id="dropdown-jp2-fake-read" name="select-jp2-fake-read" style="position:relative;left:-13px;">
<option value="FIRST_SID" selected="selected">1st SID chip</option>
<option value="SECOND_SID">2nd SID chip</option>
<option value="THIRD_SID">3rd SID chip</option>
</select>
</div>
</div>
<div id="stereo-message" class="sundryMsg" style="display:none;">This tab requires the <button class="set-websid">WebSid</button> or the <button class="set-jsidplay2">JSIDPlay2</button> emulator.</div>
</div>
<a id="redirect-back" class="redirect continue" href="#" style="display:none"></a>
</div>
<div id="slider">
<div id="slider-button" style="display:none;">
<button id="get-all-tags" class="rect">Folder</button>
</div>
</div>
<div id="interactive">
<div id="controls">
<button id="play-pause" class="button-ctrls button-big button-idle disabled">
<svg id="play" height="40" viewBox="0 0 48 48"><path d="M-838-2232H562v3600H-838z" fill="none"/><path d="M16 10v28l22-14z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
<svg id="pause" height="40" viewBox="0 0 48 48" style="display:none;"><path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
</button>
<button id="stop" class="button-ctrls button-big button-selected disabled">
<svg height="40" viewBox="0 0 48 48"><path d="M0 0h48v48H0z" fill="none"/><path d="M12 12h24v24H12z"/></svg>
</button>
<div class="divider"></div>
<div class="button-area">
<div class="button-tag">Faster</div>
<button id="faster" class="button-ctrls button-lady button-idle disabled">
<svg height="28" viewBox="0 0 48 48"><path d="M8 36l17-12L8 12v24zm18-24v24l17-12-17-12z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
</button>
</div>
<div class="divider"></div>
<?php if (MiniPlayer() == 2): // Wider subtune buttons for Chris Abbott ?>
<div class="button-area">
<button id="subtune-minus" class="button-ctrls button-lady button-idle disabled">
<svg height="28" style="position:relative;top:-1px;left:-2px;transform:rotate(90deg);" viewBox="0 0 48 48"><path d="M14.83 16.42l9.17 9.17 9.17-9.17 2.83 2.83-12 12-12-12z"/><path d="M0-.75h48v48h-48z" fill="none"/></svg>
</button>
</div>
<div class="button-area">
<div class="button-tag" style="position:relative;left:-36px;white-space:nowrap;">—— Subtune ——</div>
<div id="subtune-value" class="button-counter disabled" style="position:relative;top:18px;font-size:14px;"></div>
</div>
<div class="button-area">
<button id="subtune-plus" class="button-ctrls button-lady button-idle disabled" style="position:absolute;bottom:0;">
<svg height="28" style="position:relative;top:-1px;right:-2px;transform:rotate(90deg);" viewBox="0 0 48 48"><path d="M14.83 30.83l9.17-9.17 9.17 9.17 2.83-2.83-12-12-12 12z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
</button>
</div>
<?php else : // Normal subtune buttons and also Prev/Next buttons ?>
<div class="button-area thinner">
<button id="subtune-plus" class="button-ctrls button-tiny button-idle disabled">
<svg height="20" viewBox="0 0 48 48"><path d="M14.83 30.83l9.17-9.17 9.17 9.17 2.83-2.83-12-12-12 12z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>
</button>
<div id="subtune-value" class="button-counter disabled"></div>
<button id="subtune-minus" class="button-ctrls button-tiny button-idle disabled">
<svg height="20" viewBox="0 0 48 48"><path d="M14.83 16.42l9.17 9.17 9.17-9.17 2.83 2.83-12 12-12-12z"/><path d="M0-.75h48v48h-48z" fill="none"/></svg>
</button>
</div>
<div class="divider"></div>
<div class="button-area">
<div class="button-tag">Prev</div>
<button id="skip-prev" class="button-ctrls button-lady button-idle disabled">
<svg height="28" viewBox="0 0 48 48"><path d="M12 12h4v24h-4zm7 12l17 12V12z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
</button>
</div>
<div class="button-area">
<div class="button-tag">Next</div>
<button id="skip-next" class="button-ctrls button-lady button-idle disabled">
<svg height="28" viewBox="0 0 48 48"><path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
</button>
</div>
<?php endif ?>
<div class="divider"></div>
<div class="button-area">
<div class="button-tag">Loop</div>
<button id="loop" class="button-ctrls button-lady button-off disabled">
<svg width="23" style="enable-background:new 0 0 42 28;position:relative;top:-1px;" version="1.1" viewBox="0 0 90 60"><path d="M80,11H61v14h15v21H14V25h21v11l20-18L35,0v11H10C4.477,11,0,15.477,0,21v29c0,5.523,4.477,10,10,10h70 c5.523,0,10-4.477,10-10V21C90,15.477,85.523,11,80,11z"/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>
</button>
<input id="volume" type="range" min="0" max="100" value="100" step="1" disabled="disabled" />
</div>
</div>
<div id="time"><span id="time-current">0:00</span> <div id="time-bar"><div></div></div> <span id="time-length" style="position:relative;">0:00</span></div>
</div>
<div id="songs"<?php if (MiniPlayer()) echo ' style="visibility:hidden;"'; ?>>
<div id="songs-buttons">
<button id="folder-root" class="button-lady browser-ctrls">
<svg height="26" viewBox="0 0 48 48"><path d="M12 12h4v24h-4zm7 12l17 12V12z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
</button>
<button id="folder-back" class="button-lady browser-ctrls">
<b style="font-size:18px;position:relative;top:-6px;">..</b>
</button> <div id="path" class="ellipsis"></div>
<div id="sort">
<select id="dropdown-sort" name="sort"><!-- browser.js --></select>
</div>
</div>
<div id="folders"><table></table></div>
<img id="loading" class="loading-spinner" src="images/loading.svg" style="display:none;" alt="" />
<div id="search">
<select id="dropdown-search" name="search-type">
<option value="#all#">All</option>
<option value="fullname">Filename</option>
<option value="author">Author</option>
<option value="copyright">Copyright</option>
<option value="player">Player</option>
<option value="location">Location</option>
<option value="maximum">Maximum</option>
<option value="type">Type</option>
<option value="tag">Tags</option>
<option value="stil">STIL</option>
<option value="rating">Rating</option>
<option value="country">Country</option>
<option value="new">Version</option>
<option value="latest">Latest</option>
<option value="folders" style="display:none;">Folders</option>
<option value="gb64">Game</option>
<option value="special" style="display:none;">Special</option>
</select>
<form onsubmit="return false;" autocomplete="off"><input type="text" name="search-box" id="search-box" maxlength="64" placeholder="Search..." /></form>
<div id="search-here-container">
<input type="checkbox" id="search-here" name="shtoggle" class="unselectable" unchecked />
<label for="search-here" class="unselectable">Here</label>
</div>
<button id="search-button" class="medium disabled" disabled="disabled">Search</button>
</div>
</div>
</div>
<?php if (!isMobile() && !MiniPlayer()): ?>
<div id="dexter">
<div id="sites" class="unselectable">
<div style="float:left;margin-left:1px;text-align:left;">
<a id="home" href="<?php echo HOST; ?>" target="_top">Home</a>
<span>▪</span>
<a id="recommended" href="#">Recommended</a>
<span>▪</span>
<a id="players" href="#">Players</a>
<span>▪</span>
<a id="forum" href="#">Forum</a>
</div>
<!--<a href="https://blog.chordian.net/2018/05/12/deepsid/" target="_blank">Blog Post</a>
<span>▪</span>-->
<a href="https://www.facebook.com/groups/deepsid/" target="_blank">Facebook</a>
<span>▪</span>
<!--<a href="https://www.lemon64.com/forum/viewtopic.php?t=68056" target="_blank">Lemon64</a>
<span>▪</span>-->
<a href="https://bsky.app/profile/chordian.bsky.social" target="_blank">Bluesky</a>
<span>▪</span>
<a rel="me" href="https://mastodon.social/@chordian" target="_blank">Mastodon</a>
<span>▪</span>
<a href="http://csdb.chordian.net/?type=forums&roomid=14&topicid=129712" target="_blank">CSDb</a>
<span>▪</span>
<a href="https://github.com/Chordian/deepsid" target="_blank">GitHub</a>
</div>
<div id="tabs">
<div class="tab unselectable" data-topic="profile" id="tab-profile">Profile</div>
<div class="tab unselectable" data-topic="csdb" id="tab-csdb">CSDb<div id="note-csdb" class="notification csdbcolor"></div></div>
<!--<div class="tab unselectable" data-topic="gb64" id="tab-gb64">GB64<div id="note-gb64" class="notification gb64color"></div></div>-->
<div class="tab unselectable" data-topic="remix" id="tab-remix">Remix<div id="note-remix" class="notification remixcolor"></div></div>
<div class="tab unselectable" data-topic="player" id="tab-player">Player<div id="note-player" class="notification playercolor"></div></div>
<div class="tab unselectable" data-topic="stil" id="tab-stil">STIL</div>
<div class="tab unselectable" data-topic="visuals" id="tab-visuals">Visuals</div>
<div class="tab right unselectable" data-topic="settings" id="tab-settings" style="width:26px;">
<svg height="12px" width="12px" style="position:relative;top:-5px;" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g class="g2" transform="translate(-464.000000, -380.000000)"><g transform="translate(464.000000, 380.000000)"><path d="M17.4,11 C17.4,10.7 17.5,10.4 17.5,10 C17.5,9.6 17.5,9.3 17.4,9 L19.5,7.3 C19.7,7.1 19.7,6.9 19.6,6.7 L17.6,3.2 C17.5,3.1 17.3,3 17,3.1 L14.5,4.1 C14,3.7 13.4,3.4 12.8,3.1 L12.4,0.5 C12.5,0.2 12.2,0 12,0 L8,0 C7.8,0 7.5,0.2 7.5,0.4 L7.1,3.1 C6.5,3.3 6,3.7 5.4,4.1 L3,3.1 C2.7,3 2.5,3.1 2.3,3.3 L0.3,6.8 C0.2,6.9 0.3,7.2 0.5,7.4 L2.6,9 C2.6,9.3 2.5,9.6 2.5,10 C2.5,10.4 2.5,10.7 2.6,11 L0.5,12.7 C0.3,12.9 0.3,13.1 0.4,13.3 L2.4,16.8 C2.5,16.9 2.7,17 3,16.9 L5.5,15.9 C6,16.3 6.6,16.6 7.2,16.9 L7.6,19.5 C7.6,19.7 7.8,19.9 8.1,19.9 L12.1,19.9 C12.3,19.9 12.6,19.7 12.6,19.5 L13,16.9 C13.6,16.6 14.2,16.3 14.7,15.9 L17.2,16.9 C17.4,17 17.7,16.9 17.8,16.7 L19.8,13.2 C19.9,13 19.9,12.7 19.7,12.6 L17.4,11 L17.4,11 Z M10,13.5 C8.1,13.5 6.5,11.9 6.5,10 C6.5,8.1 8.1,6.5 10,6.5 C11.9,6.5 13.5,8.1 13.5,10 C13.5,11.9 11.9,13.5 10,13.5 L10,13.5 Z"/></g></g></g></svg>
</div>
<div class="tab right unselectable" data-topic="changes" id="tab-changes" style="width:80px;">Changes</div>
<div class="tab right unselectable" data-topic="faq" id="tab-faq">FAQ</div>
<div class="tab right unselectable" data-topic="about" id="tab-about">About</div>
</div>
<div id="sticky-csdb"><h2 style="margin-top:0;">CSDb</h2></div>
<div id="sticky-visuals"><h2 style="margin-top:0;">Visuals</h2>
<div class="visuals-buttons" data-selected-visual="">
<button class="visuals-button icon-piano button-off" data-visual="piano">Piano</button>
<button class="visuals-button icon-graph button-on" data-visual="graph">Graph</button>
<button class="visuals-button icon-memory button-on" data-visual="memory">Memo</button>
<button class="visuals-button icon-stats button-on" data-visual="stats">Stats</button>
</div>
<img class="waveform-colors" src="images/waveform_colors.png" alt="Waveform Colors" />
<div id="sticky-right-buttons">
<span id="visuals-toggle">
<label for="tab-visuals-toggle" class="unselectable" style="margin-right:1px;">Enabled</label>
<button id="tab-visuals-toggle" class="button-edit button-toggle button-on">On</button>
<span class="viz-warning viz-msg-enable" style="position:relative;top:-1px;"> <img src="images/composer_arrowleft.svg" style="position:relative;top:5px;height:18px;" alt="" /> Click this to enable the visuals</span>
</span>