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 <span>Coupling</span>
24 <input id="coupling" type="range" min="0" max="70" step="1" value="0">
25 <output></output>
26 </label>
28 <div class="sound">
29 <button id="sound" class="toggle" aria-pressed="false">♪ Sound off</button>
30 <label class="row">
31 <span>Rhythm</span>
32 <select id="rhythm">
31155f4Rhythm: pluck at both turning points by defaultJeremy Magland 33 <option value="both" selected>Natural: ẋ crosses 0 both ways</option>
34 <option value="natural">Natural: ẋ crosses 0 upward</option>
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 35 <option value="steady">Steady: each drive period</option>
36 </select>
37 </label>
38 <label class="row">
39 <span>Scale</span>
40 <select id="scale"></select>
41 </label>
42 <div class="row">
43 <span>Key</span>
44 <div id="keys" class="keys" role="group" aria-label="Key"></div>
45 </div>
46 <label class="row">
47 <span>Tempo</span>
48 <input id="tempo" type="range" min="1" max="40" step="1" value="16">
49 <output id="tempo-out"></output>
50 </label>
51 <label class="row">
52 <span>Sustain</span>
53 <input id="sustain" type="range">
54 <output></output>
55 </label>
56 <label class="row">
57 <span>Volume</span>
58 <input id="volume" type="range" min="0" max="1" step="0.01" value="0.6">
59 <output></output>
60 </label>
61 </div>
4087941Optional click mode: replace the orbit instead of addingJeremy Magland 63 <label class="row click-mode">
64 <span>Clicks</span>
65 <select id="click-mode">
66 <option value="add" selected>Add an orbit</option>
67 <option value="replace">Replace the orbit</option>
68 </select>
69 </label>
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 70 <ul id="orbit-list" class="orbit-list"></ul>
71 <button id="clear" class="quiet">Clear orbits</button>
72 </aside>
74 <div class="plot-wrap">
75 <canvas id="plot"></canvas>
76 <p id="hint" class="hint">Click to add orbits · click a start ring to remove it</p>
77 </div>
78 </div>
80 <script type="module" src="main.js"></script>
81</body>
82</html>