/ interactive_tutorials / duffing_islands
Sign in
interactive_tutorials / duffing_islands
duffing_islands / app / index.html
99 lines · 4.2 KBCodeBlameHistory
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>
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 10 <header class="top">
11 <div class="title">
12 <h1>Islands in a sea of chaos</h1>
13 <p class="eq">
14 <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>
15 </p>
16 </div>
17 <div class="master">
18 <label class="master-tempo" title="The global tempo: every track ticks at a multiple of it">
19 <span>Tempo</span>
20 <input id="tempo" type="range">
21 <output></output>
22 </label>
23 <div class="rec">
24 <button id="record" class="rec-btn" aria-pressed="false"><span class="rec-dot" aria-hidden="true"></span><span class="rec-label">Record</span></button>
25 <span id="rec-status" class="rec-status" aria-live="polite" hidden></span>
26 <button id="rec-download" class="small" hidden></button>
27 <button id="rec-discard" class="quiet small" aria-label="Discard the recording" title="Discard the recording" hidden>×</button>
28 </div>
29 <button id="sound" class="sound-btn" aria-pressed="false"></button>
30 <label class="master-vol" title="Master volume">
31 <span class="sr">Master volume</span>
32 <input id="volume" type="range" min="0" max="1" step="0.01" value="0.6">
33 <output></output>
34 </label>
35 </div>
38 <div class="layout">
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 39 <aside class="panel eqn-panel">
40 <div class="eqn-head">
41 <h2>Equation</h2>
42 <button id="knobs" class="small quiet" aria-pressed="false" title="Control the sliders with the knobs of a MIDI controller">Knobs</button>
43 </div>
44 <p id="knob-msg" class="note knob-msg" hidden></p>
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 45 <select id="preset" aria-label="Preset"></select>
46 <div id="sliders" class="sliders"></div>
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 47 <div class="coupling">
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 49 <span>Coupling</span>
50 <input id="coupling" type="range" min="0" max="70" step="1" value="0">
52 </label>
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 53 <p class="note">Joins the playing tracks with the same tempo multiple into one system.</p>
54 </div>
55 <div class="session">
56 <h2>Session</h2>
57 <p class="note">Saved in this browser as you go. A file keeps everything, SoundFonts included.</p>
58 <div class="session-btns">
59 <button id="export" class="small" title="Download the session (with its SoundFonts) as a file">Save to file</button>
60 <button id="import" class="small" title="Open a session file">Open file…</button>
61 <button id="start-over" class="small quiet" title="Back to the defaults">Start over</button>
62 <input id="import-file" type="file" accept=".json,application/json" hidden>
63 </div>
64 <p id="session-msg" class="note" aria-live="polite"></p>
66 </aside>
68 <div class="plot-wrap">
69 <canvas id="plot"></canvas>
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 70 <p id="hint" class="hint"></p>
73 <aside class="panel tracks-panel">
74 <div class="tracks-head">
75 <h2>Tracks</h2>
76 <div class="transport">
77 <button id="play-all" class="small" title="Play every track">Play all</button>
78 <button id="pause-all" class="small" title="Pause every track">Pause all</button>
79 <button id="restart-all" class="small" title="Restart every track from its start">Restart all</button>
80 </div>
81 </div>
82 <ol id="track-list" class="track-list"></ol>
83 <button id="add-track" class="add-track">+ Add track</button>
84 <div class="sf-lib">
85 <div class="sf-head">
86 <span class="sf-label">SoundFonts</span>
87 <button id="sf-load" class="small" title="Load one or more .sf2 files: their presets join every track's instrument menu">Load .sf2…</button>
88 <input id="sf-file" type="file" accept=".sf2" multiple hidden>
89 </div>
90 <p id="sf-empty" class="note">None loaded: a .sf2 file's presets join the instruments.</p>
91 <ul id="sf-list" class="sf-list"></ul>
92 <p id="sf-msg" class="note" aria-live="polite"></p>
93 </div>
94 </aside>
97 <script type="module" src="main.js"></script>
98</body>
99</html>
↑↓ move↵openescclose