2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>Duffing Islands</title>
7 <link rel="stylesheet" href="style.css">
8</head>
9<body>
10 <header>
11 <h1>Islands in a sea of chaos</h1>
12 <p class="eq">
13 <i>ẍ</i> + <i>δ</i><i>ẋ</i> ± (2π<i>f</i><sub>0</sub>)<sup>2</sup><i>x</i> + <i>α</i><i>x</i><sup>3</sup> = <i>F</i> cos <i>Ωt</i>
14 </p>
15 </header>
17 <div class="layout">
18 <aside class="panel">
19 <select id="preset" aria-label="Preset"></select>
21 <div id="sliders" class="sliders"></div>
23 <div class="sound">
24 <button id="sound" class="toggle" aria-pressed="false">♪ Sound off</button>
25 <label class="row">
26 <span>Rhythm</span>
27 <select id="rhythm">
28 <option value="both" selected>Natural: ẋ crosses 0 both ways</option>
29 <option value="natural">Natural: ẋ crosses 0 upward</option>
30 <option value="steady">Steady: each drive period</option>
31 </select>
32 </label>
33 <label class="row">
34 <span>Scale</span>
35 <select id="scale"></select>
36 </label>
37 <div class="row">
38 <span>Key</span>
39 <div id="keys" class="keys" role="group" aria-label="Key"></div>
40 </div>
41 <label class="row">
42 <span>Tempo</span>
43 <input id="tempo" type="range" min="1" max="40" step="1" value="16">
44 <output id="tempo-out"></output>
45 </label>
46 <label class="row">
47 <span>Sustain</span>
48 <input id="sustain" type="range">
49 <output></output>
50 </label>
51 <label class="row">
52 <span>Volume</span>
53 <input id="volume" type="range" min="0" max="1" step="0.01" value="0.6">
54 <output></output>
55 </label>
56 </div>
58 <ul id="orbit-list" class="orbit-list"></ul>
59 <button id="clear" class="quiet">Clear orbits</button>
60 </aside>
62 <div class="plot-wrap">
63 <canvas id="plot"></canvas>
64 <p id="hint" class="hint">Click to add orbits · click a start ring to remove it</p>
65 </div>
66 </div>
68 <script type="module" src="main.js"></script>
69</body>
70</html>