/ interactive_tutorials / duffing_islands
Sign in
interactive_tutorials / duffing_islands
duffing_islands / app / style.css
438 lines · 13.8 KBCodeBlameHistory
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 1@font-face { font-family: "Source Serif 4"; font-weight: 300; src: url("vendor/fonts/source-serif-4-latin-300-normal.woff2") format("woff2"); }
2@font-face { font-family: "Hanken Grotesk"; font-weight: 400; src: url("vendor/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
3@font-face { font-family: "Hanken Grotesk"; font-weight: 600; src: url("vendor/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }
5:root {
6 --bg: #ffffff;
7 --fg: #1c2954;
8 --muted: #6b7491;
9 --line: #dde1ea;
10 --panel: #f5f6f9;
11 --accent: #f6862d;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 12 --rec: #d0453a;
14 --font-head: "Tiempos Headline", "Source Serif 4", Georgia, serif;
15 --font-body: "Founders Grotesk", "Hanken Grotesk", system-ui, sans-serif;
18@media (prefers-color-scheme: dark) {
19 :root {
20 --bg: #121418;
21 --fg: #e6e8ee;
22 --muted: #8d94a8;
23 --line: #2a2e38;
24 --panel: #1a1d23;
25 --dot-light: 66%;
26 }
29* { box-sizing: border-box; }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 31[hidden] { display: none !important; }
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 33html, body { height: 100%; }
35body {
36 margin: 0;
37 display: flex;
38 flex-direction: column;
39 background: var(--bg);
40 color: var(--fg);
41 font-family: var(--font-body);
42 font-size: 15px;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 45header.top {
46 display: flex;
47 align-items: center;
48 justify-content: space-between;
49 gap: 16px;
50 padding: 12px 20px 6px;
53h1 {
54 margin: 0;
55 font-family: var(--font-head);
56 font-weight: 300;
57 font-size: 26px;
61 margin: 0;
62 font-family: var(--font-head);
63 font-weight: 300;
64 font-size: 19px;
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 67.eq { margin: 4px 0 0; font-family: var(--font-head); font-size: 17px; }
68.eq i { font-family: var(--font-head); }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 70.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
72/* ---- master: sound on/off and volume ---- */
74.master { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
76.sound-btn {
77 display: inline-flex;
78 align-items: center;
79 gap: 8px;
80 padding: 9px 18px 9px 14px;
81 border: 1.5px solid var(--line);
82 border-radius: 999px;
83 font-weight: 600;
84 font-size: 15px;
85 min-width: 140px;
86 justify-content: center;
88.sound-btn svg { width: 20px; height: 20px; }
89.sound-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
90.sound-btn.nudge { border-color: var(--accent); color: var(--accent); animation: nudge 1.1s ease-out 3; }
91@keyframes nudge {
92 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
93 100% { box-shadow: 0 0 0 12px transparent; }
96.master-tempo { display: flex; align-items: center; gap: 8px; width: 230px; font-size: 14px; }
97.master-tempo > span { color: var(--muted); }
98.master-tempo output { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; }
99.rec { display: flex; align-items: center; gap: 6px; }
100.rec-btn {
101 display: inline-flex;
102 align-items: center;
103 gap: 7px;
104 padding: 7px 14px 7px 11px;
105 border-radius: 999px;
106 font-weight: 600;
107 font-size: 14px;
109.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rec); }
110.rec-btn[aria-pressed="true"] { border-color: var(--rec); color: var(--rec); }
111.rec-btn[aria-pressed="true"] .rec-dot { border-radius: 2px; animation: rec-blink 1.2s steps(2, jump-none) infinite; }
112@keyframes rec-blink { 50% { opacity: 0.35; } }
113.rec-status { font-size: 13px; color: var(--rec); font-variant-numeric: tabular-nums; white-space: nowrap; }
114.master-vol { display: flex; align-items: center; gap: 8px; width: 150px; }
115.master-vol output { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
117/* ---- layout ---- */
120 flex: 1;
121 min-height: 0;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 122 display: grid;
123 grid-template-columns: 260px minmax(0, 1fr) 350px;
124 gap: 18px;
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 125 padding: 8px 20px 20px;
128.panel {
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 129 min-height: 0;
131 flex-direction: column;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 136.sliders, .coupling { display: flex; flex-direction: column; gap: 8px; }
137.coupling { padding-top: 12px; border-top: 1px solid var(--line); }
138.note { margin: 0; font-size: 12px; color: var(--muted); }
139.session { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
140.session-btns { display: flex; flex-wrap: wrap; gap: 6px; }
141.session .note:empty { display: none; }
142.note.error { color: #d0453a; }
144.row {
145 display: grid;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 146 grid-template-columns: 64px 1fr 64px;
148 gap: 8px;
151.row > span { color: var(--muted); font-size: 14px; }
152.row output { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
153.row sub, .row sup { font-size: 0.7em; }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 155input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }
157select, button {
158 font: inherit;
159 color: var(--fg);
160 background: var(--panel);
161 border: 1px solid var(--line);
162 border-radius: 6px;
163 padding: 6px 8px;
166button { cursor: pointer; }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 167button:disabled { cursor: default; opacity: 0.45; }
169.small { padding: 3px 9px; font-size: 13px; }
170.quiet { background: none; color: var(--muted); border-color: transparent; }
171.error { color: #d0453a; }
173/* ---- tracks ---- */
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 175.tracks-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
176.transport { display: flex; gap: 4px; }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 178.track-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
181 --c: hsl(var(--h) 85% var(--dot-light));
182 border: 1px solid var(--line);
183 border-radius: 10px;
184 background: var(--bg);
186.track.selected { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 188.track-head {
190 align-items: center;
191 gap: 6px;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 192 padding: 7px 6px 7px 8px;
193 cursor: pointer;
194 border-radius: 9px;
196.track-head:hover { background: var(--panel); }
197.track.selected .track-head { background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: 9px 9px 0 0; }
199.track-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
200.track-name, .summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
201.track-name { font-weight: 600; font-size: 14px; }
202.track-name .num { color: var(--c); margin-right: 6px; }
203.summary { font-size: 12px; color: var(--muted); }
205.icon-btn {
206 flex: none;
207 width: 30px;
208 height: 30px;
209 padding: 0;
210 display: inline-grid;
211 place-items: center;
212 border: 1px solid transparent;
213 border-radius: 8px;
214 background: none;
215 color: var(--muted);
217.icon-btn svg { width: 15px; height: 15px; }
218.icon-btn:not(:disabled):hover { color: var(--fg); background: var(--panel); border-color: var(--line); }
219.play-btn { width: 34px; height: 34px; border-radius: 50%; border-color: var(--c); color: var(--c); background: var(--bg); }
220.play-btn svg { width: 14px; height: 14px; }
221.play-btn:not(:disabled):hover { color: var(--c); border-color: var(--c); }
222.play-btn[aria-pressed="true"], .play-btn[aria-pressed="true"]:not(:disabled):hover { background: var(--c); color: #fff; }
224.track-body {
225 display: flex;
226 flex-direction: column;
227 gap: 7px;
228 padding: 10px 10px 10px 6px;
229 border-top: 1px solid var(--line);
232.trow {
233 display: grid;
234 grid-template-columns: 22px 66px minmax(0, 1fr) 58px;
235 align-items: center;
236 gap: 6px;
238.trow > select, .trow > .keys, .trow > .coords { grid-column: 3 / 5; }
239.trow .lbl { color: var(--muted); font-size: 13px; }
240.rate-row.custom > select { grid-column: 3; }
241.rate-row input[type="text"] {
242 min-width: 0;
243 font: inherit;
244 font-size: 13px;
245 padding: 3px 6px;
246 color: var(--fg);
247 background: var(--bg);
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 248 border: 1px solid var(--line);
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 249 border-radius: 6px;
250 text-align: right;
252.rate-row input.invalid { border-color: #d0453a; color: #d0453a; }
253.trow output { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
254.trow select { padding: 4px 6px; font-size: 13px; min-width: 0; }
255.trow input[type="range"] { accent-color: var(--c); }
256.trow.na > :not(.link) { opacity: 0.4; }
257.coords { font-size: 13px; font-variant-numeric: tabular-nums; }
258.coords em { color: var(--muted); }
260.link {
261 width: 22px;
262 height: 22px;
263 padding: 0;
264 display: grid;
265 place-items: center;
266 border: none;
267 background: none;
268 color: var(--muted);
269 opacity: 0.6;
271.link svg { width: 15px; height: 15px; }
272.link:hover { opacity: 1; }
273.link[aria-pressed="true"] { color: var(--accent); opacity: 1; }
275.keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
276.keys button { padding: 2px 0; font-size: 12px; }
277.keys button[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
279.link-note { display: flex; align-items: center; gap: 5px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
280.link-note svg { width: 13px; height: 13px; flex: none; color: var(--accent); }
282.add-track {
283 border: 1.5px dashed var(--line);
284 border-radius: 10px;
285 background: none;
286 color: var(--muted);
287 padding: 9px;
289.add-track:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
291.sf-lib {
292 display: flex;
293 flex-direction: column;
294 gap: 6px;
295 margin-top: auto;
296 padding-top: 12px;
297 border-top: 1px solid var(--line);
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 300.sf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
301.sf-label { color: var(--muted); }
302.sf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
303.sf-list:empty, .sf-lib .note:empty { display: none; }
304.sf-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 0 2px 2px; }
305.sf-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
306.sf-info { flex: 1 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
307.sf-list .quiet { padding: 0 6px; }
309/* ---- plot ---- */
311.plot-wrap {
312 position: relative;
313 min-width: 0;
314 min-height: 0;
317#plot {
318 position: absolute;
319 inset: 0;
320 width: 100%;
321 height: 100%;
322 cursor: crosshair;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 323 touch-action: none;
326.hint {
327 position: absolute;
328 top: 8px;
329 left: 60px;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 330 right: 16px;
331 width: fit-content;
333 padding: 4px 10px;
334 border-radius: 6px;
335 background: var(--panel);
336 color: var(--muted);
337 font-size: 14px;
338 pointer-events: none;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 341@media (max-width: 1180px) {
342 html, body { height: auto; }
343 .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
344 .plot-wrap { grid-column: 1 / -1; order: -1; height: min(72vh, 680px); }
345 .panel { overflow: visible; }
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 348@media (max-width: 760px) {
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 349 header.top { flex-wrap: wrap; padding: 12px 16px 4px; }
a1f5e15Islands in a sea of chaos: Duffing phase space with sonificationJeremy Magland 350 h1 { font-size: 22px; }
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 351 .layout { grid-template-columns: minmax(0, 1fr); padding: 8px 16px 16px; }
352 .plot-wrap { height: min(90vw, 70vh); }
353 .tracks-panel { order: -1; }
354 .plot-wrap { order: -2; }
357/* ---- custom notes ---- */
359.notes-editor { display: flex; flex-direction: column; gap: 6px; padding-left: 28px; }
360.piano {
361 position: relative;
362 height: 46px;
363 border: 1px solid var(--line);
364 border-radius: 4px;
365 overflow: hidden;
366 background: var(--bg);
368.piano button {
369 position: absolute;
370 top: 0;
371 padding: 0;
372 border-radius: 0 0 3px 3px;
373 cursor: pointer;
375.piano .wk {
376 width: calc(100% / var(--w));
377 height: 100%;
378 background: #fff;
379 border: none;
380 border-right: 1px solid #c9ced9;
381 display: flex;
382 align-items: flex-end;
383 justify-content: center;
385.piano .wk span { font-size: 8px; color: #8a90a2; padding-bottom: 2px; pointer-events: none; }
386.piano .bk {
387 z-index: 1;
388 width: calc(100% / var(--w) * 0.62);
389 height: 60%;
390 transform: translateX(-50%);
391 background: #2b2f38;
392 border: 1px solid #1a1d23;
394.piano .wk:hover { background: color-mix(in srgb, var(--c) 18%, #fff); }
395.piano .bk:hover { background: color-mix(in srgb, var(--c) 35%, #2b2f38); }
396.piano .echo.wk { background: color-mix(in srgb, var(--c) 30%, #fff); }
397.piano .echo.bk { background: color-mix(in srgb, var(--c) 45%, #2b2f38); }
398.piano .on { background: var(--c) !important; }
399.piano .on span { color: #fff; }
400.piano .down { box-shadow: inset 0 -5px 0 rgb(0 0 0 / 0.35); }
402.notes-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
403.notes-bar button { padding: 3px 8px; font-size: 12px; }
404.midi-btn { display: inline-flex; align-items: center; gap: 5px; }
405.midi-btn svg { width: 15px; height: 15px; }
406.midi-btn[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
407.notes-bar .check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
408.notes-bar .check input { accent-color: var(--c); margin: 0; }
409.notes-bar .quiet { margin-left: auto; }
410.notes-msg { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
411.notes-msg .note-names { color: var(--fg); font-variant-numeric: tabular-nums; }
412.piano .wk.on { border-right-color: rgb(0 0 0 / 0.3); }
414/* ---- MIDI knobs ---- */
416.eqn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
417#knobs[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
418.knob-msg { line-height: 1.45; }
419.link-btn { padding: 0; border: none; background: none; color: var(--accent); font-size: inherit; text-decoration: underline; cursor: pointer; }
420.knob { display: none; }
421.knobs-on .row { grid-template-columns: 56px minmax(0, 1fr) 56px 44px; }
422.knobs-on .knob {
423 display: block;
424 padding: 2px 0;
425 font-size: 11px;
426 font-variant-numeric: tabular-nums;
427 color: var(--muted);
428 border: 1px dashed var(--line);
429 border-radius: 6px;
430 background: none;
431 white-space: nowrap;
574ea55Tracks, SoundFonts, sessions, recording and MIDIJeremy Magland 433.knobs-on .knob:hover { color: var(--accent); border-color: var(--accent); }
434.knobs-on .knob.set { color: var(--fg); border-style: solid; background: var(--panel); }
435.knobs-on .knob.learning { color: #fff; background: var(--accent); border: 1px solid var(--accent); animation: knob-pulse 1s ease-in-out infinite; }
436@keyframes knob-pulse { 50% { opacity: 0.55; } }
437.row.turned input[type="range"] { filter: brightness(1.25) saturate(1.3); }
438.row.turned .knob.set { border-color: var(--accent); color: var(--accent); }
↑↓ move↵openescclose