mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 21:04:32 +01:00
The section keeps one DRUM-X kit: the sound dice and INIT SOUND on a DRUM track leave it alone when another track plays DRUM (as preset browsing already did since 0.8.1), saying KIT OF T? KEPT / INIT, KIT KEPT; ui_test covers both cases. web/landing/frecuencia.html: an interactive ladder of frequency in octaves from the solar cycle to PET gamma rays, drawn as a natural-history atlas, with four sounding examples (polyrhythm to chord, LFO to FM, note to colour, day to LFO) in EN/ES/ZH/JA; linked from the front page and copied by the Pages workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
1367 lines
145 KiB
HTML
1367 lines
145 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||
<title>Frequency in nature · JIANT FM</title>
|
||
<meta name="description" content="Frequency in nature: one logarithmic ladder from the Sun's 11-year cycle to gamma rays, in octaves of A 440 Hz, drawn as a natural-history atlas, and four sounding examples of how a synthesizer already lives in it. By JIANT FM.">
|
||
<meta property="og:title" content="Frequency in nature · JIANT FM">
|
||
<meta property="og:description" content="Matter is light, colour is frequency. A polyrhythm sped up becomes a chord; a solar cycle is, at some point, an LFO.">
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Michroma&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Sans:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Noto+Sans+SC:wght@400;500&family=Noto+Sans+JP:wght@400;500&display=swap">
|
||
<style>
|
||
/* (JIANT) "La frecuencia en la naturaleza", as a natural-history atlas: plates (LÁM. I..VI) on a black ground, bone-white
|
||
hairlines and type, and the heat ramp only for what is alive or hot. Every organism is drawn the way the FM-1 draws
|
||
its creatures on HOME (firmware/src/ui_being.c, ported in web/landing/index.html): nested isotherms, hotter inward */
|
||
:root{
|
||
color-scheme:dark;
|
||
--void:#050409;
|
||
--ink:#08070d;
|
||
--line:#efe6c8;
|
||
--bone:rgba(239,230,200,.74);
|
||
--text:#ddd6ea;
|
||
--dim:#a39cba;
|
||
--faint:rgba(239,230,200,.42);
|
||
--rule:rgba(239,230,200,.16);
|
||
--hair:rgba(239,230,200,.28);
|
||
--cyan:#00d0ff;
|
||
--violet:#b530e6;
|
||
--red:#f72831;
|
||
--orange:#ff7900;
|
||
--yellow:#ffd400;
|
||
--mag:#ff3ea5;
|
||
--display:"Michroma","Arial Black",system-ui,sans-serif;
|
||
--serif:"Cormorant Garamond","Iowan Old Style","Palatino Linotype",Georgia,serif;
|
||
--body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
|
||
--mono:"IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace;
|
||
--heat:linear-gradient(90deg,#00d0ff,#5a3cff 18%,#b530e6 36%,#f72831 54%,#ff7900 72%,#ffd400 88%,#fff);
|
||
}
|
||
:lang(zh){--body:"Instrument Sans","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif}
|
||
:lang(ja){--body:"Instrument Sans","Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif}
|
||
:lang(zh) h1,:lang(zh) h2,:lang(zh) h3,:lang(ja) h1,:lang(ja) h2,:lang(ja) h3,:lang(zh) .epi,:lang(ja) .epi{font-family:var(--body)!important;font-style:normal!important;font-weight:500!important;letter-spacing:0!important}
|
||
*{box-sizing:border-box}
|
||
html{background:var(--void);scroll-behavior:smooth}
|
||
body{margin:0;background:var(--void);color:var(--text);font:16px/1.65 var(--body);overflow-x:hidden}
|
||
a{color:inherit}
|
||
button{font-family:inherit}
|
||
:focus-visible{outline:1px solid var(--line);outline-offset:3px}
|
||
::selection{background:var(--line);color:var(--void)}
|
||
#bg{position:fixed;inset:0;width:100%;height:100%;z-index:0;display:block}
|
||
.veil{position:fixed;inset:0;z-index:1;pointer-events:none;background:rgba(5,4,9,.8);opacity:0}
|
||
.wrap{position:relative;z-index:2;max-width:1160px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:14px 40px;display:flex;flex-direction:column;gap:clamp(72px,10vw,128px)}
|
||
|
||
/* labels: small capitals in mono, widely spaced */
|
||
.sc{font:500 10.5px/1.4 var(--mono);letter-spacing:.2em;text-transform:uppercase;color:var(--dim)}
|
||
:lang(zh) .sc,:lang(ja) .sc{letter-spacing:.08em}
|
||
.latin{font:italic 400 1.15em/1.2 var(--serif);color:var(--line);letter-spacing:.01em}
|
||
|
||
/* masthead */
|
||
.top{display:flex;justify-content:space-between;align-items:center;gap:10px 18px;flex-wrap:wrap;padding:10px 0 12px;border-bottom:1px solid var(--rule)}
|
||
.top a.home{text-decoration:none}
|
||
.top a.home b{color:var(--line);font-weight:600}
|
||
.top a.home:hover b{color:var(--yellow)}
|
||
.lang{display:inline-flex;flex-wrap:wrap;gap:2px}
|
||
.lang button{font:500 10.5px/1 var(--mono);letter-spacing:.12em;color:var(--dim);background:transparent;border:1px solid transparent;padding:7px 9px;cursor:pointer}
|
||
.lang button[lang="zh"]{font-family:"Noto Sans SC",var(--mono);letter-spacing:0}
|
||
.lang button[lang="ja"]{font-family:"Noto Sans JP",var(--mono);letter-spacing:0}
|
||
.lang button:hover{color:var(--line)}
|
||
.lang button[aria-pressed="true"]{color:var(--line);border-color:var(--hair)}
|
||
|
||
/* frontispiece */
|
||
.cover{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:24px 48px;align-items:end;min-height:min(84svh,860px);padding-top:24px}
|
||
.cover .txt{padding-bottom:10px}
|
||
h1{font:400 clamp(54px,8.2vw,112px)/.95 var(--serif);letter-spacing:-.01em;margin:14px 0 0;color:var(--line)}
|
||
h1 .fm{display:block;font-style:italic;background:var(--heat);-webkit-background-clip:text;background-clip:text;color:transparent;padding-bottom:.08em}
|
||
:lang(zh) h1,:lang(ja) h1{font-size:clamp(42px,10vw,104px);line-height:1.15}
|
||
.sub{margin:22px 0 0;max-width:40ch;color:var(--bone);font-size:15px}
|
||
.down{display:inline-flex;gap:10px;align-items:center;margin-top:28px;text-decoration:none;color:var(--line);border-bottom:1px solid var(--hair);padding-bottom:4px}
|
||
.down:hover{border-color:var(--line)}
|
||
figure{margin:0}
|
||
.fig canvas{display:block;width:100%}
|
||
figcaption{font:italic 400 15px/1.45 var(--serif);color:var(--bone);margin-top:10px;max-width:60ch}
|
||
figcaption .sc{font-style:normal;margin-right:6px;color:var(--line)}
|
||
:lang(zh) figcaption,:lang(ja) figcaption{font-family:var(--body);font-style:normal;font-size:13px}
|
||
#cover-cv{aspect-ratio:1/1;max-height:560px}
|
||
|
||
/* the epigraph */
|
||
.epi-wrap{display:grid;grid-template-columns:120px minmax(0,1fr);gap:20px 32px;max-width:980px}
|
||
.epi-wrap .sc{padding-top:12px;border-top:1px solid var(--rule)}
|
||
.epi{font:italic 400 clamp(24px,3.2vw,38px)/1.28 var(--serif);color:var(--line);margin:0}
|
||
.epi-wrap p.b{grid-column:2;margin:0;max-width:62ch;color:var(--bone)}
|
||
|
||
/* plates */
|
||
.plate{position:relative;scroll-margin-top:16px}
|
||
.pl-hd{display:flex;align-items:baseline;gap:16px;margin-bottom:22px}
|
||
.pl-hd .no{font:500 11px/1 var(--mono);letter-spacing:.22em;text-transform:uppercase;color:var(--line);white-space:nowrap}
|
||
.pl-hd .rl{flex:1 1 auto;height:1px;background:var(--rule);align-self:center}
|
||
.pl-hd .eb{white-space:nowrap}
|
||
h2{font:400 clamp(32px,4.4vw,54px)/1.05 var(--serif);letter-spacing:-.005em;margin:0 0 16px;color:var(--line);text-wrap:balance}
|
||
h2 em{font-style:italic}
|
||
.intro{max-width:60ch;margin:0;color:var(--text)}
|
||
.intro+.intro{margin-top:12px}
|
||
.note{max-width:60ch;margin:14px 0 0;color:var(--dim);font-size:14px;padding-left:14px;border-left:1px solid var(--rule)}
|
||
.frame{--bc:var(--hair);--k:9px;position:relative;padding:16px;
|
||
background:
|
||
linear-gradient(var(--bc),var(--bc)) 0 0/var(--k) 1px,linear-gradient(var(--bc),var(--bc)) 0 0/1px var(--k),
|
||
linear-gradient(var(--bc),var(--bc)) 100% 0/var(--k) 1px,linear-gradient(var(--bc),var(--bc)) 100% 0/1px var(--k),
|
||
linear-gradient(var(--bc),var(--bc)) 0 100%/var(--k) 1px,linear-gradient(var(--bc),var(--bc)) 0 100%/1px var(--k),
|
||
linear-gradient(var(--bc),var(--bc)) 100% 100%/var(--k) 1px,linear-gradient(var(--bc),var(--bc)) 100% 100%/1px var(--k),
|
||
rgba(5,4,9,.86);
|
||
background-repeat:no-repeat}
|
||
|
||
/* controls: hairlines, small caps */
|
||
.btn{display:inline-flex;align-items:center;gap:10px;font:500 10.5px/1.1 var(--mono);letter-spacing:.16em;text-transform:uppercase;text-decoration:none;padding:11px 14px;border:1px solid var(--hair);background:transparent;color:var(--line);cursor:pointer;transition:border-color .2s,color .2s,background .2s}
|
||
:lang(zh) .btn,:lang(ja) .btn{letter-spacing:.04em}
|
||
.btn:hover{border-color:var(--line)}
|
||
.btn.hot{background:var(--line);border-color:var(--line);color:var(--void);font-weight:600}
|
||
.btn.hot:hover{background:#fff}
|
||
.btn.hot[aria-pressed="true"]{background:transparent;color:var(--line);border-image:var(--heat) 1}
|
||
.btn .ic{width:0;height:0;border-left:8px solid currentColor;border-top:5px solid transparent;border-bottom:5px solid transparent;flex:none}
|
||
.btn[aria-pressed="true"] .ic{width:8px;height:8px;border:0;background:currentColor}
|
||
.btn.sm{padding:8px 11px;font-size:10px}
|
||
.btn.sm[aria-pressed="true"]{color:var(--yellow);border-color:var(--yellow)}
|
||
.seg{display:inline-flex;flex-wrap:wrap;gap:0;border:1px solid var(--rule)}
|
||
.seg button{font:500 10px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--dim);background:transparent;border:0;padding:9px 10px;cursor:pointer}
|
||
.seg button+button{border-left:1px solid var(--rule)}
|
||
.seg button:hover{color:var(--line)}
|
||
.seg button[aria-pressed="true"]{color:var(--void);background:var(--line)}
|
||
:lang(zh) .seg button,:lang(ja) .seg button{letter-spacing:.02em}
|
||
.row{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
|
||
.ctl{display:grid;grid-template-columns:minmax(0,auto) minmax(0,1fr) auto;gap:4px 14px;align-items:center}
|
||
.ctl output{font:12px/1 var(--mono);color:var(--line);min-width:8ch;text-align:right}
|
||
input[type=range]{width:100%;margin:0;height:26px;background:transparent;-webkit-appearance:none;appearance:none;cursor:pointer}
|
||
input[type=range]::-webkit-slider-runnable-track{height:1px;background:var(--hair)}
|
||
input[type=range]::-moz-range-track{height:1px;background:var(--hair)}
|
||
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:13px;height:13px;border-radius:50%;background:var(--void);border:1px solid var(--line);margin-top:-6px}
|
||
input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--void);border:1px solid var(--line)}
|
||
input[type=range]:focus-visible{outline:1px solid var(--line);outline-offset:2px}
|
||
.state{display:inline-flex;align-items:center;gap:9px;font:500 10.5px/1.3 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--line)}
|
||
.state::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--dot,var(--line));box-shadow:0 0 10px var(--dot,transparent)}
|
||
:lang(zh) .state,:lang(ja) .state{letter-spacing:.04em}
|
||
.read{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 14px;font:12px/1.5 var(--mono);color:var(--dim);margin:0}
|
||
.read dt{color:var(--dim)}
|
||
.read dd{margin:0;color:var(--line);overflow-wrap:anywhere}
|
||
|
||
/* the ladder */
|
||
.ladder{display:flex;flex-direction:column;gap:12px;min-width:0}
|
||
.bar{display:flex;flex-wrap:wrap;gap:4px 2px;align-items:center}
|
||
.chip{font:500 10px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--dim);background:transparent;border:0;border-bottom:1px solid transparent;padding:7px 8px;cursor:pointer}
|
||
.chip:hover{color:var(--line)}
|
||
.chip[aria-pressed="true"]{color:var(--line);border-bottom-color:var(--line)}
|
||
:lang(zh) .chip,:lang(ja) .chip{letter-spacing:.02em}
|
||
.bar .sp{flex:1 1 auto}
|
||
.zoom{display:inline-flex;border:1px solid var(--rule)}
|
||
.zoom button{font:400 15px/1 var(--mono);width:32px;height:28px;color:var(--line);background:transparent;border:0;cursor:pointer}
|
||
.zoom button+button{border-left:1px solid var(--rule)}
|
||
#lad{display:block;width:100%;height:410px;touch-action:pan-y;cursor:grab}
|
||
#lad:active{cursor:grabbing}
|
||
.lad-cap{display:flex;justify-content:space-between;gap:4px 14px;flex-wrap:wrap}
|
||
.lad-cap span:last-child{font:11px/1.4 var(--mono);color:var(--dim)}
|
||
.spec{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px 28px;padding-top:18px;border-top:1px solid var(--rule)}
|
||
#i-cv{width:220px;height:220px;display:block}
|
||
.label-card{display:flex;flex-direction:column;gap:10px;min-width:0}
|
||
.label-card .latin{font-size:26px}
|
||
.label-card h3{font:500 15px/1.35 var(--body);margin:0;color:var(--bone);display:flex;align-items:center;gap:10px}
|
||
.label-card h3 .dot{width:7px;height:7px;border-radius:50%;flex:none}
|
||
.label-card p{margin:0;max-width:60ch}
|
||
.label-card .nav{display:flex;gap:8px;margin-top:4px}
|
||
|
||
/* plates with a figure beside the text */
|
||
.split{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:28px 48px;align-items:start}
|
||
.inst{display:flex;flex-direction:column;gap:14px;min-width:0}
|
||
.inst canvas{display:block;width:100%}
|
||
.voices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
|
||
.voices div{padding:4px 0 0 10px;border-left:1px solid var(--c);font:11.5px/1.5 var(--mono);color:var(--dim);min-width:0;overflow-wrap:anywhere}
|
||
.voices b{color:var(--line);font-weight:500;display:block}
|
||
|
||
/* the keyboard of pigments */
|
||
.keys{position:relative;height:118px;display:flex;gap:2px;user-select:none;-webkit-user-select:none}
|
||
.key{flex:1 1 0;min-width:0;border:1px solid rgba(0,0,0,.4);cursor:pointer;position:relative;background:#e9e2cc;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;padding:0 0 8px;font:500 10px/1 var(--mono);color:#1a1720}
|
||
.key .pg{width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.35)}
|
||
.key.bk{position:absolute;top:0;height:58%;width:calc((100% - 14px) / 8 * .6);background:#16141b;border-color:#000;color:var(--line);z-index:2;padding-bottom:6px}
|
||
.key.on{box-shadow:inset 0 -3px 0 var(--void)}
|
||
.key.bk.on{box-shadow:inset 0 -3px 0 var(--line)}
|
||
.colour{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:center}
|
||
#c-cv{aspect-ratio:1/1;max-width:300px;justify-self:center}
|
||
#c-spec{height:68px}
|
||
.spec-cap{display:flex;justify-content:space-between;gap:8px;font:10px/1.4 var(--mono);color:var(--dim);margin-top:4px}
|
||
|
||
/* back in JIANT: three specimens */
|
||
.organs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-top:1px solid var(--rule)}
|
||
.org{padding:22px 22px 8px;display:flex;flex-direction:column;gap:8px;min-width:0;border-bottom:1px solid var(--rule)}
|
||
.org+.org{border-left:1px solid var(--rule)}
|
||
.org canvas{display:block;width:100%;height:150px}
|
||
.org h3{font:400 24px/1.15 var(--serif);margin:4px 0 0;color:var(--line)}
|
||
.org p{margin:0;font-size:14.5px;color:var(--text)}
|
||
.coda{display:grid;grid-template-columns:120px minmax(0,1fr);gap:20px 32px;max-width:980px}
|
||
.coda .sc{padding-top:12px;border-top:1px solid var(--rule)}
|
||
.coda p{margin:0;font:italic 400 clamp(24px,3vw,36px)/1.3 var(--serif);color:var(--line)}
|
||
.ctas{grid-column:2;display:flex;gap:12px;flex-wrap:wrap}
|
||
:lang(zh) .coda p,:lang(ja) .coda p{font-family:var(--body);font-style:normal;font-size:clamp(18px,2.4vw,26px)}
|
||
|
||
footer{display:flex;justify-content:space-between;gap:10px 18px;flex-wrap:wrap;padding:16px 0;border-top:1px solid var(--rule);font:11px/1.6 var(--mono);letter-spacing:.04em;color:var(--dim)}
|
||
footer a{color:var(--line)}
|
||
footer .tm{flex-basis:100%;letter-spacing:0}
|
||
|
||
@media (max-width:900px){
|
||
.cover{grid-template-columns:minmax(0,1fr);min-height:0}
|
||
.cover .fig{max-width:340px;width:100%;justify-self:center;order:2}
|
||
.split{grid-template-columns:minmax(0,1fr)}
|
||
.organs{grid-template-columns:minmax(0,1fr)}
|
||
.org+.org{border-left:0}
|
||
.spec{grid-template-columns:minmax(0,1fr)}
|
||
#i-cv{width:100%;max-width:300px;height:200px;justify-self:center}
|
||
}
|
||
@media (max-width:600px){
|
||
.epi-wrap,.coda{grid-template-columns:minmax(0,1fr)}
|
||
.epi-wrap p.b,.ctas{grid-column:1}
|
||
#lad{height:400px}
|
||
.voices{grid-template-columns:minmax(0,1fr)}
|
||
.colour{grid-template-columns:minmax(0,1fr)}
|
||
.pl-hd .eb{display:none}
|
||
.frame{padding:12px}
|
||
}
|
||
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}html{scroll-behavior:auto}}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<canvas id="bg" aria-hidden="true"></canvas>
|
||
<div class="veil" id="veil" aria-hidden="true"></div>
|
||
|
||
<div class="wrap">
|
||
<header class="top">
|
||
<a class="home sc" href="./">← <b>JIANT</b> FM · M-VAVE FM-1</a>
|
||
<span class="sc" data-i18n="live">frequency · nature · synthesis</span>
|
||
<div class="lang" role="group" aria-label="Language">
|
||
<button type="button" id="lang-en" data-lang="en" aria-pressed="true">EN</button>
|
||
<button type="button" id="lang-es" data-lang="es" aria-pressed="false" lang="es">ES</button>
|
||
<button type="button" id="lang-zh" data-lang="zh" aria-pressed="false" lang="zh">中文</button>
|
||
<button type="button" id="lang-ja" data-lang="ja" aria-pressed="false" lang="ja">日本語</button>
|
||
</div>
|
||
</header>
|
||
|
||
<section class="cover">
|
||
<div class="txt">
|
||
<p class="sc" data-i18n="kicker">a page about frequency</p>
|
||
<h1><span data-i18n="h1a">Frequency</span><span class="fm" data-i18n="h1b">in nature</span></h1>
|
||
<p class="sub" data-i18n="sub">An atlas of things that come back: from the Sun’s slow cycle to the light inside a leaf, measured in octaves of A, 440 Hz.</p>
|
||
<a class="down sc" href="#ladder"><span data-i18n="down">climb the ladder</span> ↓</a>
|
||
</div>
|
||
<figure class="fig">
|
||
<canvas id="cover-cv" aria-hidden="true"></canvas>
|
||
<figcaption><span class="sc">Fig. 1</span><span data-i18n="fig1">Radiolarian, as the FM-1 draws it on HOME: four isotherms, hotter inward. Its outline breathes with its own sound.</span></figcaption>
|
||
</figure>
|
||
</section>
|
||
|
||
<section class="epi-wrap">
|
||
<span class="sc" data-i18n="epi_k">epigraph</span>
|
||
<p class="epi" data-i18n="m1">Everything vibrates. Matter is light, light is frequency, colour is frequency. A percussion polyrhythm, sped up, becomes a chord; a solar cycle is, at some point, an LFO.</p>
|
||
<p class="b" data-i18n="m2">This synth and this system are about that: how frequencies relate in nature, from the slowest to the fastest, and how much of it a synthesizer already uses. The unit is the octave: twice as fast. The reference is A, 440 Hz.</p>
|
||
</section>
|
||
|
||
<section class="plate" id="ladder">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> I</span><span class="rl"></span><span class="eb sc" data-i18n="l_eb">the ladder</span></div>
|
||
<h2 data-i18n="l_h2">One ladder, almost a hundred octaves</h2>
|
||
<p class="intro" data-i18n="l_in">Each rung is an octave: twice as fast. A 440 Hz is rung zero. A day sits 25 octaves below it; visible light about 40 above, and it fills exactly one octave. Drag, zoom, tap a point.</p>
|
||
<p class="note" data-i18n="l_note">Sound is moving air; light is an electromagnetic field. They are different things, but cycles per second are counted the same way, and doubling them is always an octave.</p>
|
||
<div class="ladder frame" style="margin-top:26px">
|
||
<div class="bar" id="jumps" role="group" aria-label="Jump">
|
||
<button type="button" class="chip" data-j="all" data-i18n="j_all">all</button>
|
||
<button type="button" class="chip" data-j="sky" data-i18n="j_sky">sky</button>
|
||
<button type="button" class="chip" data-j="body" data-i18n="j_body">body</button>
|
||
<button type="button" class="chip" data-j="lfo" data-i18n="j_lfo">LFO</button>
|
||
<button type="button" class="chip" data-j="beat" data-i18n="j_beat">rhythm</button>
|
||
<button type="button" class="chip" data-j="sound" data-i18n="j_sound">sound</button>
|
||
<button type="button" class="chip" data-j="radio" data-i18n="j_radio">radio</button>
|
||
<button type="button" class="chip" data-j="heat" data-i18n="j_heat">heat</button>
|
||
<button type="button" class="chip" data-j="light" data-i18n="j_light">light</button>
|
||
<button type="button" class="chip" data-j="gamma" data-i18n="j_gamma">gamma</button>
|
||
<span class="sp"></span>
|
||
<span class="zoom"><button type="button" id="z-out" aria-label="Zoom out">−</button><button type="button" id="z-in" aria-label="Zoom in">+</button></span>
|
||
</div>
|
||
<canvas id="lad" tabindex="0" role="img" aria-label="A logarithmic frequency scale in octaves of A 440 Hz, from the solar cycle to gamma rays, with an organism for each point"></canvas>
|
||
<div class="lad-cap"><span class="sc" data-i18n="l_hint">drag to move · wheel or pinch to zoom · tap a point</span><span id="lad-view"></span></div>
|
||
<div class="spec" id="info" aria-live="polite">
|
||
<canvas id="i-cv" aria-hidden="true"></canvas>
|
||
<div class="label-card">
|
||
<span class="sc"><span data-i18n="sp_spec">specimen</span> <span id="i-no"></span></span>
|
||
<span class="latin" id="i-lat"></span>
|
||
<h3><span class="dot" id="i-dot"></span><span id="i-name"></span></h3>
|
||
<p id="i-t"></p>
|
||
<dl class="read">
|
||
<dt data-i18n="i_freq">frequency</dt><dd id="i-f"></dd>
|
||
<dt id="i-p-l" data-i18n="i_period">period</dt><dd id="i-p"></dd>
|
||
<dt data-i18n="i_oct">octaves from A440</dt><dd id="i-o"></dd>
|
||
<dt data-i18n="i_note">as a note</dt><dd id="i-n"></dd>
|
||
</dl>
|
||
<div class="nav"><button type="button" class="btn sm" id="i-prev" data-i18n="i_prev">‹ previous</button><button type="button" class="btn sm" id="i-next" data-i18n="i_next">next ›</button></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<figcaption><span class="sc">Fig. 2</span><span data-i18n="fig2">The ladder of frequencies, in octaves of A 440 Hz. Living things in the heat ramp; non-living things in bone.</span></figcaption>
|
||
</section>
|
||
|
||
<section class="plate" id="poly">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> II</span><span class="rl"></span><span class="eb sc" data-i18n="a_eb">rhythm → pitch</span></div>
|
||
<div class="split">
|
||
<div>
|
||
<h2 data-i18n="a_h2">A rhythm, sped up, is a chord</h2>
|
||
<p class="intro" data-i18n="a_p">Three pulses in the ratio 4:5:6. Slow, it is a polyrhythm: you can count it. Fast, you can’t count it anymore and the ear fuses it into pitch: a major triad. Between the two there is no border, only speed. DRUM-X’s polyrhythms and the sequencer’s ratchets are chords played very slowly.</p>
|
||
</div>
|
||
<figure class="inst">
|
||
<div class="row">
|
||
<button type="button" class="btn hot" id="a-play" aria-pressed="false"><span class="ic"></span><span data-i18n="play">Play</span></button>
|
||
<button type="button" class="btn sm" id="a-sweep" aria-pressed="false" data-i18n="a_sweep">sweep ↗</button>
|
||
<span class="seg" id="a-ratio" role="group" aria-label="Ratio">
|
||
<button type="button" data-r="4,5,6" aria-pressed="true" data-i18n="a_r1">4:5:6 · major</button>
|
||
<button type="button" data-r="10,12,15" aria-pressed="false" data-i18n="a_r2">10:12:15 · minor</button>
|
||
<button type="button" data-r="2,3,5" aria-pressed="false" data-i18n="a_r3">2:3:5 · open</button>
|
||
</span>
|
||
</div>
|
||
<div class="frame" style="padding:0"><canvas id="a-cv" style="height:250px" aria-hidden="true"></canvas></div>
|
||
<label class="ctl"><span class="sc" data-i18n="a_speed">speed</span><input type="range" id="a-rate" min="0" max="1" step="0.001" value="0"><output id="a-rate-o"></output></label>
|
||
<span class="state" id="a-state"></span>
|
||
<div class="voices" id="a-voices"></div>
|
||
<figcaption><span class="sc">Fig. 3</span><span data-i18n="fig3">A chorus of three fireflies flashing in 4:5:6. Sped up, the flashes merge into a steady glow and the clicks into a major chord.</span></figcaption>
|
||
</figure>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="plate" id="fm">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> III</span><span class="rl"></span><span class="eb sc" data-i18n="b_eb">LFO → FM</span></div>
|
||
<div class="split">
|
||
<div>
|
||
<h2 data-i18n="b_h2">Two frequencies talking</h2>
|
||
<p class="intro" data-i18n="b_p">One oscillator moves another. Slowly, it is an LFO: tremolo, vibrato, a breath. Push the rate past about 20 Hz and the movement stops sounding like movement: new frequencies appear on both sides of the tone (sidebands) and the timbre changes. That is FM synthesis. JIANT’s FM6 engine is six oscillators talking like this.</p>
|
||
</div>
|
||
<figure class="inst">
|
||
<div class="row">
|
||
<button type="button" class="btn hot" id="b-play" aria-pressed="false"><span class="ic"></span><span data-i18n="play">Play</span></button>
|
||
<span class="seg" id="b-mode" role="group" aria-label="Mode">
|
||
<button type="button" data-m="fm" aria-pressed="true" data-i18n="b_fm">FM (pitch)</button>
|
||
<button type="button" data-m="am" aria-pressed="false" data-i18n="b_am">AM (volume)</button>
|
||
</span>
|
||
</div>
|
||
<div class="frame" style="padding:0"><canvas id="b-cv" style="height:280px" aria-hidden="true"></canvas></div>
|
||
<label class="ctl"><span class="sc" data-i18n="b_rate">modulation rate</span><input type="range" id="b-rate" min="0" max="1" step="0.001" value="0.25"><output id="b-rate-o"></output></label>
|
||
<label class="ctl"><span class="sc" data-i18n="b_depth">depth</span><input type="range" id="b-depth" min="0" max="1" step="0.01" value="0.35"><output id="b-depth-o"></output></label>
|
||
<span class="state" id="b-state"></span>
|
||
<dl class="read" id="b-read"></dl>
|
||
<figcaption><span class="sc">Fig. 4</span><span data-i18n="fig4">A ciliate breathing with its modulator. Slow, it swells; at audio rate it stops breathing and its membrane ripples instead: each ripple is a sideband.</span></figcaption>
|
||
</figure>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="plate" id="colour">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> IV</span><span class="rl"></span><span class="eb sc" data-i18n="c_eb">note → colour</span></div>
|
||
<div class="split">
|
||
<div>
|
||
<h2 data-i18n="c_h2">The colour of a note</h2>
|
||
<p class="intro" data-i18n="c_p">Double 440 Hz forty times and you reach 484 THz: light of 620 nm, orange-red. Visible light spans exactly one octave (400–800 THz), so every note has one colour, and only one. It is a game of octaves, not physics: a note does not glow. But the ratio is the same: an octave is a doubling, in air and in light.</p>
|
||
<p class="intro" data-i18n="c_p2">Look how the octave closes like a colour wheel: violet sits next to red.</p>
|
||
</div>
|
||
<figure class="inst">
|
||
<div class="row">
|
||
<button type="button" class="btn hot" id="c-play" aria-pressed="false"><span class="ic"></span><span data-i18n="c_run">Play the octave</span></button>
|
||
<span class="seg" role="group" aria-label="Octave"><button type="button" id="c-down" aria-label="Octave down">−</button><button type="button" id="c-oct" disabled style="color:var(--line)">C4</button><button type="button" id="c-up" aria-label="Octave up">+</button></span>
|
||
<span class="sc" data-i18n="c_tip">or tap a key</span>
|
||
</div>
|
||
<div class="colour">
|
||
<canvas id="c-cv" aria-label="A flower of twelve petals, one per semitone" role="img"></canvas>
|
||
<dl class="read" id="c-read"></dl>
|
||
</div>
|
||
<div class="keys" id="keys"></div>
|
||
<div>
|
||
<canvas id="c-spec" aria-hidden="true"></canvas>
|
||
<div class="spec-cap"><span>400 THz · 749 nm</span><span data-i18n="c_one">one octave of light</span><span>800 THz · 375 nm</span></div>
|
||
</div>
|
||
<button type="button" class="btn sm" id="c-ladder" style="align-self:flex-start" data-i18n="c_ladder">see it on the ladder ↑</button>
|
||
<figcaption><span class="sc">Fig. 5</span><span data-i18n="fig5">The chromatic flower: twelve petals, one per semitone, each painted with its note’s light. Below, the visible octave and what chlorophyll a absorbs.</span></figcaption>
|
||
</figure>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="plate" id="day">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> V</span><span class="rl"></span><span class="eb sc" data-i18n="d_eb">day → LFO</span></div>
|
||
<div class="split">
|
||
<div>
|
||
<h2 data-i18n="d_h2">A day is a very slow LFO</h2>
|
||
<p class="intro" data-i18n="d_p">The sun rises and sets once every 24 h: 11.6 µHz. Speed it up octave by octave. At 16 octaves it is a slow LFO (0.76 Hz) breathing on a drone; at 25 it sounds by itself (388 Hz, close to a G). The shape stays the same; only the scale changes. The Sun’s 11-year cycle, 32 octaves up, is a 12 Hz LFO.</p>
|
||
</div>
|
||
<figure class="inst">
|
||
<div class="row">
|
||
<button type="button" class="btn hot" id="d-play" aria-pressed="false"><span class="ic"></span><span data-i18n="play">Play</span></button>
|
||
<button type="button" class="btn sm" id="d-ladder" data-i18n="c_ladder">see it on the ladder ↑</button>
|
||
</div>
|
||
<div class="frame" style="padding:0"><canvas id="d-cv" style="height:280px" aria-hidden="true"></canvas></div>
|
||
<label class="ctl"><span class="sc" data-i18n="d_speed">octaves above the day</span><input type="range" id="d-oct" min="0" max="26" step="0.25" value="0"><output id="d-oct-o"></output></label>
|
||
<span class="state" id="d-state"></span>
|
||
<dl class="read" id="d-read"></dl>
|
||
<figcaption><span class="sc">Fig. 6</span><span data-i18n="fig6">A young sunflower follows the sun by day and turns back east at night, led by its inner clock (Helianthus annuus). Sped up 25 octaves, its day becomes a note.</span></figcaption>
|
||
</figure>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="plate" id="jiant">
|
||
<div class="pl-hd"><span class="no"><span data-i18n="pl">Plate</span> VI</span><span class="rl"></span><span class="eb sc" data-i18n="j_eb">in JIANT FM</span></div>
|
||
<h2 data-i18n="j_h2">The same gestures, inside the FM-1</h2>
|
||
<div class="organs" style="margin-top:22px">
|
||
<div class="org"><canvas class="sp-cv" data-sp="1" aria-hidden="true"></canvas><span class="sc">FM6 · <span class="latin" style="text-transform:none;letter-spacing:0">pollen</span></span><h3 data-i18n="j1_h">FM synthesis</h3><p data-i18n="j1_p">Six operators, 32 algorithms: each one an oscillator that moves the frequency of another. What plate III does with two, FM6 does with six, and it reads DX7 banks.</p></div>
|
||
<div class="org"><canvas class="sp-cv" data-sp="7" aria-hidden="true"></canvas><span class="sc">DRUM-X · <span class="latin" style="text-transform:none;letter-spacing:0">colonia</span></span><h3 data-i18n="j2_h">Rhythm on the edge of pitch</h3><p data-i18n="j2_p">A drum kit on the edge of pitch: polyrhythms, ratchets and X-MOD’s tempo-locked LFO. Play a roll fast enough and it stops being a roll: it becomes a tone.</p></div>
|
||
<div class="org"><canvas class="sp-cv" data-sp="0" aria-hidden="true"></canvas><span class="sc">ANALOG · <span class="latin" style="text-transform:none;letter-spacing:0">radiolaria</span></span><h3 data-i18n="j3_h">Microscope, thermal camera, spectrum</h3><p data-i18n="j3_p">The firmware looks at sound the way we look at nature: through a microscope (the creatures on HOME), with a thermal camera (their heat ramp, the palette of the infrared your body emits) and as a spectrum.</p></div>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="coda">
|
||
<span class="sc" data-i18n="k_k">colophon</span>
|
||
<p data-i18n="k_p">From sunlight to the A of a keyboard there are forty rungs. They are all the same gesture: something that comes back.</p>
|
||
<div class="ctas">
|
||
<a class="btn hot" href="https://juanjiant-bit.github.io/JIANT/emu/"><span class="ic"></span><span data-i18n="k_emu">Try JIANT in the browser</span></a>
|
||
<a class="btn" href="./" data-i18n="k_home">Back to JIANT FM</a>
|
||
</div>
|
||
</section>
|
||
|
||
<footer>
|
||
<span>JIANT FM · Juan Jiant · Buenos Aires</span>
|
||
<span><a href="./" data-i18n="f_home">JIANT FM</a> · <a href="https://github.com/juanjiant-bit/JIANT" target="_blank" rel="noopener">GitHub</a> · <a href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank" rel="noopener">GPL-3.0</a></span>
|
||
<span class="tm" data-i18n="f_audio">Sound starts only when you press play. Headphones at low volume.</span>
|
||
<span class="tm" data-i18n="tm">Built on Felucca by Hügelton Instruments. M-VAVE and FM-1 are trademarks of their respective owners; JIANT is not affiliated with or endorsed by them, nor with Hügelton Instruments.</span>
|
||
</footer>
|
||
</div>
|
||
|
||
<script>
|
||
/* languages (as web/landing/index.html): EN is the page's own text plus the strings drawn by code; ES, 中文, 日本語;
|
||
the browser's language at first, then the choice, shared with the landing ('jiant-lang', when storage allows) */
|
||
const I18N=(function(){
|
||
const EN_DYN={doc_title:'Frequency in nature · JIANT FM',play:'Play',stop:'Stop',c_run:'Play the octave',
|
||
i_wl:'wavelength',i_wla:'wavelength in air',
|
||
r_sky:'sky · life',r_sound:'sound (air)',r_em:'light (EM)',r_fm1:'JIANT FM-1',
|
||
b_cycles:'cycles of the sky',b_life:'body & brain',b_infra:'infrasound',b_aud:'audible',b_ultra:'ultrasound',b_radio:'radio · microwave',b_ir:'infrared',b_vis:'visible',b_uv:'UV',b_x:'X-rays',b_gamma:'gamma',
|
||
b_lfo:'LFO 0.05–40 Hz',b_bpm:'BPM 40–240',b_pitch:'notes MIDI 0–127',b_keys:'keys F3–G5',
|
||
u_s:'s',u_min:'min',u_h:'h',u_d:'days',u_y:'years',u_oct1:'1 octave',u_oct10:'10 octaves',chl:'chlorophyll a · absorption',
|
||
a_rhythm:'you can count it: rhythm',a_flutter:'too fast to count: flutter',a_pitch:'pitch: a chord',
|
||
b_lfo_s:'LFO: you hear movement',b_rough:'in between: roughness',b_timbre:'audio rate: a new timbre',
|
||
b_car:'carrier',b_mod:'modulator',b_idx:'index β = Δf / fm',b_amd:'depth m',b_side:'sidebands at',b_org:'the organism',b_spec:'spectrum · lines = theory, fill = live',
|
||
c_note:'note',c_doub:'doublings',c_light:'as light',c_wl:'wavelength',c_col:'colour',
|
||
col_red:'red',col_orange:'orange',col_yellow:'yellow',col_green:'green',col_cyan:'cyan',col_blue:'blue',col_violet:'violet',
|
||
d_slow:'slower than any LFO',d_lfo:'LFO: it breathes on the drone',d_pitch:'pitch: you hear the sun itself',d_cyc:'one cycle every',d_f:'frequency',d_now:'now',
|
||
no_audio:'This browser has no Web Audio.',
|
||
m_solar:'Solar cycle (11 years)',t_solar:'The Sun’s magnetic field flips and its spots come and go every ~11 years; the carbon-14 in tree rings rises and falls with it. Raised 32 octaves, it is a 12 Hz LFO.',
|
||
m_year:'Year',t_year:'One trip around the Sun: seasons, migrations. A tree writes each one as a ring: a wooden recording of the slowest loop living things follow.',
|
||
m_lunar:'Lunar month',t_lunar:'New moon to new moon, 29.5 days. Once a year, days after a full moon, the corals of the Great Barrier Reef spawn together, timed by moonlight.',
|
||
m_day:'Day',t_day:'Light and dark, once every 24 h: 11.6 µHz, 25 octaves under A440 (as a note, a G). In 1729 de Mairan kept a mimosa in the dark: its leaves still opened and closed every day. The first sign of an inner clock.',
|
||
m_tide:'Tides',t_tide:'The Moon pulls the ocean twice a day, every 12 h 25 min: the sea breathes almost one octave above the day, detuned by the Moon. Anemones close when the water leaves.',
|
||
m_breath:'Breathing',t_breath:'About 15 breaths a minute, 0.25 Hz. A slow LFO: the swell of a pad that opens and closes.',
|
||
m_lfo:'FM-1 LFO',t_lfo:'RATE goes from 0.05 to 40 Hz, or in time with the tempo from 4 bars to 1/32. Its default, 1.18 Hz, beats almost like a heart.',
|
||
m_heart:'Heartbeat',t_heart:'About 72 beats a minute, 1.2 Hz. The tempo we measure music against: BPM means beats per minute, counted like a pulse.',
|
||
m_bpm:'120 BPM',t_bpm:'Two beats a second, the tempo of a new JIANT project. The FM-1 runs from 40 to 240 BPM (0.67–4 Hz).',
|
||
m_cricket:'Snowy tree cricket',t_cricket:'They chirp in unison, and faster when it is warmer: at 22 °C about 126 chirps a minute (Dolbear’s law, 1897). A thermometer that keeps time.',
|
||
m_schumann:'Schumann resonance',t_schumann:'Lightning keeps the cavity between the ground and the ionosphere ringing at 7.83 Hz: the Earth’s own electric hum. Its wavelength is about the Earth’s circumference.',
|
||
m_alpha:'Alpha waves',t_alpha:'Close your eyes and relax: groups of neurons fire together about 10 times a second. The brain is an oscillator bank.',
|
||
m_whale:'Fin whale (20 Hz)',t_whale:'Fin whales pulse at 20 Hz, right at the floor of human hearing: below it you feel beats, above it the ear fuses them into pitch. The song travels hundreds of kilometres.',
|
||
m_bee:'Bee wings',t_bee:'A honeybee beats its wings about 230 times a second: its buzz is that wingbeat, heard as a note.',
|
||
m_a440:'A 440 Hz',t_a440:'The tuning reference, octave 0 of this ladder. The FM-1’s keys span F3 to G5 (175–784 Hz) before shifting octaves.',
|
||
m_bird:'Canary song',t_bird:'A songbird’s syrinx has two sides that can sing two different notes at once: two oscillators in one throat. Canary song lies mostly between 2 and 8 kHz.',
|
||
m_cicada:'Cicada (~5 kHz)',t_cicada:'A cicada buckles its tymbals hundreds of times a second; the clicks ring in its hollow body as a song of a few kHz. A rhythm, sped up into pitch.',
|
||
m_hear20k:'Edge of hearing (20 kHz)',t_hear20k:'The top of a young ear; it falls with age. The FM-1 samples at 44.1 kHz, so it can draw waves up to 22.05 kHz.',
|
||
m_bat:'Bat echolocation',t_bat:'Bats shout between 20 and 120 kHz and listen to the echoes: they see with ultrasound.',
|
||
m_echo:'Medical ultrasound',t_echo:'Pressure waves of 2–15 MHz bounce inside the body and draw it: an echo you can look at.',
|
||
m_am:'AM radio',t_am:'Amplitude modulation: a voice rides on a 1 MHz carrier by changing its loudness. The same AM as a tremolo, sped up.',
|
||
m_fm:'FM radio',t_fm:'Frequency modulation: the voice bends the carrier’s frequency. The same idea as the FM6 engine, 18 octaves higher.',
|
||
m_h21:'Hydrogen line (21 cm)',t_h21:'The most common atom in the universe flips the spin of its electron and emits at 1420 MHz. Radio telescopes map the galaxy with this one note.',
|
||
m_wifi:'Wi-Fi and microwave oven',t_wifi:'2.4 GHz: the same band carries your Wi-Fi and shakes the water molecules in your soup.',
|
||
m_cs:'Caesium clock',t_cs:'The second is defined as 9,192,631,770 cycles of a caesium atom. Time itself is counted in frequency.',
|
||
m_cmb:'Cosmic microwave background',t_cmb:'The afterglow of the Big Bang, cooled to 2.7 K, still fills the sky; its brightest frequency is 160 GHz.',
|
||
m_heat:'Body heat',t_heat:'Every warm body glows, a roe deer in the night forest as much as you: skin near 37 °C shines around 10 µm, about 30 THz, 36 octaves above A440. A thermal camera sees this light.',
|
||
m_chl662:'Chlorophyll a (662 nm)',t_chl662:'Its red absorption peak: the light that powers almost all life on land. 662 nm is 453 THz, almost 40 octaves above A440.',
|
||
m_a40:'A440, 40 octaves up',t_a40:'484 THz, 620 nm: orange-red. The colour of the tuning A.',
|
||
m_green:'Green (555 nm)',t_green:'Where the eye is most sensitive by day, in the middle of the light the Sun sends us.',
|
||
m_chl430:'Chlorophyll a (430 nm)',t_chl430:'Chlorophyll drinks blue light at 430 nm and red at 662 nm and gives back the green between: a leaf is green because of what it does not eat.',
|
||
m_violet:'Violet (400 nm)',t_violet:'The fast end of the visible: 750 THz. From red to violet is less than one octave; 400–800 THz is exactly one.',
|
||
m_uv:'Ultraviolet (300 nm)',t_uv:'Bees see the near ultraviolet and flowers paint guides with it; at 300 nm it burns our skin and makes vitamin D.',
|
||
m_xray:'X-rays (50 keV)',t_xray:'Light so fast it passes through flesh and stops at bone. A medical X-ray is a shadow made at 10¹⁹ Hz.',
|
||
m_pet:'PET scan (511 keV)',t_pet:'An electron meets its antimatter twin, the positron, and both become two flashes of 511 keV: 1.2×10²⁰ Hz, 58 octaves above A440. Matter turned into frequency.'};
|
||
const ES={doc_title:'La frecuencia en la naturaleza · JIANT FM',live:'frecuencia · naturaleza · síntesis',kicker:'una página sobre la frecuencia',h1a:'La frecuencia',h1b:'en la naturaleza',down:'subir la escalera',
|
||
sub:'Un atlas de las cosas que vuelven: del ciclo lento del Sol a la luz adentro de una hoja, medido en octavas del La de 440 Hz.',
|
||
fig1:'Radiolario, como lo dibuja el FM-1 en HOME: cuatro isotermas, más calientes hacia adentro. Su contorno respira con su propio sonido.',
|
||
epi_k:'epígrafe',pl:'Lám.',sp_spec:'espécimen',
|
||
m1:'Todo vibra. La materia es luz, la luz es frecuencia, el color es frecuencia. Un polirritmo de percusión, acelerado, se vuelve un acorde; un ciclo solar es, en algún punto, un LFO.',
|
||
m2:'De eso se trata este sintetizador y este sistema: de cómo se relacionan las frecuencias en la naturaleza, de lo más lento a lo más rápido, y de cuánto de eso ya usa un sintetizador. La unidad es la octava: el doble de rápido. La referencia es el La de 440 Hz.',
|
||
l_eb:'la escalera',l_h2:'Una sola escalera, casi cien octavas',l_in:'Cada escalón es una octava: el doble de rápido. El La de 440 Hz es el escalón cero. Un día está 25 octavas más abajo; la luz visible, unas 40 más arriba, y ocupa exactamente una octava. Arrastrá, hacé zoom, tocá un punto.',
|
||
l_note:'El sonido es aire que se mueve; la luz es un campo electromagnético. Son cosas distintas, pero los ciclos por segundo se cuentan igual, y duplicarlos siempre es una octava.',
|
||
fig2:'La escalera de frecuencias, en octavas del La 440 Hz. Lo vivo, en la rampa de calor; lo no vivo, en hueso.',
|
||
j_all:'todo',j_sky:'cielo',j_body:'cuerpo',j_lfo:'LFO',j_beat:'ritmo',j_sound:'sonido',j_radio:'radio',j_heat:'calor',j_light:'luz',j_gamma:'gamma',
|
||
l_hint:'arrastrá para mover · rueda o pellizco para zoom · tocá un punto',i_freq:'frecuencia',i_period:'período',i_wl:'longitud de onda',i_wla:'longitud de onda en el aire',i_oct:'octavas desde La 440',i_note:'como nota',i_prev:'‹ anterior',i_next:'siguiente ›',
|
||
a_eb:'ritmo → altura',a_h2:'Un ritmo, acelerado, es un acorde',
|
||
a_p:'Tres pulsos en proporción 4:5:6. Lento, es un polirritmo: lo podés contar. Rápido, ya no se puede contar y el oído lo funde en altura: un acorde mayor. Entre los dos no hay frontera, solo velocidad. Los polirritmos de DRUM-X y los ratchets del secuenciador son acordes tocados muy despacio.',
|
||
fig3:'Un coro de tres luciérnagas que destellan en 4:5:6. Aceleradas, los destellos se funden en un brillo fijo y los clics en un acorde mayor.',
|
||
play:'Tocar',stop:'Parar',a_sweep:'barrido ↗',a_r1:'4:5:6 · mayor',a_r2:'10:12:15 · menor',a_r3:'2:3:5 · abierto',a_speed:'velocidad',
|
||
a_rhythm:'se puede contar: ritmo',a_flutter:'demasiado rápido para contar: aleteo',a_pitch:'altura: un acorde',
|
||
b_eb:'LFO → FM',b_h2:'Dos frecuencias que conversan',
|
||
b_p:'Un oscilador mueve a otro. Despacio, es un LFO: trémolo, vibrato, una respiración. Subí la velocidad por encima de unos 20 Hz y el movimiento deja de oírse como movimiento: aparecen frecuencias nuevas a los costados del tono (bandas laterales) y cambia el timbre. Eso es síntesis FM. El motor FM6 de JIANT son seis osciladores conversando así.',
|
||
fig4:'Un ciliado que respira con su moduladora. Lento, se hincha; a velocidad de audio deja de respirar y su membrana ondula: cada onda es una banda lateral.',
|
||
b_fm:'FM (altura)',b_am:'AM (volumen)',b_rate:'velocidad de modulación',b_depth:'profundidad',
|
||
b_lfo_s:'LFO: se oye movimiento',b_rough:'en el medio: aspereza',b_timbre:'velocidad de audio: un timbre nuevo',
|
||
b_car:'portadora',b_mod:'moduladora',b_idx:'índice β = Δf / fm',b_amd:'profundidad m',b_side:'bandas laterales en',b_org:'el organismo',b_spec:'espectro · líneas = teoría, relleno = en vivo',
|
||
c_eb:'nota → color',c_h2:'El color de una nota',
|
||
c_p:'Duplicá 440 Hz cuarenta veces y llegás a 484 THz: luz de 620 nm, naranja rojizo. La luz visible ocupa exactamente una octava (400–800 THz), así que cada nota tiene un color, y uno solo. Es un juego de octavas, no de física: una nota no brilla. Pero la proporción es la misma: una octava es el doble, en el aire y en la luz.',
|
||
c_p2:'Mirá cómo la octava se cierra como un círculo cromático: el violeta queda al lado del rojo.',
|
||
fig5:'La flor cromática: doce pétalos, uno por semitono, cada uno pintado con la luz de su nota. Abajo, la octava visible y lo que absorbe la clorofila a.',
|
||
c_run:'Tocar la octava',c_tip:'o tocá una tecla',c_one:'una octava de luz',c_ladder:'verla en la escalera ↑',
|
||
c_note:'nota',c_doub:'duplicaciones',c_light:'como luz',c_wl:'longitud de onda',c_col:'color',
|
||
col_red:'rojo',col_orange:'naranja',col_yellow:'amarillo',col_green:'verde',col_cyan:'cian',col_blue:'azul',col_violet:'violeta',
|
||
d_eb:'día → LFO',d_h2:'Un día es un LFO muy lento',
|
||
d_p:'El sol sale y se pone una vez cada 24 h: 11,6 µHz. Aceleralo octava por octava. A las 16 octavas es un LFO lento (0,76 Hz) que respira sobre un drone; a las 25 suena solo (388 Hz, cerca de un Sol). La forma es la misma; cambia solo la escala. El ciclo de 11 años del Sol, 32 octavas arriba, es un LFO de 12 Hz.',
|
||
fig6:'Un girasol joven sigue al sol de día y de noche vuelve a mirar al este, guiado por su reloj interno (Helianthus annuus). Acelerado 25 octavas, su día se vuelve una nota.',
|
||
d_speed:'octavas arriba del día',d_slow:'más lento que cualquier LFO',d_lfo:'LFO: respira sobre el drone',d_pitch:'altura: se oye el sol mismo',d_cyc:'un ciclo cada',d_f:'frecuencia',d_now:'ahora',
|
||
j_eb:'en JIANT FM',j_h2:'Los mismos gestos, adentro del FM-1',
|
||
j1_h:'Síntesis FM',j1_p:'Seis operadores, 32 algoritmos: cada uno un oscilador que mueve la frecuencia de otro. Lo que la lámina III hace con dos, FM6 lo hace con seis, y lee bancos DX7.',
|
||
j2_h:'Ritmo en el borde de la altura',j2_p:'Una batería en el borde de la altura: polirritmos, ratchets y el LFO de X-MOD, atado al tempo. Tocá un redoble lo bastante rápido y deja de ser un redoble: se vuelve un tono.',
|
||
j3_h:'Microscopio, cámara térmica, espectro',j3_p:'El firmware mira el sonido como miramos la naturaleza: al microscopio (las criaturas de HOME), con cámara térmica (su rampa de calor, la paleta del infrarrojo que emite tu cuerpo) y como espectro.',
|
||
k_k:'colofón',k_p:'De la luz del sol al La de un teclado hay cuarenta escalones. Todos son el mismo gesto: algo que vuelve.',k_emu:'Probar JIANT en el navegador',k_home:'Volver a JIANT FM',f_home:'JIANT FM',
|
||
f_audio:'El sonido arranca solo cuando apretás tocar. Con auriculares, a volumen bajo.',
|
||
tm:'Hecho sobre Felucca de Hügelton Instruments. M-VAVE y FM-1 son marcas de sus respectivos dueños; JIANT no está afiliado ni avalado por ellos, ni por Hügelton Instruments.',
|
||
r_sky:'cielo · vida',r_sound:'sonido (aire)',r_em:'luz (EM)',r_fm1:'JIANT FM-1',
|
||
b_cycles:'ciclos del cielo',b_life:'cuerpo y cerebro',b_infra:'infrasonido',b_aud:'audible',b_ultra:'ultrasonido',b_radio:'radio · microondas',b_ir:'infrarrojo',b_vis:'visible',b_uv:'UV',b_x:'rayos X',b_gamma:'gamma',
|
||
b_lfo:'LFO 0,05–40 Hz',b_bpm:'BPM 40–240',b_pitch:'notas MIDI 0–127',b_keys:'teclas Fa3–Sol5',
|
||
u_s:'s',u_min:'min',u_h:'h',u_d:'días',u_y:'años',u_oct1:'1 octava',u_oct10:'10 octavas',chl:'clorofila a · absorción',no_audio:'Este navegador no tiene Web Audio.',
|
||
m_solar:'Ciclo solar (11 años)',t_solar:'El campo magnético del Sol se invierte y sus manchas van y vienen cada ~11 años; el carbono 14 de los anillos de los árboles sube y baja con él. Subido 32 octavas, es un LFO de 12 Hz.',
|
||
m_year:'Año',t_year:'Una vuelta al Sol: estaciones, migraciones. Un árbol escribe cada una como un anillo: una grabación en madera del loop más lento que siguen los seres vivos.',
|
||
m_lunar:'Mes lunar',t_lunar:'De luna nueva a luna nueva, 29,5 días. Una vez al año, días después de una luna llena, los corales de la Gran Barrera desovan juntos, sincronizados por la luz de la luna.',
|
||
m_day:'Día',t_day:'Luz y oscuridad, una vez cada 24 h: 11,6 µHz, 25 octavas debajo del La 440 (como nota, un Sol). En 1729 de Mairan encerró una mimosa en la oscuridad: sus hojas siguieron abriéndose y cerrándose cada día. La primera señal de un reloj interno.',
|
||
m_tide:'Mareas',t_tide:'La Luna tira del mar dos veces por día, cada 12 h 25 min: el mar respira casi una octava arriba del día, desafinado por la Luna. Las anémonas se cierran cuando el agua se va.',
|
||
m_breath:'Respiración',t_breath:'Unas 15 respiraciones por minuto, 0,25 Hz. Un LFO lento: el vaivén de un pad que se abre y se cierra.',
|
||
m_lfo:'LFO del FM-1',t_lfo:'RATE va de 0,05 a 40 Hz, o en tempo, de 4 compases a 1/32. Su valor inicial, 1,18 Hz, late casi como un corazón.',
|
||
m_heart:'Latido',t_heart:'Unos 72 latidos por minuto, 1,2 Hz. El tempo con el que medimos la música: BPM son golpes por minuto, contados como el pulso.',
|
||
m_bpm:'120 BPM',t_bpm:'Dos golpes por segundo, el tempo de un proyecto nuevo de JIANT. El FM-1 va de 40 a 240 BPM (0,67–4 Hz).',
|
||
m_cricket:'Grillo arborícola nevado',t_cricket:'Cantan al unísono, y más rápido cuando hace calor: a 22 °C, unos 126 chirridos por minuto (ley de Dolbear, 1897). Un termómetro que lleva el tempo.',
|
||
m_schumann:'Resonancia Schumann',t_schumann:'Los rayos mantienen sonando la cavidad entre el suelo y la ionosfera a 7,83 Hz: el zumbido eléctrico de la Tierra. Su longitud de onda es más o menos la vuelta al planeta.',
|
||
m_alpha:'Ondas alfa',t_alpha:'Cerrá los ojos y aflojá: grupos de neuronas disparan juntas unas 10 veces por segundo. El cerebro es un banco de osciladores.',
|
||
m_whale:'Rorcual común (20 Hz)',t_whale:'Los rorcuales emiten pulsos de 20 Hz, justo en el piso del oído humano: por debajo se sienten golpes, por encima el oído los funde en altura. Su canto viaja cientos de kilómetros.',
|
||
m_bee:'Alas de abeja',t_bee:'Una abeja bate las alas unas 230 veces por segundo: su zumbido es ese aleteo, oído como nota.',
|
||
m_a440:'La 440 Hz',t_a440:'La referencia de afinación, la octava 0 de esta escalera. Las teclas del FM-1 van de Fa3 a Sol5 (175–784 Hz) antes de mover la octava.',
|
||
m_bird:'Canto del canario',t_bird:'La siringe de un pájaro cantor tiene dos lados que pueden cantar dos notas distintas a la vez: dos osciladores en una garganta. El canto del canario cae casi todo entre 2 y 8 kHz.',
|
||
m_cicada:'Cigarra (~5 kHz)',t_cicada:'Una cigarra pliega sus tímbalos cientos de veces por segundo; los clics resuenan en su cuerpo hueco como un canto de unos pocos kHz. Un ritmo acelerado hasta volverse altura.',
|
||
m_hear20k:'Borde del oído (20 kHz)',t_hear20k:'El techo de un oído joven; baja con los años. El FM-1 muestrea a 44,1 kHz, así que puede dibujar ondas hasta 22,05 kHz.',
|
||
m_bat:'Ecolocación de murciélagos',t_bat:'Los murciélagos gritan entre 20 y 120 kHz y escuchan el eco: ven con ultrasonido.',
|
||
m_echo:'Ecografía',t_echo:'Ondas de presión de 2 a 15 MHz rebotan dentro del cuerpo y lo dibujan: un eco que se puede mirar.',
|
||
m_am:'Radio AM',t_am:'Modulación de amplitud: una voz viaja sobre una portadora de 1 MHz cambiándole el volumen. El mismo AM que un trémolo, acelerado.',
|
||
m_fm:'Radio FM',t_fm:'Modulación de frecuencia: la voz dobla la frecuencia de la portadora. La misma idea que el motor FM6, 18 octavas más arriba.',
|
||
m_h21:'Línea del hidrógeno (21 cm)',t_h21:'El átomo más común del universo invierte el espín de su electrón y emite a 1420 MHz. Los radiotelescopios mapean la galaxia con esa sola nota.',
|
||
m_wifi:'Wi-Fi y microondas',t_wifi:'2,4 GHz: la misma banda lleva tu Wi-Fi y sacude las moléculas de agua de tu sopa.',
|
||
m_cs:'Reloj de cesio',t_cs:'El segundo se define como 9.192.631.770 ciclos de un átomo de cesio. El tiempo mismo se cuenta en frecuencia.',
|
||
m_cmb:'Fondo cósmico de microondas',t_cmb:'El resplandor del Big Bang, enfriado a 2,7 K, todavía llena el cielo; su frecuencia más brillante es 160 GHz.',
|
||
m_heat:'Calor del cuerpo',t_heat:'Todo cuerpo tibio brilla, un corzo en el bosque de noche tanto como vos: la piel cerca de 37 °C emite alrededor de 10 µm, unos 30 THz, 36 octavas arriba del La 440. Una cámara térmica ve esa luz.',
|
||
m_chl662:'Clorofila a (662 nm)',t_chl662:'Su pico de absorción en el rojo: la luz que alimenta casi toda la vida en tierra firme. 662 nm son 453 THz, casi 40 octavas arriba del La 440.',
|
||
m_a40:'La 440, 40 octavas arriba',t_a40:'484 THz, 620 nm: naranja rojizo. El color del La de afinación.',
|
||
m_green:'Verde (555 nm)',t_green:'Donde el ojo es más sensible de día, en el medio de la luz que nos manda el Sol.',
|
||
m_chl430:'Clorofila a (430 nm)',t_chl430:'La clorofila bebe luz azul a 430 nm y roja a 662 nm y devuelve el verde del medio: una hoja es verde por lo que no come.',
|
||
m_violet:'Violeta (400 nm)',t_violet:'El extremo rápido de lo visible: 750 THz. Del rojo al violeta hay menos de una octava; de 400 a 800 THz, exactamente una.',
|
||
m_uv:'Ultravioleta (300 nm)',t_uv:'Las abejas ven el ultravioleta cercano y las flores pintan guías con él; a 300 nm quema nuestra piel y fabrica vitamina D.',
|
||
m_xray:'Rayos X (50 keV)',t_xray:'Luz tan rápida que atraviesa la carne y se frena en el hueso. Una radiografía es una sombra hecha a 10¹⁹ Hz.',
|
||
m_pet:'PET (511 keV)',t_pet:'Un electrón se encuentra con su gemelo de antimateria, el positrón, y los dos se vuelven dos destellos de 511 keV: 1,2×10²⁰ Hz, 58 octavas arriba del La 440. Materia hecha frecuencia.'};
|
||
const ZH={doc_title:'自然中的频率 · JIANT FM',live:'频率 · 自然 · 合成',kicker:'关于频率的一页',h1a:'自然中的',h1b:'频率',down:'沿阶梯而上',
|
||
sub:'一部关于“会回来的事物”的图谱:从太阳缓慢的周期到叶片里的光,以 440 Hz 的 A 的八度来度量。',
|
||
fig1:'放射虫,FM-1 在 HOME 上的画法:四条等温线,越往里越热。它的轮廓随自己的声音呼吸。',
|
||
epi_k:'题记',pl:'图版',sp_spec:'标本',
|
||
m1:'万物皆在振动。物质是光,光是频率,颜色也是频率。打击乐的复节奏加速之后会变成和弦;太阳的周期,在某个尺度上,就是一个 LFO。',
|
||
m2:'这台合成器和这个系统讲的就是这件事:自然中的频率如何彼此关联,从最慢到最快,以及合成器早已用到了其中多少。单位是八度:快一倍。参照点是 440 Hz 的 A(La)。',
|
||
l_eb:'阶梯',l_h2:'一架阶梯,将近一百个八度',l_in:'每一级是一个八度:快一倍。440 Hz 的 A 是第零级。一天位于它下方 25 个八度;可见光在上方约 40 个八度,而且恰好占据一个八度。拖动、缩放、点按任意一点。',
|
||
l_note:'声音是空气的运动,光是电磁场。它们是不同的东西,但每秒的周期数用同样的方式计数,翻一倍永远是一个八度。',
|
||
fig2:'频率的阶梯,以 A 440 Hz 的八度为单位。生物用热度色阶绘制,非生物用骨白色。',
|
||
j_all:'全部',j_sky:'天空',j_body:'身体',j_lfo:'LFO',j_beat:'节奏',j_sound:'声音',j_radio:'无线电',j_heat:'热',j_light:'光',j_gamma:'伽马',
|
||
l_hint:'拖动移动 · 滚轮或双指缩放 · 点按查看',i_freq:'频率',i_period:'周期',i_wl:'波长',i_wla:'空气中的波长',i_oct:'距 A440 的八度数',i_note:'对应音名',i_prev:'‹ 上一个',i_next:'下一个 ›',
|
||
a_eb:'节奏 → 音高',a_h2:'节奏加速,就是和弦',
|
||
a_p:'三个脉冲,比例 4:5:6。慢的时候是复节奏:你能数出来。快起来就数不清了,耳朵把它们融合成音高:一个大三和弦。两者之间没有边界,只有速度。DRUM-X 的复节奏和音序器的连击,都是放得很慢的和弦。',
|
||
fig3:'三只萤火虫以 4:5:6 闪烁的合唱。加速之后,闪光融成持续的光,咔嗒声融成大三和弦。',
|
||
play:'播放',stop:'停止',a_sweep:'扫频 ↗',a_r1:'4:5:6 · 大三',a_r2:'10:12:15 · 小三',a_r3:'2:3:5 · 开放',a_speed:'速度',
|
||
a_rhythm:'数得出来:节奏',a_flutter:'快得数不清:颤动',a_pitch:'音高:一个和弦',
|
||
b_eb:'LFO → FM',b_h2:'两个频率的对话',
|
||
b_p:'一个振荡器推动另一个。慢的时候,它是 LFO:颤音、揉弦、一次呼吸。把速度推过约 20 Hz,这种运动就不再听起来像运动:音的两侧出现新的频率(边带),音色随之改变。这就是 FM 合成。JIANT 的 FM6 引擎就是六个这样对话的振荡器。',
|
||
fig4:'随调制器呼吸的纤毛虫。慢的时候它膨胀收缩;到了音频速率,它不再呼吸,而是膜开始起皱:每一道波纹就是一条边带。',
|
||
b_fm:'FM(音高)',b_am:'AM(音量)',b_rate:'调制速率',b_depth:'深度',
|
||
b_lfo_s:'LFO:听到的是运动',b_rough:'中间地带:粗糙感',b_timbre:'音频速率:新的音色',
|
||
b_car:'载波',b_mod:'调制器',b_idx:'调制指数 β = Δf / fm',b_amd:'调制深度 m',b_side:'边带位于',b_org:'有机体',b_spec:'频谱 · 线条=理论,填充=实时',
|
||
c_eb:'音符 → 颜色',c_h2:'一个音的颜色',
|
||
c_p:'把 440 Hz 翻倍四十次,就到了 484 THz:620 nm 的光,橙红色。可见光恰好跨越一个八度(400–800 THz),所以每个音都有一种颜色,而且只有一种。这是八度的游戏,不是物理:音符不会发光。但比例是一样的:一个八度就是翻一倍,在空气中如此,在光中也如此。',
|
||
c_p2:'看看八度如何像色环一样闭合:紫色紧挨着红色。',
|
||
fig5:'半音之花:十二片花瓣,每个半音一片,各自涂上它那个音的光。下方是可见光的八度,以及叶绿素 a 吸收的部分。',
|
||
c_run:'弹奏这个八度',c_tip:'或点按琴键',c_one:'一个八度的光',c_ladder:'在阶梯上查看 ↑',
|
||
c_note:'音名',c_doub:'翻倍次数',c_light:'作为光',c_wl:'波长',c_col:'颜色',
|
||
col_red:'红',col_orange:'橙',col_yellow:'黄',col_green:'绿',col_cyan:'青',col_blue:'蓝',col_violet:'紫',
|
||
d_eb:'一天 → LFO',d_h2:'一天是一个极慢的 LFO',
|
||
d_p:'太阳每 24 小时升落一次:11.6 µHz。一个八度一个八度地加快它。到第 16 个八度,它是一个慢速 LFO(0.76 Hz),在持续音上呼吸;到第 25 个八度,它自己就发出声音(388 Hz,接近 G)。形状不变,变的只是尺度。太阳的 11 年周期升高 32 个八度,就是一个 12 Hz 的 LFO。',
|
||
fig6:'幼年向日葵白天追随太阳,夜里在生物钟的引导下转回东方(Helianthus annuus)。加快 25 个八度,它的一天变成一个音。',
|
||
d_speed:'高于一天的八度数',d_slow:'比任何 LFO 都慢',d_lfo:'LFO:在持续音上呼吸',d_pitch:'音高:听见太阳本身',d_cyc:'每个周期',d_f:'频率',d_now:'现在',
|
||
j_eb:'在 JIANT FM 里',j_h2:'同样的姿态,在 FM-1 里面',
|
||
j1_h:'FM 合成',j1_p:'六个算子,32 种算法:每个都是推动另一个振荡器频率的振荡器。图版 III 用两个做的事,FM6 用六个来做,还能读取 DX7 音色库。',
|
||
j2_h:'站在音高边缘的节奏',j2_p:'站在音高边缘的鼓组:复节奏、连击,以及与速度同步的 X-MOD LFO。把滚奏打得足够快,它就不再是滚奏,而变成一个音。',
|
||
j3_h:'显微镜、热像仪、频谱',j3_p:'固件观察声音的方式,就像我们观察自然:用显微镜(HOME 上的生物),用热像仪(它们的热度色阶,就是你身体发出的红外线的调色板),以及用频谱。',
|
||
k_k:'跋',k_p:'从阳光到键盘上的 A,有四十级阶梯。它们都是同一个姿态:某种会回来的东西。',k_emu:'在浏览器里试玩 JIANT',k_home:'返回 JIANT FM',f_home:'JIANT FM',
|
||
f_audio:'只有按下播放才会发声。请用耳机并调低音量。',
|
||
tm:'基于 Hügelton Instruments 的 Felucca 开发。M-VAVE 和 FM-1 是其各自所有者的商标;JIANT 与它们以及 Hügelton Instruments 均无关联,也未获其认可。',
|
||
r_sky:'天空 · 生命',r_sound:'声音(空气)',r_em:'光(电磁)',r_fm1:'JIANT FM-1',
|
||
b_cycles:'天体周期',b_life:'身体与大脑',b_infra:'次声',b_aud:'可听',b_ultra:'超声',b_radio:'无线电 · 微波',b_ir:'红外',b_vis:'可见光',b_uv:'紫外',b_x:'X 射线',b_gamma:'伽马射线',
|
||
b_lfo:'LFO 0.05–40 Hz',b_bpm:'BPM 40–240',b_pitch:'音符 MIDI 0–127',b_keys:'琴键 F3–G5',
|
||
u_s:'秒',u_min:'分钟',u_h:'小时',u_d:'天',u_y:'年',u_oct1:'1 个八度',u_oct10:'10 个八度',chl:'叶绿素 a · 吸收',no_audio:'这个浏览器不支持 Web Audio。',
|
||
m_solar:'太阳活动周期(11 年)',t_solar:'太阳的磁场大约每 11 年翻转一次,黑子随之消长;树木年轮里的碳-14 也跟着起伏。升高 32 个八度,它就是一个 12 Hz 的 LFO。',
|
||
m_year:'年',t_year:'绕太阳一圈:四季、迁徙。树把每一年写成一圈年轮:生命所遵循的最慢循环的木质录音。',
|
||
m_lunar:'朔望月',t_lunar:'从新月到新月,29.5 天。每年一次,在满月后的几天里,大堡礁的珊瑚在月光的同步下一起产卵。',
|
||
m_day:'一天',t_day:'明与暗,每 24 小时一次:11.6 µHz,在 A440 之下 25 个八度(作为音名是 G)。1729 年,德梅朗把一株含羞草放在黑暗中:它的叶子仍然每天开合。这是生物钟的第一个证据。',
|
||
m_tide:'潮汐',t_tide:'月球每天两次牵引海洋,每 12 小时 25 分:海洋的呼吸比一天高出将近一个八度,被月球拉走了音。潮水退去时,海葵便收拢起来。',
|
||
m_breath:'呼吸',t_breath:'每分钟约 15 次,0.25 Hz。一个慢速 LFO:像铺底音色的开合起伏。',
|
||
m_lfo:'FM-1 的 LFO',t_lfo:'RATE 范围是 0.05 到 40 Hz,或与速度同步,从 4 小节到 1/32。默认值 1.18 Hz,跳得几乎像心脏。',
|
||
m_heart:'心跳',t_heart:'每分钟约 72 次,1.2 Hz。我们衡量音乐速度的基准:BPM 就是每分钟的拍数,像数脉搏一样。',
|
||
m_bpm:'120 BPM',t_bpm:'每秒两拍,JIANT 新工程的速度。FM-1 的速度范围是 40–240 BPM(0.67–4 Hz)。',
|
||
m_cricket:'雪树蟋',t_cricket:'它们齐声鸣叫,天越暖叫得越快:22 °C 时每分钟约 126 声(多尔贝尔定律,1897)。一支会打拍子的温度计。',
|
||
m_schumann:'舒曼共振',t_schumann:'闪电让地面与电离层之间的空腔以 7.83 Hz 持续共鸣:地球自己的电之嗡鸣。它的波长差不多等于地球的周长。',
|
||
m_alpha:'α 脑波',t_alpha:'闭上眼放松:成群的神经元每秒约同步放电 10 次。大脑就是一组振荡器。',
|
||
m_whale:'长须鲸(20 Hz)',t_whale:'长须鲸发出 20 Hz 的脉冲,恰好在人类听觉的下限:低于它你感到的是一下下的搏动,高于它耳朵把它们融合成音高。它的歌声能传出数百公里。',
|
||
m_bee:'蜜蜂振翅',t_bee:'蜜蜂每秒振翅约 230 次:它的嗡嗡声就是这振翅,被听成了一个音。',
|
||
m_a440:'A 440 Hz',t_a440:'调音的基准,这架阶梯的第 0 个八度。FM-1 的琴键在不移八度时覆盖 F3 到 G5(175–784 Hz)。',
|
||
m_bird:'金丝雀的歌',t_bird:'鸣禽的鸣管有左右两侧,可以同时唱出两个不同的音:一个喉咙里的两个振荡器。金丝雀的歌声大多在 2 到 8 kHz 之间。',
|
||
m_cicada:'蝉(约 5 kHz)',t_cicada:'蝉每秒让鼓膜器屈曲数百次;这些咔嗒声在它中空的身体里共鸣,成为几千赫兹的歌声。一种被加速成音高的节奏。',
|
||
m_hear20k:'听觉上限(20 kHz)',t_hear20k:'年轻耳朵的上限,会随年龄下降。FM-1 的采样率是 44.1 kHz,所以能描绘最高 22.05 kHz 的波。',
|
||
m_bat:'蝙蝠回声定位',t_bat:'蝙蝠在 20 到 120 kHz 之间呼叫并倾听回声:它们用超声波“看”世界。',
|
||
m_echo:'医用超声',t_echo:'2–15 MHz 的压力波在体内反射,描绘出身体内部:一种可以看见的回声。',
|
||
m_am:'AM 广播',t_am:'调幅:人声通过改变 1 MHz 载波的响度搭载其上。和颤音(tremolo)是同一种 AM,只是更快。',
|
||
m_fm:'FM 广播',t_fm:'调频:人声让载波的频率弯曲。和 FM6 引擎是同一个原理,只是高了 18 个八度。',
|
||
m_h21:'氢线(21 厘米)',t_h21:'宇宙中最常见的原子翻转电子自旋,发出 1420 MHz 的辐射。射电望远镜用这一个音绘制银河地图。',
|
||
m_wifi:'Wi-Fi 与微波炉',t_wifi:'2.4 GHz:同一个频段既传输你的 Wi-Fi,也摇动你汤里的水分子。',
|
||
m_cs:'铯原子钟',t_cs:'1 秒被定义为铯原子的 9,192,631,770 个周期。时间本身就是用频率来计数的。',
|
||
m_cmb:'宇宙微波背景',t_cmb:'大爆炸的余晖冷却到 2.7 K,至今仍充满天空;它最亮的频率是 160 GHz。',
|
||
m_heat:'体温',t_heat:'每个温暖的身体都在发光,夜晚森林里的狍子和你一样:接近 37 °C 的皮肤辐射约 10 µm、约 30 THz 的光,比 A440 高 36 个八度。热像仪看到的就是这种光。',
|
||
m_chl662:'叶绿素 a(662 nm)',t_chl662:'它在红光的吸收峰:几乎为陆地上所有生命供能的光。662 nm 即 453 THz,比 A440 高将近 40 个八度。',
|
||
m_a40:'A440 升高 40 个八度',t_a40:'484 THz,620 nm:橙红色。调音 A 的颜色。',
|
||
m_green:'绿光(555 nm)',t_green:'白天人眼最敏感的位置,在太阳送来的光的正中间。',
|
||
m_chl430:'叶绿素 a(430 nm)',t_chl430:'叶绿素吸收 430 nm 的蓝光和 662 nm 的红光,把中间的绿色还回来:叶子是绿色的,因为那是它不吃的光。',
|
||
m_violet:'紫光(400 nm)',t_violet:'可见光快的一端:750 THz。从红到紫不到一个八度;400–800 THz 恰好是一个八度。',
|
||
m_uv:'紫外线(300 nm)',t_uv:'蜜蜂看得见近紫外线,花朵用它画出引路的花纹;在 300 nm,它会晒伤我们的皮肤,也会合成维生素 D。',
|
||
m_xray:'X 射线(50 keV)',t_xray:'快到能穿过肌肉、在骨头处停下的光。一张 X 光片是一道 10¹⁹ Hz 的影子。',
|
||
m_pet:'PET 扫描(511 keV)',t_pet:'电子遇到它的反物质孪生兄弟正电子,两者化为两道 511 keV 的闪光:1.2×10²⁰ Hz,比 A440 高 58 个八度。物质变成了频率。'};
|
||
const JA={doc_title:'自然の中の周波数 · JIANT FM',live:'周波数 · 自然 · シンセシス',kicker:'周波数についてのページ',h1a:'自然の中の',h1b:'周波数',down:'はしごを登る',
|
||
sub:'戻ってくるものたちの図譜。太陽のゆっくりした周期から葉の中の光まで、440 Hz の A のオクターブで測る。',
|
||
fig1:'放散虫。FM-1 が HOME に描くとおり、4 本の等温線で、内側ほど熱い。輪郭は自分の音で呼吸する。',
|
||
epi_k:'題辞',pl:'図版',sp_spec:'標本',
|
||
m1:'すべては振動している。物質は光で、光は周波数で、色も周波数だ。打楽器のポリリズムを速めると和音になり、太陽の周期も、あるスケールでは LFO になる。',
|
||
m2:'このシンセとシステムが語るのはそのこと。自然の中で周波数がどう関わり合っているか、いちばん遅いものからいちばん速いものまで、そしてシンセがすでにそのどれだけを使っているか。単位はオクターブ(2 倍の速さ)、基準は 440 Hz の A(ラ)。',
|
||
l_eb:'はしご',l_h2:'ひとつのはしご、100 オクターブ近く',l_in:'1 段が 1 オクターブ(2 倍の速さ)。440 Hz の A が 0 段目。1 日はそこから 25 オクターブ下、可視光は約 40 オクターブ上にあり、ちょうど 1 オクターブを占める。ドラッグ、ズーム、点をタップ。',
|
||
l_note:'音は空気の動き、光は電磁場。別のものだが、1 秒あたりの周期は同じように数えられ、2 倍にすればいつでも 1 オクターブだ。',
|
||
fig2:'周波数のはしご、A 440 Hz のオクターブ単位。生き物は熱のグラデーションで、生き物でないものは骨の白で。',
|
||
j_all:'全体',j_sky:'空',j_body:'体',j_lfo:'LFO',j_beat:'リズム',j_sound:'音',j_radio:'電波',j_heat:'熱',j_light:'光',j_gamma:'ガンマ',
|
||
l_hint:'ドラッグで移動 · ホイールかピンチでズーム · タップで詳細',i_freq:'周波数',i_period:'周期',i_wl:'波長',i_wla:'空気中の波長',i_oct:'A440 からのオクターブ',i_note:'音名にすると',i_prev:'‹ 前へ',i_next:'次へ ›',
|
||
a_eb:'リズム → 音高',a_h2:'リズムを速めると、和音になる',
|
||
a_p:'比が 4:5:6 の 3 つのパルス。遅ければポリリズムで、数えられる。速くすると数えきれなくなり、耳がそれを音の高さに溶かす。メジャートライアドだ。両者のあいだに境界はなく、あるのは速さだけ。DRUM-X のポリリズムやシーケンサーのラチェットは、とてもゆっくり弾いた和音だ。',
|
||
fig3:'4:5:6 で明滅する 3 匹のホタルの合唱。速めると、光は途切れない輝きに、クリックはメジャーコードに溶ける。',
|
||
play:'再生',stop:'停止',a_sweep:'スイープ ↗',a_r1:'4:5:6 · メジャー',a_r2:'10:12:15 · マイナー',a_r3:'2:3:5 · オープン',a_speed:'速さ',
|
||
a_rhythm:'数えられる:リズム',a_flutter:'速すぎて数えられない:はためき',a_pitch:'音高:和音',
|
||
b_eb:'LFO → FM',b_h2:'ふたつの周波数の会話',
|
||
b_p:'ひとつの発振器が別の発振器を動かす。ゆっくりなら LFO、トレモロ、ビブラート、呼吸。速さを 20 Hz あたりより上げると、動きはもう動きに聞こえない。音の両側に新しい周波数(サイドバンド)が現れ、音色が変わる。これが FM シンセシス。JIANT の FM6 エンジンは、こうして会話する 6 つの発振器だ。',
|
||
fig4:'モジュレーターとともに呼吸する繊毛虫。遅いとふくらみ、オーディオレートでは呼吸をやめて膜が波打つ。波のひとつひとつがサイドバンドだ。',
|
||
b_fm:'FM(音高)',b_am:'AM(音量)',b_rate:'変調レート',b_depth:'深さ',
|
||
b_lfo_s:'LFO:動きが聞こえる',b_rough:'中間:ざらつき',b_timbre:'オーディオレート:新しい音色',
|
||
b_car:'キャリア',b_mod:'モジュレーター',b_idx:'変調指数 β = Δf / fm',b_amd:'変調度 m',b_side:'サイドバンド',b_org:'生き物',b_spec:'スペクトル · 線=理論、塗り=ライブ',
|
||
c_eb:'音 → 色',c_h2:'音の色',
|
||
c_p:'440 Hz を 40 回 2 倍にすると 484 THz、620 nm の光、赤みがかったオレンジになる。可視光はちょうど 1 オクターブ(400〜800 THz)なので、どの音にも色がひとつ、ひとつだけある。これはオクターブの遊びで、物理ではない。音は光らない。でも比は同じだ。空気の中でも光の中でも、1 オクターブは 2 倍。',
|
||
c_p2:'オクターブが色相環のように閉じるのを見てほしい。紫の隣は赤だ。',
|
||
fig5:'半音の花。半音ごとに 1 枚、12 枚の花びらが、それぞれの音の光で塗られている。下は可視光の 1 オクターブと、クロロフィル a が吸収する光。',
|
||
c_run:'オクターブを弾く',c_tip:'または鍵盤をタップ',c_one:'光の 1 オクターブ',c_ladder:'はしごで見る ↑',
|
||
c_note:'音名',c_doub:'2 倍にした回数',c_light:'光にすると',c_wl:'波長',c_col:'色',
|
||
col_red:'赤',col_orange:'オレンジ',col_yellow:'黄',col_green:'緑',col_cyan:'シアン',col_blue:'青',col_violet:'紫',
|
||
d_eb:'1 日 → LFO',d_h2:'1 日はとても遅い LFO',
|
||
d_p:'太陽は 24 時間に一度のぼって沈む。11.6 µHz。それを 1 オクターブずつ速めていく。16 オクターブで、ドローンの上で呼吸するゆっくりした LFO(0.76 Hz)になり、25 オクターブでそれ自体が鳴る(388 Hz、G に近い)。形は同じで、変わるのはスケールだけ。太陽の 11 年周期も、32 オクターブ上げれば 12 Hz の LFO だ。',
|
||
fig6:'若いヒマワリは昼は太陽を追い、夜は体内時計に導かれて東へ向き直る(Helianthus annuus)。25 オクターブ速めると、その 1 日は音になる。',
|
||
d_speed:'1 日からのオクターブ',d_slow:'どの LFO よりも遅い',d_lfo:'LFO:ドローンの上で呼吸する',d_pitch:'音高:太陽そのものが聞こえる',d_cyc:'1 周期',d_f:'周波数',d_now:'いま',
|
||
j_eb:'JIANT FM の中で',j_h2:'同じしぐさが、FM-1 の中に',
|
||
j1_h:'FM シンセシス',j1_p:'6 オペレーター、32 アルゴリズム。どれも別の発振器の周波数を動かす発振器だ。図版 III が 2 つでやることを FM6 は 6 つでやり、DX7 バンクも読める。',
|
||
j2_h:'音高の縁にあるリズム',j2_p:'音高の縁にあるドラムキット。ポリリズム、ラチェット、テンポに同期した X-MOD の LFO。ロールを十分に速く叩けば、それはもうロールではなく、音になる。',
|
||
j3_h:'顕微鏡、サーモカメラ、スペクトル',j3_p:'ファームウェアは自然を見るように音を見る。顕微鏡で(HOME の生き物たち)、サーモカメラで(その熱のグラデーションは、体が放つ赤外線のパレット)、そしてスペクトルとして。',
|
||
k_k:'奥付',k_p:'太陽の光から鍵盤の A まで、40 段のはしご。どれも同じしぐさ、戻ってくる何かだ。',k_emu:'ブラウザで JIANT を試す',k_home:'JIANT FM に戻る',f_home:'JIANT FM',
|
||
f_audio:'音は再生を押したときだけ鳴ります。ヘッドホンは小さめの音量で。',
|
||
tm:'Hügelton Instruments の Felucca をもとに作られています。M-VAVE と FM-1 は各所有者の商標です。JIANT はそれらおよび Hügelton Instruments とは無関係で、承認も受けていません。',
|
||
r_sky:'空 · 生命',r_sound:'音(空気)',r_em:'光(電磁波)',r_fm1:'JIANT FM-1',
|
||
b_cycles:'天体の周期',b_life:'体と脳',b_infra:'超低周波音',b_aud:'可聴域',b_ultra:'超音波',b_radio:'電波 · マイクロ波',b_ir:'赤外線',b_vis:'可視光',b_uv:'紫外線',b_x:'X 線',b_gamma:'ガンマ線',
|
||
b_lfo:'LFO 0.05–40 Hz',b_bpm:'BPM 40–240',b_pitch:'ノート MIDI 0–127',b_keys:'鍵盤 F3–G5',
|
||
u_s:'秒',u_min:'分',u_h:'時間',u_d:'日',u_y:'年',u_oct1:'1 オクターブ',u_oct10:'10 オクターブ',chl:'クロロフィル a · 吸収',no_audio:'このブラウザには Web Audio がありません。',
|
||
m_solar:'太陽活動周期(11 年)',t_solar:'太陽の磁場は約 11 年ごとに反転し、黒点が増えては減る。木の年輪の炭素 14 もそれに合わせて上下する。32 オクターブ上げれば 12 Hz の LFO だ。',
|
||
m_year:'1 年',t_year:'太陽を一周する時間。季節、渡り。木はその一回一回を年輪として書く。生き物が従うもっとも遅いループの、木の録音。',
|
||
m_lunar:'朔望月',t_lunar:'新月から新月まで 29.5 日。年に一度、満月の数日後、グレートバリアリーフのサンゴが月の光に合わせて一斉に産卵する。',
|
||
m_day:'1 日',t_day:'明と暗が 24 時間に一度。11.6 µHz、A440 の 25 オクターブ下(音名にすると G)。1729 年、ド・メランはオジギソウを暗闇に置いた。葉はそれでも毎日開いて閉じた。体内時計の最初のしるし。',
|
||
m_tide:'潮汐',t_tide:'月が 1 日に 2 回、12 時間 25 分ごとに海を引く。海の呼吸は 1 日のほぼ 1 オクターブ上、月のせいで少しずれている。潮が引くとイソギンチャクは閉じる。',
|
||
m_breath:'呼吸',t_breath:'1 分間に約 15 回、0.25 Hz。ゆっくりした LFO、開いては閉じるパッドのうねり。',
|
||
m_lfo:'FM-1 の LFO',t_lfo:'RATE は 0.05〜40 Hz、またはテンポ同期で 4 小節〜1/32。初期値の 1.18 Hz は、ほとんど心臓のように打つ。',
|
||
m_heart:'心拍',t_heart:'1 分間に約 72 回、1.2 Hz。音楽のテンポを測る基準。BPM は 1 分あたりの拍数で、脈拍と同じ数え方だ。',
|
||
m_bpm:'120 BPM',t_bpm:'1 秒に 2 拍、JIANT の新規プロジェクトのテンポ。FM-1 は 40〜240 BPM(0.67〜4 Hz)。',
|
||
m_cricket:'スノーツリークリケット',t_cricket:'声をそろえて鳴き、暖かいほど速くなる。22 °C で 1 分に約 126 回(ドルベアの法則、1897 年)。テンポを刻む温度計。',
|
||
m_schumann:'シューマン共振',t_schumann:'雷が地面と電離層のあいだの空洞を 7.83 Hz で鳴らし続ける。地球そのものの電気のうなり。波長はほぼ地球一周分。',
|
||
m_alpha:'α 波',t_alpha:'目を閉じて力を抜くと、ニューロンの群れが 1 秒に約 10 回そろって発火する。脳は発振器の集まりだ。',
|
||
m_whale:'ナガスクジラ(20 Hz)',t_whale:'ナガスクジラは 20 Hz のパルスを出す。ちょうど人の可聴域の下端で、これより下は拍として感じ、上では耳が音の高さに溶かす。その歌は数百キロ先まで届く。',
|
||
m_bee:'ミツバチの羽',t_bee:'ミツバチは 1 秒に約 230 回羽ばたく。あの羽音は、羽ばたきが音として聞こえたものだ。',
|
||
m_a440:'A 440 Hz',t_a440:'チューニングの基準で、このはしごのオクターブ 0。FM-1 の鍵盤はオクターブを動かさなければ F3〜G5(175〜784 Hz)。',
|
||
m_bird:'カナリアのさえずり',t_bird:'鳴禽の鳴管には左右 2 つの音源があり、同時に別々の音を出せる。ひとつの喉に 2 つの発振器。カナリアの歌はおもに 2〜8 kHz。',
|
||
m_cicada:'セミ(約 5 kHz)',t_cicada:'セミは発音膜を 1 秒に数百回へこませる。そのクリックが空洞の体の中で響き、数 kHz の歌になる。音高まで速められたリズム。',
|
||
m_hear20k:'可聴域の上端(20 kHz)',t_hear20k:'若い耳の上限で、年齢とともに下がる。FM-1 は 44.1 kHz でサンプリングするので、22.05 kHz までの波を描ける。',
|
||
m_bat:'コウモリのエコーロケーション',t_bat:'コウモリは 20〜120 kHz で叫び、その反響を聴く。超音波で見ているのだ。',
|
||
m_echo:'超音波検査',t_echo:'2〜15 MHz の圧力波が体の中で跳ね返り、その姿を描く。目で見る反響。',
|
||
m_am:'AM ラジオ',t_am:'振幅変調。声が 1 MHz の搬送波の音量を変えて乗っていく。トレモロと同じ AM を速くしたもの。',
|
||
m_fm:'FM ラジオ',t_fm:'周波数変調。声が搬送波の周波数をたわませる。FM6 エンジンと同じ考え方を 18 オクターブ上で。',
|
||
m_h21:'水素線(21 cm)',t_h21:'宇宙でいちばん多い原子が電子のスピンを反転させ、1420 MHz で放射する。電波望遠鏡はこのひとつの音で銀河の地図を描く。',
|
||
m_wifi:'Wi-Fi と電子レンジ',t_wifi:'2.4 GHz。同じ帯域が Wi-Fi を運び、スープの水分子を揺らす。',
|
||
m_cs:'セシウム時計',t_cs:'1 秒は、セシウム原子の 9,192,631,770 周期と定義されている。時間そのものが周波数で数えられている。',
|
||
m_cmb:'宇宙マイクロ波背景放射',t_cmb:'2.7 K まで冷えたビッグバンの残光が、今も空を満たしている。いちばん明るい周波数は 160 GHz。',
|
||
m_heat:'体温',t_heat:'温かい体はみな光っている。夜の森のノロジカも、あなたと同じように。37 °C 近い肌は約 10 µm、約 30 THz、A440 の 36 オクターブ上で輝く。サーモカメラが見るのはこの光だ。',
|
||
m_chl662:'クロロフィル a(662 nm)',t_chl662:'赤の吸収ピーク。陸上のほぼすべての生命を動かしている光だ。662 nm は 453 THz、A440 のほぼ 40 オクターブ上。',
|
||
m_a40:'A440 の 40 オクターブ上',t_a40:'484 THz、620 nm、赤みがかったオレンジ。チューニングの A の色。',
|
||
m_green:'緑(555 nm)',t_green:'昼の目がいちばん敏感なところで、太陽が送ってくる光のまんなか。',
|
||
m_chl430:'クロロフィル a(430 nm)',t_chl430:'クロロフィルは 430 nm の青と 662 nm の赤を飲み、そのあいだの緑を返す。葉が緑なのは、それを食べないからだ。',
|
||
m_violet:'紫(400 nm)',t_violet:'可視光の速い端、750 THz。赤から紫までは 1 オクターブ弱、400〜800 THz がちょうど 1 オクターブ。',
|
||
m_uv:'紫外線(300 nm)',t_uv:'ミツバチには近紫外線が見え、花はそれで蜜のありかを描く。300 nm では人の肌を日焼けさせ、ビタミン D をつくる。',
|
||
m_xray:'X 線(50 keV)',t_xray:'肉を通り抜け、骨で止まるほど速い光。レントゲン写真は 10¹⁹ Hz でつくった影だ。',
|
||
m_pet:'PET 検査(511 keV)',t_pet:'電子が反物質の双子である陽電子と出会うと、両方が 511 keV の 2 つの閃光になる。1.2×10²⁰ Hz、A440 の 58 オクターブ上。物質が周波数に変わる。'};
|
||
const EN=Object.assign({},EN_DYN);document.querySelectorAll('[data-i18n]').forEach(el=>{const k=el.getAttribute('data-i18n');if(!(k in EN))EN[k]=el.textContent;});
|
||
const D={en:EN,es:ES,zh:ZH,ja:JA};let cur='en';const hooks=[];
|
||
const T=k=>{const d=D[cur];return d&&typeof d[k]==='string'?d[k]:(typeof EN[k]==='string'?EN[k]:k);};
|
||
function set(l){if(!D[l])l='en';cur=l;document.documentElement.lang=l==='zh'?'zh-Hans':l;document.title=T('doc_title');
|
||
document.querySelectorAll('[data-i18n]').forEach(el=>{el.textContent=T(el.getAttribute('data-i18n'));});
|
||
document.querySelectorAll('.lang button').forEach(b=>b.setAttribute('aria-pressed',String(b.dataset.lang===l)));
|
||
try{localStorage.setItem('jiant-lang',l);}catch(e){}
|
||
hooks.forEach(f=>{try{f(l);}catch(e){console.error(e);}});}
|
||
document.querySelectorAll('.lang button').forEach(b=>b.addEventListener('click',()=>set(b.dataset.lang)));
|
||
function start(){let l=null;try{l=localStorage.getItem('jiant-lang');}catch(e){}
|
||
if(!l){const n=(navigator.language||'').toLowerCase();l=n.startsWith('es')?'es':n.startsWith('zh')?'zh':n.startsWith('ja')?'ja':'en';}
|
||
set(l);}
|
||
return {T,set,start,onLang:f=>hooks.push(f),lang:()=>cur};
|
||
})();
|
||
</script>
|
||
<script>
|
||
(function(){
|
||
const T=I18N.T,reduce=!!(window.matchMedia&&matchMedia('(prefers-reduced-motion: reduce)').matches);
|
||
const TAU=Math.PI*2,clamp=(v,a,b)=>Math.max(a,Math.min(b,v));
|
||
/* physics: every number printed is computed from these (Hz), never typed as octaves */
|
||
const A4=440,C=299792458,SND=343,H_PL=6.62607015e-34,EV=1.602176634e-19;
|
||
const L2=f=>Math.log2(f/A4),HZ=o=>A4*Math.pow(2,o);
|
||
const LOC={en:'en',es:'es-AR',zh:'zh-CN',ja:'ja-JP'};
|
||
const nf=(v,d)=>new Intl.NumberFormat(LOC[I18N.lang()]||'en',{maximumSignificantDigits:d||3}).format(v);
|
||
const nfx=(v,dec)=>new Intl.NumberFormat(LOC[I18N.lang()]||'en',{minimumFractionDigits:dec,maximumFractionDigits:dec}).format(v);
|
||
const PRE=['y','z','a','f','p','n','µ','m','','k','M','G','T','P','E','Z','Y'];
|
||
function si(v,u,d){if(!(v>0))return '0 '+u;let e=Math.floor(Math.log10(v)/3+1e-9);e=clamp(e,-8,8);let m=v/Math.pow(10,3*e);
|
||
if(Number(m.toPrecision(d||3))>=1000&&e<8){e++;m/=1000;}return nf(m,d)+' '+PRE[e+8]+u;}
|
||
const SUP={'-':'⁻','0':'⁰','1':'¹','2':'²','3':'³','4':'⁴','5':'⁵','6':'⁶','7':'⁷','8':'⁸','9':'⁹'};
|
||
function sci(v){const e=Math.floor(Math.log10(v)),m=v/Math.pow(10,e);return nf(m,3)+' × 10'+String(e).replace(/./g,c=>SUP[c]||c);}
|
||
function hzText(f){const s=si(f,'Hz');return (f>=1e7||f<1e-3)?s+' ('+sci(f)+' Hz)':s;}
|
||
function period(f){const t=1/f,Y=365.25*86400;
|
||
if(t>=1.5*Y)return nf(t/Y)+' '+T('u_y');if(t>=2*86400)return nf(t/86400)+' '+T('u_d');if(t>=7200)return nf(t/3600)+' '+T('u_h');
|
||
if(t>=120)return nf(t/60)+' '+T('u_min');if(t>=1)return nf(t)+' '+T('u_s');return si(t,'s');}
|
||
function len(m){if(m>=1000)return nf(m/1000)+' km';if(m>=1)return nf(m)+' m';if(m>=.01)return nf(m*100)+' cm';return si(m,'m');}
|
||
const signed=(v,dec)=>(v>0?'+':v<0?'−':'')+nfx(Math.abs(v),dec);
|
||
const NOTES={en:['C','C♯','D','D♯','E','F','F♯','G','G♯','A','A♯','B'],es:['Do','Do♯','Re','Re♯','Mi','Fa','Fa♯','Sol','Sol♯','La','La♯','Si']};
|
||
const nn=k=>(NOTES[I18N.lang()]||NOTES.en)[((k%12)+12)%12];
|
||
function noteOf(f,withOct){const n=69+12*Math.log2(f/A4),k=Math.round(n),c=Math.round((n-k)*100);
|
||
return nn(k)+(withOct?String(Math.floor(k/12)-1):'')+(c?' '+(c>0?'+':'−')+Math.abs(c)+' ¢':'');}
|
||
/* the colour of a wavelength (after Dan Bruton's approximation): fades towards the invisible ends */
|
||
function wl2rgb(nm){let r=0,g=0,b=0;
|
||
if(nm<440){r=clamp(-(nm-440)/60,0,1);b=1;}else if(nm<490){g=(nm-440)/50;b=1;}else if(nm<510){g=1;b=-(nm-510)/20;}
|
||
else if(nm<580){r=(nm-510)/70;g=1;}else if(nm<645){r=1;g=-(nm-645)/65;}else{r=1;}
|
||
const k=nm<350?0:nm<380?.3*(nm-350)/30:nm<420?.3+.7*(nm-380)/40:nm<=700?1:nm<=780?.3+.7*(780-nm)/80:nm<820?.3*(820-nm)/40:0;
|
||
const q=v=>Math.round(255*Math.pow(clamp(v*k,0,1),.8));return [q(r),q(g),q(b)];}
|
||
const rgbs=a=>'rgb('+a.join(',')+')';
|
||
function colName(nm){return T(nm>=625?'col_red':nm>=590?'col_orange':nm>=565?'col_yellow':nm>=500?'col_green':nm>=485?'col_cyan':nm>=450?'col_blue':'col_violet');}
|
||
/* chlorophyll a in solution: absorption peaks near 430 and 662 nm (a sum of bells: the shape, not a measurement) */
|
||
const chlA=nm=>Math.exp(-Math.pow((nm-430)/17,2))+.78*Math.exp(-Math.pow((nm-662)/11,2))+.22*Math.exp(-Math.pow((nm-615)/16,2))+.12*Math.exp(-Math.pow((nm-470)/22,2));
|
||
/* a note raised by octaves into 400..800 THz (exactly one octave of light): how many doublings */
|
||
function toLight(f){let n=0;while(f*Math.pow(2,n)<4e14)n++;while(f*Math.pow(2,n)>=8e14)n--;const F=f*Math.pow(2,n);return {n,F,nm:C/F*1e9};}
|
||
function fit(c){const r=c.getBoundingClientRect(),d=Math.min(window.devicePixelRatio||1,2);c.width=Math.max(1,Math.round(r.width*d));c.height=Math.max(1,Math.round(r.height*d));const x=c.getContext('2d');x.setTransform(d,0,0,d,0,0);return{w:r.width,h:r.height,x:x};}
|
||
const font=(px,w,fam)=>{const l=I18N.lang();return (w||'500')+' '+px+'px '+(l==='zh'?'"Noto Sans SC",':l==='ja'?'"Noto Sans JP",':'')+(fam||'"IBM Plex Mono",monospace');};
|
||
const serif=(px)=>'italic 400 '+px+'px "Cormorant Garamond",Georgia,serif';
|
||
const BONE='#efe6c8',bone=a=>'rgba(239,230,200,'+a+')',DIM='#a39cba';
|
||
|
||
/* ---------------- the house style: the FM-1's thermal ramp and its creatures (as web/landing/index.html ports
|
||
firmware/src/ui_being.c): isotherms in the heat ramp, spikes, lobes, nuclei ---------------- */
|
||
const HR=[[0,208,255],[90,60,255],[181,48,230],[247,40,49],[255,121,0],[255,212,0],[255,255,255]];
|
||
function heat(v,a){v=clamp(v,0,256);const k=Math.min(5,Math.floor(v*6/257)),m=(v*6-k*256)/256,p=HR[k],q=HR[k+1];const c=p.map((x,j)=>Math.round(x+(q[j]-x)*m));return a!==undefined&&a<1?`rgba(${c},${a})`:`rgb(${c})`;}
|
||
const GN={rad:[6,18,16,3,22,0,6],amo:[3,5,14,2,26,3,2],dia:[4,6,10,4,18,0,1],cil:[10,30,8,5,20,1,10],spo:[5,9,12,3,19,2,4],pol:[8,12,12,6,17,0,8],hyd:[3,7,15,3,21,4,5],drm:[12,0,10,3,18,0,6]};
|
||
const SP=[['ANALOG','RADIOLARIA',GN.rad,{spikes:24,len:98,wob:66,lob:3,nuc:2,ripple:160}],['FM6','POLLEN',GN.pol,{spikes:14,len:110,wob:80,lob:6,nuc:3,sep:90}],
|
||
['PHASE','AMOEBA',GN.amo,{spikes:5,len:140,wob:150,lob:2,nuc:1}],['LOFI','DIATOM',GN.dia,{spikes:8,len:90,wob:50,lob:4,nuc:1}],
|
||
['VOICE','HYDRA',GN.hyd,{spikes:6,len:160,wob:90,lob:3,nuc:2,sep:120}],['WHEEL','CILIATE',GN.cil,{spikes:30,len:80,wob:70,lob:5,nuc:1}],
|
||
['NOISE','SPORE',GN.spo,{spikes:16,len:70,wob:110,lob:5,nuc:1,ripple:120}],['DRUM-X','COLONY',GN.drm,{spikes:12,len:120,wob:60,lob:3,nuc:1}]];
|
||
const gen=a=>({ax:a[4],tw:a[5],sh:a[6]});
|
||
function isoC(g,f,cx,cy,r,outer,t,nv){const pts=[];for(let i=0;i<=nv;i++){const th=(i%nv)/nv*TAU;const w=0.28*Math.sin(f.lob*th+t)+0.12*Math.sin((f.lob+2)*th-2*t);let rr=r+(r*f.wob/256)*w;
|
||
if(outer){const c2=Math.sin(f.spikes*th/2+g.tw*3000/65536*TAU+Math.PI/2);rr+=(r*f.len/256)*(c2>0?Math.pow(c2,g.sh):0)*26/16;rr+=(r*(f.ripple||0)/256)*Math.sin(th*18+3*t)/14;}
|
||
pts.push([cx+rr*Math.cos(th)*g.ax/16,cy+rr*Math.sin(th)]);}return pts;}
|
||
function creature(ctx,sp,cx,cy,r,en,t,alpha){
|
||
const g=gen(sp[2]),E=en*256,f=Object.assign({sep:0,ripple:0},sp[3]);const e=E*0.4;
|
||
f.wob=clamp(f.wob+e*3/4,0,256);f.len=clamp(f.len+e,0,420);f.ripple=clamp(f.ripple+e,0,256);
|
||
r+=r*E*30/65536;const SC=[256,180,112,52],HT=[28,90,150,206];ctx.save();ctx.globalAlpha=alpha===undefined?1:alpha;ctx.lineWidth=1;
|
||
SC.forEach((s,i)=>{const p=isoC(g,f,cx,cy,r*s/256,!i,t,i?40:(r>20?96:56));ctx.beginPath();p.forEach((q,j)=>j?ctx.lineTo(q[0],q[1]):ctx.moveTo(q[0],q[1]));ctx.closePath();ctx.strokeStyle=heat(HT[i]+E*40/256);ctx.stroke();});
|
||
for(let n=0;n<f.nuc;n++){const a=t+n*TAU/f.nuc,d=f.nuc>1?r*(24+f.sep*40/256)/100:0,x=cx+d*Math.cos(a)*g.ax/16,y=cy+d*Math.sin(a)*0.7;
|
||
ctx.strokeStyle=heat(214+E*42/256);ctx.beginPath();ctx.arc(x,y,Math.max(.5,r*.15),0,TAU);ctx.stroke();ctx.strokeStyle=heat(240);ctx.beginPath();ctx.arc(x,y,Math.max(.5,r*.06),0,TAU);ctx.stroke();}
|
||
ctx.restore();}
|
||
|
||
/* ---------------- an atlas of organisms in that style: any silhouette becomes four isotherms, hotter inward ---------------- */
|
||
const HT=[28,90,150,206];
|
||
function smooth(x,q){const n=q.length,m=(a,b)=>[(a[0]+b[0])/2,(a[1]+b[1])/2];const s=m(q[n-1],q[0]);x.beginPath();x.moveTo(s[0],s[1]);
|
||
for(let i=0;i<n;i++){const p=q[i],e=m(p,q[(i+1)%n]);x.quadraticCurveTo(p[0],p[1],e[0],e[1]);}x.closePath();}
|
||
function iso(x,pts,cx,cy,r,t,o){o=o||{};const L=o.lv||(r<13?2:r<26?3:4),SC=[1,.73,.48,.25],rot=o.rot||0,cs=Math.cos(rot),sn=Math.sin(rot),sx=o.sx||1;
|
||
let gx=o.gx,gy=o.gy;if(gx===undefined){gx=0;gy=0;pts.forEach(p=>{gx+=p[0];gy+=p[1];});gx/=pts.length;gy/=pts.length;}
|
||
for(let i=0;i<L;i++){const s=SC[i]*(1+(reduce?0:.035*Math.sin(t*1.3+i*.9+(o.ph||0))));
|
||
const q=pts.map(p=>{const u=(gx+(p[0]-gx)*s)*sx,v=gy+(p[1]-gy)*s;return [cx+r*(u*cs-v*sn),cy+r*(u*sn+v*cs)];});
|
||
smooth(x,q);if(o.fill&&!i){x.fillStyle=o.fill;x.fill();}x.strokeStyle=heat(HT[i]+(o.e||0)*50,o.a);x.lineWidth=o.lw||1;x.stroke();}}
|
||
const polar=(fn,n)=>{n=n||56;const p=[];for(let i=0;i<n;i++){const th=i/n*TAU,r=fn(th);p.push([Math.cos(th)*r,Math.sin(th)*r]);}return p;};
|
||
const mir=h=>h.concat(h.slice().reverse().map(p=>[-p[0],p[1]]));
|
||
const ELL=(a,b)=>polar(th=>1/Math.sqrt(Math.pow(Math.cos(th)/a,2)+Math.pow(Math.sin(th)/b,2)));
|
||
const LEAF=(()=>{const p=[];for(let i=0;i<40;i++){const th=i/40*TAU,u=(1-Math.cos(th))/2;p.push([u,.3*Math.sin(th)*(1-.35*u)]);}return p;})();
|
||
const S={
|
||
deer:[[-.75,-.12],[-.68,-.22],[-.2,-.24],[.28,-.24],[.42,-.48],[.5,-.7],[.47,-.92],[.57,-.77],[.66,-.72],[.86,-.6],[.82,-.5],[.62,-.48],[.52,-.16],[.46,.06],[.43,.86],[.36,.86],[.33,.16],[0,.12],[-.4,.14],[-.48,.86],[-.56,.86],[-.62,.2],[-.74,.04]],
|
||
bat:mir([[0,-.3],[.06,-.48],[.1,-.28],[.32,-.36],[.66,-.46],[1,-.24],[.86,-.02],[.74,.16],[.6,.02],[.5,.22],[.36,.06],[.2,.26],[.08,.3],[0,.42]].map(p=>[-p[0],p[1]])),
|
||
whale:[[-1,-.22],[-.88,-.03],[-1,.15],[-.78,.02],[-.5,-.04],[-.36,-.1],[-.3,-.22],[-.22,-.1],[.4,-.14],[.84,-.09],[1,0],[.84,.08],[.4,.17],[.26,.19],[.14,.33],[.1,.19],[-.5,.07],[-.78,.03]],
|
||
bird:[[-.95,.42],[-.4,.06],[.1,-.24],[.3,-.44],[.45,-.55],[.6,-.5],[.68,-.42],[.92,-.4],[.66,-.32],[.6,-.2],[.55,.05],[.3,.3],[.05,.38],[-.3,.32],[-.8,.5]],
|
||
cricket:[[-.95,.06],[-.6,-.12],[0,-.2],[.4,-.17],[.62,-.08],[.72,.06],[.5,.16],[-.3,.17],[-.85,.13]],
|
||
lungR:[[.08,-.5],[.34,-.62],[.6,-.24],[.7,.38],[.52,.76],[.18,.62],[.12,.12]],
|
||
heart:(()=>{const p=[];for(let i=0;i<48;i++){const t=i/48*TAU;p.push([16*Math.pow(Math.sin(t),3)/17,-(13*Math.cos(t)-5*Math.cos(2*t)-2*Math.cos(3*t)-Math.cos(4*t))/17]);}return p;})(),
|
||
fish:[[-1,-.3],[-.82,0],[-1,.3],[-.62,.06],[-.2,.2],[.4,.18],[.8,.08],[.98,0],[.8,-.1],[.4,-.22],[-.2,-.22],[-.62,-.06]]
|
||
};
|
||
function bone_(x,a,lw){x.strokeStyle=bone(a===undefined?.72:a);x.lineWidth=lw||1;}
|
||
function line(x,a,b,c,d){x.beginPath();x.moveTo(a,b);x.lineTo(c,d);x.stroke();}
|
||
function circ(x,cx,cy,r){x.beginPath();x.arc(cx,cy,Math.max(.5,r),0,TAU);x.stroke();}
|
||
/* glyph(x, kind, cx, cy, r, t): one organism (or, in bone, one non-living thing), radius r */
|
||
const GLY={
|
||
sun(x,cx,cy,r,t){bone_(x);circ(x,cx,cy,r*.55);for(let i=0;i<12;i++){const a=i/12*TAU+t*.02;line(x,cx+Math.cos(a)*r*.7,cy+Math.sin(a)*r*.7,cx+Math.cos(a)*r*.95,cy+Math.sin(a)*r*.95);}
|
||
x.fillStyle=bone(.6);[[-.18,-.1,.07],[.15,.12,.05],[.05,-.22,.04]].forEach(([u,v,s])=>{x.beginPath();x.arc(cx+u*r,cy+v*r,Math.max(.6,s*r),0,TAU);x.fill();});},
|
||
ring(x,cx,cy,r,t){const n=r<14?4:8;for(let k=n;k>=1;k--){x.strokeStyle=heat(28+(n-k)*(210/n));x.lineWidth=1;x.beginPath();
|
||
for(let i=0;i<=48;i++){const th=i/48*TAU,rr=r*.95*k/n*(1+.05*Math.sin(3*th+k)+.03*Math.sin(5*th-k*2));const px=cx+Math.cos(th)*rr,py=cy+Math.sin(th)*rr*.92;i?x.lineTo(px,py):x.moveTo(px,py);}x.stroke();}
|
||
bone_(x,.35);line(x,cx,cy,cx+r*.9,cy-r*.25);},
|
||
coral(x,cx,cy,r,t){x.strokeStyle=heat(60);x.lineWidth=1;const tips=[[-.62,-.38],[0,-.6],[.56,-.34]];
|
||
line(x,cx,cy+r*.95,cx,cy+r*.1);tips.forEach(([u,v])=>{line(x,cx,cy+r*.1,cx+u*r,cy+v*r);});
|
||
tips.forEach(([u,v],i)=>iso(x,polar(th=>.55+.45*Math.pow(Math.abs(Math.cos(4*th)),.7),32),cx+u*r,cy+v*r,r*.3,t,{lv:r<14?1:2,ph:i}));
|
||
if(r>=10)for(let i=0;i<5;i++){const ph=((reduce?.4:t*.12)+i/5)%1;x.strokeStyle=heat(235,1-ph);circ(x,cx+r*(-.55+i*.27)+Math.sin(t+i)*r*.05,cy-r*.65-ph*r*.55,Math.max(.8,r*.06));}},
|
||
leaf(x,cx,cy,r,t,o){const op=o&&o.open!==undefined?o.open:.5+.5*Math.sin(t*.45);x.strokeStyle=heat(60);x.lineWidth=1;line(x,cx,cy+r*.95,cx,cy-r*.9);
|
||
const n=r<14?3:5;for(let k=0;k<n;k++){const y=cy+r*(.62-k*(1.45/n)),L=r*.62*(1-k*.07),sp=.18+op*1.2;
|
||
iso(x,LEAF,cx,y,L,t,{rot:-Math.PI/2+sp,lv:r<14?1:2,gx:.5,gy:0,ph:k});iso(x,LEAF,cx,y,L,t,{rot:-Math.PI/2-sp,lv:r<14?1:2,gx:.5,gy:0,ph:k+1});}},
|
||
anemone(x,cx,cy,r,t){const op=.75+.25*Math.sin(t*.3);iso(x,polar(th=>.5+.5*op*Math.pow(Math.abs(Math.cos(7*th)),.55),64),cx,cy-r*.1,r*.85,t);
|
||
x.strokeStyle=heat(40);line(x,cx-r*.3,cy+r*.4,cx-r*.25,cy+r*.95);line(x,cx+r*.3,cy+r*.4,cx+r*.25,cy+r*.95);},
|
||
lungs(x,cx,cy,r,t){const b=1+(reduce?0:.07*Math.sin(t*TAU*.25));iso(x,S.lungR,cx,cy,r*b,t,{gx:.38,gy:.08});iso(x,S.lungR.map(p=>[-p[0]*.94,p[1]]),cx,cy,r*b,t,{gx:-.36,gy:.08,ph:1});
|
||
x.strokeStyle=heat(40);line(x,cx,cy-r,cx,cy-r*.42);line(x,cx,cy-r*.42,cx+r*.22,cy-r*.2);line(x,cx,cy-r*.42,cx-r*.22,cy-r*.2);},
|
||
heart(x,cx,cy,r,t){const ph=(t*1.2)%1,b=1+(reduce?0:.09*Math.exp(-ph*7));iso(x,S.heart,cx,cy,r*.85*b,t,{e:Math.exp(-ph*6)*.6});
|
||
x.strokeStyle=heat(60);line(x,cx-r*.15,cy-r*.75,cx-r*.2,cy-r*1);line(x,cx+r*.12,cy-r*.75,cx+r*.25,cy-r*1);},
|
||
neuron(x,cx,cy,r,t){x.lineWidth=1;for(let i=0;i<6;i++){const a=i/6*TAU+.3,l=r*(i===0?1:.75);x.strokeStyle=heat(i===0?120:50);
|
||
const mx=cx+Math.cos(a)*l*.55,my=cy+Math.sin(a)*l*.55;line(x,cx+Math.cos(a)*r*.25,cy+Math.sin(a)*r*.25,mx,my);
|
||
line(x,mx,my,cx+Math.cos(a+.35)*l,cy+Math.sin(a+.35)*l);line(x,mx,my,cx+Math.cos(a-.3)*l*.95,cy+Math.sin(a-.3)*l*.95);}
|
||
iso(x,polar(th=>.3*(1+.22*Math.cos(5*th))),cx,cy,r,t,{lv:r<14?2:3});
|
||
if(!reduce&&r>12){const p=(t*1.5)%1,a=.3;x.fillStyle=heat(250);x.beginPath();x.arc(cx+Math.cos(a)*r*(.25+p*.7),cy+Math.sin(a)*r*(.25+p*.7),1.6,0,TAU);x.fill();}},
|
||
cricket(x,cx,cy,r,t,o){const e=o&&o.e!==undefined?o.e:Math.max(0,Math.sin(t*TAU*2.1))*.6;iso(x,S.cricket,cx,cy,r,t,{e});
|
||
x.strokeStyle=heat(70);x.lineWidth=1;x.beginPath();x.moveTo(cx+r*.62,cy-r*.08);x.quadraticCurveTo(cx+r*1.1,cy-r*.9,cx+r*.3,cy-r*1);x.stroke();
|
||
x.beginPath();x.moveTo(cx-r*.2,cy+r*.1);x.lineTo(cx-r*.45,cy-r*.42);x.lineTo(cx-r*.85,cy+r*.5);x.stroke();line(x,cx+r*.25,cy+r*.15,cx+r*.35,cy+r*.5);line(x,cx+r*.05,cy+r*.16,cx,cy+r*.5);},
|
||
whale(x,cx,cy,r,t){iso(x,S.whale,cx,cy,r,t,{gx:.1,gy:0});x.strokeStyle=heat(90,.7);for(let i=0;i<3;i++){const k=r*(.32+i*.04);line(x,cx+r*.35,cy+k*.4,cx+r*.75,cy+k*.18);}},
|
||
bee(x,cx,cy,r,t){const fl=reduce?0:Math.sin(t*40)*.25;x.strokeStyle=heat(40,.8);x.lineWidth=1;
|
||
[[-1,0],[1,0]].forEach(([s])=>{x.save();x.translate(cx,cy-r*.18);x.rotate(s*(.5+fl));x.beginPath();x.ellipse(s*r*.42,-r*.12,r*.42,r*.2,0,0,TAU);x.stroke();x.restore();});
|
||
iso(x,ELL(.34,.5),cx,cy+r*.35,r,t,{gx:0,gy:0});iso(x,ELL(.24,.22),cx,cy-r*.2,r,t,{lv:2});x.strokeStyle=heat(140);circ(x,cx,cy-r*.55,r*.12);
|
||
x.strokeStyle=heat(200,.8);for(let i=0;i<3;i++){const y=cy+r*(.2+i*.16),w=r*.3*(1-Math.abs(i-1)*.2);line(x,cx-w,y,cx+w,y);}},
|
||
bird(x,cx,cy,r,t){iso(x,S.bird,cx,cy,r,t,{gx:.1,gy:0});x.strokeStyle=heat(60);line(x,cx+r*.1,cy+r*.36,cx+r*.05,cy+r*.75);line(x,cx-r*.1,cy+r*.36,cx-r*.12,cy+r*.75);
|
||
const g=reduce?.8:.5+.5*Math.sin(t*6);x.fillStyle=heat(220,g);x.beginPath();x.arc(cx+r*.52,cy-r*.16,Math.max(1,r*.05),0,TAU);x.arc(cx+r*.6,cy-r*.12,Math.max(1,r*.05),0,TAU);x.fill();},
|
||
cicada(x,cx,cy,r,t){x.strokeStyle=heat(40,.85);x.lineWidth=1;[[-1],[1]].forEach(([s])=>{x.beginPath();x.moveTo(cx+s*r*.1,cy-r*.45);x.quadraticCurveTo(cx+s*r*.9,cy-r*.1,cx+s*r*.35,cy+r*.95);x.quadraticCurveTo(cx+s*r*.15,cy+r*.3,cx+s*r*.1,cy-r*.45);x.stroke();
|
||
line(x,cx+s*r*.15,cy-r*.3,cx+s*r*.5,cy+r*.4);});
|
||
iso(x,ELL(.22,.62),cx,cy+r*.05,r,t,{gx:0,gy:0});const g=reduce?.6:Math.abs(Math.sin(t*25));x.fillStyle=heat(240,g*.8);x.beginPath();x.arc(cx,cy-r*.05,Math.max(1,r*.07),0,TAU);x.fill();
|
||
x.strokeStyle=heat(140);circ(x,cx-r*.13,cy-r*.52,r*.07);circ(x,cx+r*.13,cy-r*.52,r*.07);},
|
||
cochlea(x,cx,cy,r,t){for(let i=0;i<(r<14?2:4);i++){x.strokeStyle=heat(HT[i]);x.lineWidth=1;x.beginPath();
|
||
for(let k=0;k<=90;k++){const th=k/90*TAU*2.4,rr=r*(.95-i*.13)*Math.exp(-.2*th);const px=cx+Math.cos(th+t*.05)*rr,py=cy+Math.sin(th+t*.05)*rr;k?x.lineTo(px,py):x.moveTo(px,py);}x.stroke();}},
|
||
bat(x,cx,cy,r,t){const f=reduce?1:1+.06*Math.sin(t*5);iso(x,S.bat.map(p=>[p[0]*f,p[1]]),cx,cy,r,t,{gx:0,gy:0});
|
||
if(r>12){bone_(x,.35);for(let i=1;i<=3;i++){x.beginPath();x.arc(cx,cy-r*.3,r*(.25+i*.16+((t*.6)%1)*.16),-Math.PI*.85,-Math.PI*.15);x.stroke();}}},
|
||
embryo(x,cx,cy,r,t){iso(x,polar(th=>.95-.5*Math.pow(Math.max(0,Math.cos(th-.4)),3)),cx,cy,r*.9,t);iso(x,ELL(.34,.34),cx-r*.25,cy-r*.42,r,t,{lv:2,ph:2});
|
||
bone_(x,.3);x.beginPath();x.arc(cx,cy,r*1.05,-.6,.9);x.stroke();},
|
||
deer(x,cx,cy,r,t){iso(x,S.deer,cx,cy,r,t,{gx:.05,gy:-.15});x.fillStyle=heat(255);x.beginPath();x.arc(cx+r*.68,cy-r*.66,Math.max(.8,r*.035),0,TAU);x.fill();},
|
||
chloroplast(x,cx,cy,r,t){iso(x,ELL(1,.55),cx,cy,r*.95,t,{gx:0,gy:0,rot:-.25});x.strokeStyle=heat(150,.85);x.lineWidth=1;
|
||
if(r>8)for(let s=-1;s<=1;s++){const gx=cx+s*r*.42,gy=cy-s*r*.1;for(let k=0;k<4;k++)line(x,gx-r*.13,gy-r*.12+k*r*.08,gx+r*.13,gy-r*.12+k*r*.08);}},
|
||
eye(x,cx,cy,r,t){iso(x,polar(th=>{const c=Math.abs(Math.sin(th));return .95*(.42+.58*(1-c))+.4*c*0;},48).map(p=>[p[0],p[1]*.55]),cx,cy,r,t,{lv:2,gx:0,gy:0});
|
||
x.strokeStyle=heat(150);circ(x,cx,cy,r*.34);x.strokeStyle=heat(220);circ(x,cx,cy,r*.15);},
|
||
violet(x,cx,cy,r,t){iso(x,polar(th=>.35+.65*Math.abs(Math.cos(2.5*(th+Math.PI/2))),80),cx,cy,r,t,{gx:0,gy:0});x.strokeStyle=heat(250);circ(x,cx,cy,r*.1);},
|
||
rudbeckia(x,cx,cy,r,t){iso(x,polar(th=>.32+.68*Math.pow(Math.abs(Math.cos(6.5*th)),.5),104),cx,cy,r,t,{gx:0,gy:0});
|
||
x.save();x.setLineDash([2,2]);x.strokeStyle='rgba(181,48,230,.9)';circ(x,cx,cy,r*.55);x.restore();x.strokeStyle=heat(250);circ(x,cx,cy,r*.18);},
|
||
fish(x,cx,cy,r,t){x.fillStyle=bone(.08);smooth(x,S.fish.map(p=>[cx+p[0]*r,cy+p[1]*r]));x.fill();bone_(x,.45);x.stroke();
|
||
bone_(x,.85);line(x,cx-r*.65,cy,cx+r*.62,cy);for(let i=0;i<9;i++){const u=-.5+i*.12;line(x,cx+u*r,cy,cx+(u-.06)*r,cy-r*.17);line(x,cx+u*r,cy,cx+(u-.06)*r,cy+r*.15);}
|
||
circ(x,cx+r*.72,cy-r*.02,r*.12);},
|
||
pet(x,cx,cy,r,t){bone_(x,.6);smooth(x,polar(th=>.9*(1+.07*Math.sin(7*th)+.06*Math.cos(3*th)),40).map(p=>[cx+p[0]*r,cy+p[1]*r*.82]));x.stroke();
|
||
line(x,cx,cy-r*.74,cx,cy+r*.6);[[-.42,-.15,.3],[.38,-.2,.26],[0,.35,.22]].forEach(([u,v,s],i)=>iso(x,polar(th=>1+.15*Math.sin(3*th+i)),cx+u*r,cy+v*r,r*s,t,{ph:i,lv:r<14?2:4}));},
|
||
pollen(x,cx,cy,r,t){creature(x,SP[1],cx,cy,r*.5,.25+.2*Math.sin(t*2),t*.8,1);},
|
||
ciliate(x,cx,cy,r,t){creature(x,SP[5],cx,cy,r*.52,.3+.2*Math.sin(t*TAU*1.18),t*.8,1);},
|
||
colony(x,cx,cy,r,t){creature(x,SP[7],cx,cy,r*.5,Math.exp(-((t*2)%1)*5)*.8,t*.8,1);},
|
||
radiolaria(x,cx,cy,r,t){creature(x,SP[0],cx,cy,r*.5,.3,t*.8,1);},
|
||
cell(x,cx,cy,r,t){iso(x,polar(th=>.9+.08*Math.sin(3*th+t)),cx,cy,r,t,{lv:2});x.strokeStyle=heat(200);circ(x,cx,cy,r*.25);},
|
||
globe(x,cx,cy,r,t){bone_(x);circ(x,cx,cy,r*.62);x.beginPath();x.ellipse(cx,cy,r*.28,r*.62,0,0,TAU);x.stroke();line(x,cx-r*.62,cy,cx+r*.62,cy);
|
||
x.save();x.setLineDash([2,3]);bone_(x,.45);circ(x,cx,cy,r*.92);x.restore();},
|
||
radio(x,cx,cy,r,t){bone_(x);line(x,cx,cy+r*.9,cx,cy-r*.2);line(x,cx-r*.3,cy+r*.9,cx,cy-r*.2);line(x,cx+r*.3,cy+r*.9,cx,cy-r*.2);
|
||
for(let i=1;i<=3;i++){bone_(x,.8-i*.18);x.beginPath();x.arc(cx,cy-r*.2,r*.22*i,-Math.PI*.8,-Math.PI*.2);x.stroke();}},
|
||
galaxy(x,cx,cy,r,t){bone_(x,.7);for(let a=0;a<2;a++){x.beginPath();for(let k=0;k<=60;k++){const th=k/60*TAU*1.3,rr=r*.08*Math.exp(.3*th);const ang=th+a*Math.PI+t*.03;const px=cx+Math.cos(ang)*rr,py=cy+Math.sin(ang)*rr*.6;k?x.lineTo(px,py):x.moveTo(px,py);}x.stroke();}
|
||
x.fillStyle=bone(.8);x.beginPath();x.arc(cx,cy,Math.max(1,r*.07),0,TAU);x.fill();},
|
||
wifi(x,cx,cy,r,t){bone_(x);for(let i=1;i<=3;i++){x.beginPath();x.arc(cx,cy+r*.5,r*.3*i,-Math.PI*.78,-Math.PI*.22);x.stroke();}x.fillStyle=bone(.8);x.beginPath();x.arc(cx,cy+r*.5,Math.max(1,r*.07),0,TAU);x.fill();},
|
||
atom(x,cx,cy,r,t){bone_(x,.7);for(let i=0;i<3;i++){x.beginPath();x.ellipse(cx,cy,r*.9,r*.3,i*Math.PI/3+t*.05,0,TAU);x.stroke();}x.fillStyle=bone(.85);x.beginPath();x.arc(cx,cy,Math.max(1,r*.1),0,TAU);x.fill();},
|
||
cmb(x,cx,cy,r,t){bone_(x,.6);x.beginPath();x.ellipse(cx,cy,r*.95,r*.55,0,0,TAU);x.stroke();let s=7;const R=()=>{s=(s*16807)%2147483647;return s/2147483647;};
|
||
for(let i=0;i<(r<14?14:60);i++){const a=R()*TAU,d=Math.sqrt(R());x.fillStyle=bone(.25+R()*.5);x.fillRect(cx+Math.cos(a)*d*r*.9,cy+Math.sin(a)*d*r*.5,1,1);}}
|
||
};
|
||
function glyph(x,k,cx,cy,r,t,o){const g=GLY[k];if(g){x.save();g(x,cx,cy,r,t,o);x.restore();}}
|
||
|
||
/* ---------------- the field behind everything: a few protozoa drifting far away ---------------- */
|
||
(function(){
|
||
const c=document.getElementById('bg'),veil=document.getElementById('veil');let W,H,x,o=[];
|
||
function init(){const f=fit(c);W=f.w;H=f.h;x=f.x;o=[];let s=11;const R=()=>{s=(s*16807)%2147483647;return s/2147483647;};
|
||
const n=Math.max(5,Math.min(11,Math.round(W*H/110000)));
|
||
for(let i=0;i<n;i++){const z=.4+R()*.7;o.push({k:i%8,x:R()*W,y:R()*H,r:(10+R()*22)*z,z,vx:(R()-.5)*.1*z,vy:(-.03-R()*.07)*z,ph:R()*9});}}
|
||
function frame(ms){const t=reduce?20:ms/1000;x.fillStyle='#050409';x.fillRect(0,0,W,H);
|
||
for(const b of o){if(!reduce){b.x+=b.vx;b.y+=b.vy;const m=b.r*4;if(b.y<-m)b.y=H+m;if(b.x<-m)b.x=W+m;if(b.x>W+m)b.x=-m;}
|
||
creature(x,SP[b.k],b.x,b.y,b.r,.2+.15*Math.sin(t*.8+b.ph),t*.5+b.ph,.16+b.z*.14);}
|
||
const v=clamp((window.scrollY-H*.3)/(H*.5),0,1);if(veil)veil.style.opacity=v.toFixed(3);}
|
||
init();addEventListener('resize',()=>{init();if(reduce)frame(0);});
|
||
if(reduce){frame(0);addEventListener('scroll',()=>requestAnimationFrame(()=>frame(0)),{passive:true});}
|
||
else{let last=0;const g=ms=>{if(ms-last>40){last=ms;frame(ms);}requestAnimationFrame(g);};requestAnimationFrame(g);}
|
||
})();
|
||
|
||
/* ---------------- audio: one context, made on the first click; one example sounds at a time ---------------- */
|
||
const AU={ctx:null,out:null,active:null,wk:null};
|
||
async function audio(){
|
||
if(AU.ctx){if(AU.ctx.state!=='running')try{await AU.ctx.resume();}catch(e){}return AU.ctx;}
|
||
const AC=window.AudioContext||window.webkitAudioContext;if(!AC)throw new Error(T('no_audio'));
|
||
const ctx=new AC();AU.ctx=ctx;
|
||
const comp=ctx.createDynamicsCompressor();comp.threshold.value=-10;comp.ratio.value=8;comp.attack.value=.003;comp.release.value=.2;
|
||
const g=ctx.createGain();g.gain.value=.8;g.connect(comp);comp.connect(ctx.destination);AU.out=g;
|
||
try{await ctx.resume();}catch(e){}
|
||
return ctx;}
|
||
/* (the click train runs as an AudioWorklet, from a string: sample-exact pulses at any rate, so the pitch is exact) */
|
||
const WK=`class Clicks extends AudioWorkletProcessor{
|
||
static get parameterDescriptors(){return [{name:'rate',defaultValue:1,minValue:.01,maxValue:4000,automationRate:'k-rate'}];}
|
||
constructor(){super();this.r=[4,5,6];this.ph=[0,0,0];this.t=[9,9,9];this.cur=-1;this.bf=[1300,1800,2500];this.pan=[.3,.5,.7];
|
||
this.port.onmessage=e=>{if(e.data&&e.data.r)this.r=e.data.r;};}
|
||
process(inp,out,p){const o=out[0],Lc=o[0],Rc=o[1]||o[0],n=Lc.length,sr=sampleRate,tgt=p.rate[0];if(this.cur<0)this.cur=tgt;
|
||
const tau=.0035,k=1-Math.exp(-1/(sr*.04));
|
||
for(let s=0;s<n;s++){this.cur+=(tgt-this.cur)*k;let l=0,r=0;
|
||
for(let v=0;v<3;v++){const f=this.cur*this.r[v]/this.r[0];this.ph[v]+=f/sr;
|
||
if(this.ph[v]>=1){this.ph[v]-=Math.floor(this.ph[v]);this.t[v]=this.ph[v]/f;}
|
||
const t=this.t[v];if(t<.05){const g=.55/Math.sqrt(1+f*.012);const y=g*Math.exp(-t/tau)*Math.sin(6.283185307*this.bf[v]*t);l+=y*(1-this.pan[v]);r+=y*this.pan[v];}
|
||
this.t[v]+=1/sr;}
|
||
Lc[s]=l;if(Rc!==Lc)Rc[s]=r;}
|
||
return true;}}
|
||
registerProcessor('jiant-clicks',Clicks);`;
|
||
async function worklet(ctx){if(AU.wk)return AU.wk;if(!ctx.audioWorklet)throw new Error(T('no_audio'));
|
||
const u=URL.createObjectURL(new Blob([WK],{type:'application/javascript'}));AU.wk=ctx.audioWorklet.addModule(u);return AU.wk;}
|
||
/* a play button: start() builds its graph, stop() fades it out; starting one stops the others */
|
||
function player(btn,ex){
|
||
function look(on){btn.setAttribute('aria-pressed',String(on));const s=btn.querySelector('[data-i18n]');if(s&&(s.dataset.i18n==='play'||s.dataset.i18n==='stop')){s.dataset.i18n=on?'stop':'play';s.textContent=T(s.dataset.i18n);}}
|
||
ex.look=look;
|
||
btn.addEventListener('click',async()=>{
|
||
if(AU.active===ex){ex.stop();AU.active=null;look(false);return;}
|
||
if(AU.active){AU.active.stop();AU.active.look(false);}
|
||
try{const ctx=await audio();await ex.start(ctx);AU.active=ex;look(true);}catch(e){console.warn(e);btn.title=String(e.message||e);}
|
||
});}
|
||
function fadeOut(nodes,g){if(!AU.ctx)return;const t=AU.ctx.currentTime;if(g){g.gain.cancelScheduledValues(t);g.gain.setValueAtTime(g.gain.value,t);g.gain.linearRampToValueAtTime(0,t+.12);}
|
||
setTimeout(()=>nodes.forEach(n=>{try{n.stop&&n.stop();}catch(e){}try{n.disconnect();}catch(e){}}),200);}
|
||
|
||
/* only the canvases on screen are drawn */
|
||
const VIS=new Set();const io=('IntersectionObserver' in window)?new IntersectionObserver(es=>es.forEach(e=>{e.isIntersecting?VIS.add(e.target):VIS.delete(e.target);}),{rootMargin:'80px'}):null;
|
||
const watch=c=>{if(io)io.observe(c);else VIS.add(c);};
|
||
const DRAW=[];let lastT=performance.now();
|
||
function tick(now){const dt=Math.min(.1,(now-lastT)/1000);lastT=now;DRAW.forEach(d=>{if(VIS.has(d.c))d.f(now/1000,dt);});requestAnimationFrame(tick);}
|
||
/* registration marks and a scale bar, as on a plate */
|
||
function marks(x,w,h,k){bone_(x,.3);k=k||8;[[6,6],[w-6,6],[6,h-6],[w-6,h-6]].forEach(([a,b])=>{line(x,a-k/2,b,a+k/2,b);line(x,a,b-k/2,a,b+k/2);});}
|
||
function scalebar(x,x0,y,len,label){bone_(x,.75);line(x,x0,y,x0+len,y);line(x,x0,y-3,x0,y+3);line(x,x0+len,y-3,x0+len,y+3);
|
||
x.fillStyle=bone(.75);x.font=font(9.5);x.textAlign='left';x.fillText(label,x0,y-6);}
|
||
/* a small, still canvas drawn once per frame while on screen */
|
||
function stage(c,fn){let F=fit(c);addEventListener('resize',()=>{F=fit(c);});DRAW.push({c,f:(t,dt)=>{F.x.clearRect(0,0,F.w,F.h);fn(F,reduce?6:t,dt);}});watch(c);
|
||
return ()=>F;}
|
||
|
||
/* frontispiece: a radiolarian, breathing */
|
||
stage(document.getElementById('cover-cv'),(F,t)=>{const {x,w,h}=F,r=Math.min(w,h)*.18;
|
||
bone_(x,.12);line(x,w/2,10,w/2,h-10);line(x,10,h/2,w-10,h/2);x.beginPath();x.arc(w/2,h/2,Math.min(w,h)*.46,0,TAU);x.stroke();
|
||
creature(x,SP[0],w/2,h/2,r,.35+.25*Math.sin(t*1.1),t*.6,1);marks(x,w,h,10);
|
||
x.fillStyle=bone(.6);x.font=serif(15);x.textAlign='right';x.fillText('Radiolaria · ANALOG',w-14,h-16);});
|
||
/* the three specimens of plate VI */
|
||
document.querySelectorAll('.sp-cv').forEach((c,i)=>{const k=+c.dataset.sp;stage(c,(F,t)=>{const {x,w,h}=F;marks(x,w,h);
|
||
creature(x,SP[k],w/2,h/2,Math.min(w,h)*.2,k===7?Math.exp(-((t*2)%1)*5)*.8:.3+.2*Math.sin(t*1.3+i),t*.7+i,1);});});
|
||
|
||
/* ======================= Plate I · the ladder ======================= */
|
||
const LAD=(function(){
|
||
const cv=document.getElementById('lad');let F=fit(cv);
|
||
const eVh=e=>e*EV/H_PL;
|
||
/* id, Hz, kind (colour), length to show (p period, a wavelength in air, e electromagnetic), organism, label */
|
||
const MK=[['solar',1/(11*365.25*86400),'sky','p','sun','Sol · non vivum'],['year',1/(365.25*86400),'sky','p','ring','Quercus robur'],
|
||
['lunar',1/(29.530589*86400),'sky','p','coral','Acropora sp.'],['day',1/86400,'sky','p','leaf','Mimosa pudica'],['tide',1/(12.4206*3600),'sky','p','anemone','Actinia equina'],
|
||
['breath',.25,'life','p','lungs','Homo sapiens · pulmo'],['lfo',.05*Math.pow(800,60/127),'synth','p','ciliate','WHEEL · Ciliophora'],
|
||
['heart',1.2,'life','p','heart','Homo sapiens · cor'],['bpm',2,'synth','p','colony','DRUM-X · colonia'],
|
||
['cricket',(4*(22*9/5+32-50)+40)/60,'life','p','cricket','Oecanthus fultoni'],['schumann',7.83,'em','e','globe','Tellus · non vivum'],
|
||
['alpha',10,'life','p','neuron','Homo sapiens · cortex'],['whale',20,'air','a','whale','Balaenoptera physalus'],['bee',230,'air','a','bee','Apis mellifera'],
|
||
['a440',440,'synth','a','pollen','FM6 · pollen'],['bird',3000,'air','a','bird','Serinus canaria'],['cicada',5000,'air','a','cicada','Cicadidae'],
|
||
['hear20k',2e4,'air','a','cochlea','Homo sapiens · cochlea'],['bat',5e4,'air','a','bat','Chiroptera'],['am',1e6,'em','e','radio','non vivum'],
|
||
['echo',5e6,'air','','embryo','Homo sapiens · embryo'],['fm',1e8,'em','e','radio','non vivum'],['h21',1420405751.768,'em','e','galaxy','Hydrogenium · non vivum'],
|
||
['wifi',2.45e9,'em','e','wifi','non vivum'],['cs',9192631770,'em','e','atom','Caesium · non vivum'],['cmb',160.2e9,'em','e','cmb','non vivum'],
|
||
['heat',3e13,'em','e','deer','Capreolus capreolus'],['chl662',C/662e-9,'light','e','chloroplast','Chlorophyll a'],['a40',A4*Math.pow(2,40),'synth','e','pollen','FM6 · pollen'],
|
||
['green',C/555e-9,'light','e','eye','Homo sapiens · fovea'],['chl430',C/430e-9,'light','e','chloroplast','Chlorophyll a'],['violet',C/400e-9,'light','e','violet','Viola odorata'],
|
||
['uv',C/300e-9,'em','e','rudbeckia','Rudbeckia hirta'],['xray',eVh(50e3),'em','e','fish','Danio rerio · radiographia'],['pet',eVh(511e3),'em','e','pet','Homo sapiens · cerebrum']]
|
||
.map(([id,hz,k,w,g,lat])=>({id,hz,k,w,g,lat,o:L2(hz),alive:lat.indexOf('non vivum')<0})).sort((a,b)=>a.hz-b.hz);
|
||
const mcol=m=>m.k==='light'||m.id==='a40'?rgbs(wl2rgb(C/m.hz*1e9)):m.alive?heat(m.k==='synth'?215:170):BONE;
|
||
const lcol=m=>m.k==='light'||m.id==='a40'?'rgb('+wl2rgb(C/m.hz*1e9).map(v=>Math.round(v+(255-v)*.5))+')':m.k==='synth'?heat(225):bone(m.alive?.82:.55);
|
||
/* rows: 0 sky/life, 1 sound, 2 electromagnetic, 3..5 the FM-1 (its own species beside each range) */
|
||
const BANDS=[[0,'b_cycles',2e-9,3e-5,'ring'],[0,'b_life',.1,100,'cell'],
|
||
[1,'b_infra',1e-3,20,'whale'],[1,'b_aud',20,2e4,'cochlea'],[1,'b_ultra',2e4,1e9,'bat'],
|
||
[2,'b_radio',3e3,3e11,'galaxy'],[2,'b_ir',3e11,4e14,'deer'],[2,'b_vis',4e14,8e14,null],[2,'b_uv',8e14,3e16,'rudbeckia'],
|
||
[2,'b_x',3e16,3e19,'fish'],[2,'b_gamma',3e19,1e23,'pet'],
|
||
[3,'b_lfo',.05,40,'ciliate'],[4,'b_bpm',40/60,4,'colony'],[4,'b_pitch',A4*Math.pow(2,-69/12),A4*Math.pow(2,58/12),'pollen'],
|
||
[5,'b_keys',A4*Math.pow(2,-16/12),A4*Math.pow(2,10/12),'radiolaria']];
|
||
const OMIN=-41,OMAX=68;
|
||
const JUMP={all:[(OMIN+OMAX)/2,OMAX-OMIN],sky:[-30.5,17],body:[-8.5,9],lfo:[-8.3,11],beat:[-8,4.5],sound:[1,12],radio:[16,29],heat:[35,12],light:[L2(6e14),1.6],gamma:[55,21]};
|
||
const V={c:JUMP.all[0],s:JUMP.all[1]},G={c:V.c,s:V.s};let sel=MK.findIndex(m=>m.id==='a440'),cursor=null,dirty=true,hits=[],HDR=[],lastDraw=0;
|
||
function L(){const h=F.h,narrow=F.w<560,R=narrow?14:20,AX=Math.round(h*.56);return {R,ROWY:[30,48,66,h-62,h-44,h-26],AX,LBL0:AX+38,LBLH:16,NL:narrow?3:4,TIER:[0,1,2].map(k=>AX-20-R-k*(2*R+10))};}
|
||
function clampV(v){v.s=clamp(v.s,1.2,OMAX-OMIN);v.c=clamp(v.c,OMIN+v.s/2,OMAX-v.s/2);if(v.s>=OMAX-OMIN)v.c=(OMIN+OMAX)/2;}
|
||
function go(c,s,now){G.c=c;G.s=s;clampV(G);if(now||reduce){V.c=G.c;V.s=G.s;}dirty=true;}
|
||
const X=o=>(o-(V.c-V.s/2))*F.w/V.s;
|
||
function band(x,b,Y,t){const[r,key,lo,hi,g]=b,y=Y.ROWY[r],x0=X(L2(lo)),x1=X(L2(hi));if(x1<0||x0>F.w)return;
|
||
const a=Math.max(0,x0),z=Math.min(F.w,x1);
|
||
if(g){bone_(x,.42);line(x,a,y+.5,z,y+.5);if(x0>=0)line(x,x0+.5,y-3,x0+.5,y+4);if(x1<=F.w)line(x,x1-.5,y-3,x1-.5,y+4);}
|
||
x.font=font(9.5);const tl=T(key),tw=x.measureText(tl).width,lx=Math.max(a+6,(HDR[r]||0)+8);
|
||
if(z-lx>tw+24&&g){glyph(x,g,lx+7,y-6,7,t);x.fillStyle=r>=3?heat(215):bone(.75);x.textAlign='left';x.fillText(tl,lx+18,y-2);}
|
||
else if(z-lx>tw+6&&g){x.fillStyle=r>=3?heat(215):bone(.75);x.textAlign='left';x.fillText(tl,lx,y-2);}}
|
||
function draw(t){
|
||
const {x,w,h}=F,Y=L();x.clearRect(0,0,w,h);const pxo=w/V.s,o0=V.c-V.s/2,o1=V.c+V.s/2;
|
||
x.textBaseline='alphabetic';x.lineWidth=1;
|
||
/* the light: its octave, coloured from wavelength, faint through all rows and solid on its own line */
|
||
const v0=X(L2(4e14)),v1=X(L2(8e14));
|
||
for(let px=Math.max(0,Math.floor(v0));px<Math.min(w,Math.ceil(v1));px++){const nm=C/HZ(o0+(px+.5)/pxo)*1e9,c=wl2rgb(nm);
|
||
x.fillStyle='rgba('+c+',.05)';x.fillRect(px,Y.ROWY[2]+6,1,Y.AX-Y.ROWY[2]-6);x.fillStyle='rgb('+c+')';x.fillRect(px,Y.ROWY[2]-2,1,5);}
|
||
/* chlorophyll a's absorption over the visible octave */
|
||
if(v1>0&&v0<w&&v1-v0>40){x.strokeStyle=heat(150,.9);x.beginPath();let first=true;
|
||
for(let px=Math.max(0,Math.floor(v0));px<Math.min(w,Math.ceil(v1));px++){const nm=C/HZ(o0+(px+.5)/pxo)*1e9,y=Y.AX-8-chlA(nm)*(Y.AX-100);first?x.moveTo(px,y):x.lineTo(px,y);first=false;}x.stroke();
|
||
const pk=X(L2(C/430e-9));x.fillStyle=heat(170);x.font=font(9.5);x.textAlign='center';if(pk>40&&pk<w-40)x.fillText(T('chl'),pk,Y.AX-8-(Y.AX-100)-6);}
|
||
/* audible: a faint column */
|
||
x.font=font(9);HDR=[T('r_sky'),T('r_sound'),T('r_em'),T('r_fm1'),'',''].map(s=>s?x.measureText(s.toUpperCase()).width+10:0);
|
||
BANDS.forEach(b=>band(x,b,Y,t));
|
||
/* the ruler: octaves from A440 */
|
||
const step=[1,2,5,10,20].find(s=>s*pxo>=44)||20;bone_(x,.3);x.font=font(9.5);x.textAlign='center';
|
||
bone_(x,.18);line(x,0,18.5,w,18.5);bone_(x,.35);
|
||
if(pxo>=6)for(let k=Math.ceil(o0);k<=o1;k++){const px=Math.round(X(k))+.5;line(x,px,15,px,19);}
|
||
for(let k=Math.ceil(o0/step)*step;k<=o1;k+=step){const px=X(k);const tl=k===0?'0 = A440':(k>0?'+':'−')+Math.abs(k),hw=x.measureText(tl).width/2+2;
|
||
x.fillStyle=k===0?heat(240):DIM;x.fillText(tl,clamp(px,hw,w-hw),11);x.fillRect(Math.round(px),13,1,6);}
|
||
/* the axis, decades of Hz */
|
||
x.fillStyle=bone(.55);x.fillRect(0,Y.AX,w,1);
|
||
const dpx=Math.log2(10)*pxo,dstep=dpx>=60?1:dpx*3>=60?3:6;const k0=Math.ceil(Math.log10(HZ(o0))),k1=Math.floor(Math.log10(HZ(o1)));
|
||
x.font=font(9.5);x.textAlign='center';
|
||
for(let k=k0;k<=k1;k++){const px=X(L2(Math.pow(10,k)));x.fillStyle=bone(.55);x.fillRect(Math.round(px),Y.AX-3,1,7);
|
||
if(((k%dstep)+dstep)%dstep===0){x.fillStyle=DIM;x.fillText(si(Math.pow(10,k),'Hz',1),px,Y.AX+17);}}
|
||
/* close in: every frequency has a note: the twelve names, folded by octaves */
|
||
if(pxo>=150){x.font=font(9.5);for(let i=Math.floor(o0*12);i<=Math.ceil(o1*12);i++){const px=X(i/12),k=69+i;
|
||
x.fillStyle=k%12===9?heat(240):bone(.5);x.fillRect(Math.round(px),Y.AX-6,1,6);if(pxo>=260||k%12===0||k%12===9)x.fillText(nn(k),px,Y.AX-9);}}
|
||
/* the specimens: each on its pin above the axis (first free tier; none free: the pin alone), names below */
|
||
hits=[];const order=MK.map((m,i)=>i).sort((a,b)=>(a===sel?-1:b===sel?1:0)||MK[a].hz-MK[b].hz);
|
||
const gp=[],lp=[];x.font=font(10.5);
|
||
order.forEach(i=>{const m=MK[i],px=X(m.o);if(px<-80||px>w+80)return;
|
||
if(px>-Y.R&&px<w+Y.R){for(let k=0;k<3;k++){if(gp.every(p=>p.k!==k||Math.abs(p.px-px)>2*Y.R+8)){gp.push({k,px,i});break;}}}
|
||
const tl=T('m_'+m.id),tw=x.measureText(tl).width;let lx=px-4;if(lx+tw>w-2)lx=px-tw+4;lx=Math.max(2,Math.min(lx,w-tw-2));
|
||
for(let r=0;r<Y.NL;r++){if(lp.every(p=>p.r!==r||lx>p.x1+10||lx+tw<p.x0-10)){lp.push({r,x0:lx,x1:lx+tw,i,px,t:tl});break;}}
|
||
hits.push({i,x:px,y:Y.AX,r:9});});
|
||
gp.forEach(p=>{const m=MK[p.i],y=Y.TIER[p.k],on=p.i===sel;x.strokeStyle=on?bone(.85):bone(.2);line(x,Math.round(p.px)+.5,Y.AX-4,Math.round(p.px)+.5,y+Y.R+3);
|
||
if(on){x.save();x.setLineDash([2,3]);bone_(x,.7);circ(x,p.px,y,Y.R+5);x.restore();}
|
||
glyph(x,m.g,p.px,y,Y.R,t+p.i);hits.push({i:p.i,x:p.px,y,r:Y.R+4,g:1});});
|
||
lp.forEach(p=>{const m=MK[p.i],y=Y.LBL0+p.r*Y.LBLH,on=p.i===sel;x.strokeStyle=on?bone(.8):bone(.16);line(x,Math.round(p.px)+.5,Y.AX+22,Math.round(p.px)+.5,y-10);
|
||
x.font=on?font(10.5,'600'):font(10.5);x.fillStyle=on?BONE:lcol(m);x.textAlign='left';x.fillText(p.t,p.x0,y);if(on){x.fillRect(p.x0,y+3,p.x1-p.x0,1);}
|
||
hits.push({i:p.i,x0:p.x0-3,x1:p.x1+3,y0:y-11,y1:y+4});});
|
||
MK.forEach((m,i)=>{const px=X(m.o);if(px<-10||px>w+10)return;x.fillStyle=mcol(m);x.beginPath();x.arc(px,Y.AX,i===sel?3.5:2.5,0,TAU);x.fill();});
|
||
/* a cursor sent from the plates below */
|
||
if(cursor){const px=X(L2(cursor.hz));if(px>=0&&px<=w){x.strokeStyle=cursor.col||BONE;x.setLineDash([3,3]);line(x,px+.5,22,px+.5,h-22);x.setLineDash([]);
|
||
x.font=font(10.5,'600');const tw=x.measureText(cursor.t).width,lx=clamp(px+6,2,w-tw-8),cy=Y.LBL0+Y.NL*Y.LBLH+2;x.textAlign='left';x.fillStyle='#050409';x.fillRect(lx-3,cy-11,tw+6,15);x.fillStyle=cursor.col||BONE;x.fillText(cursor.t,lx,cy);}}
|
||
/* row names at the left, small capitals */
|
||
x.font=font(9);x.textAlign='left';[[0,'r_sky'],[1,'r_sound'],[2,'r_em'],[3,'r_fm1']].forEach(([r,k])=>{const tl=T(k).toUpperCase(),tw=x.measureText(tl).width,y=Y.ROWY[r];x.fillStyle='rgba(5,4,9,.92)';x.fillRect(0,y-10,tw+8,14);x.fillStyle=r===3?heat(215):DIM;x.fillText(tl,2,y);});
|
||
/* a scale bar */
|
||
const oct=pxo>=24?1:10;scalebar(x,w-Math.max(oct*pxo,1)-12,h-8,oct*pxo,T(oct===1?'u_oct1':'u_oct10'));
|
||
document.getElementById('lad-view').textContent=signed(o0,1)+' … '+signed(o1,1)+' oct · '+si(HZ(o0),'Hz')+' … '+si(HZ(o1),'Hz');
|
||
}
|
||
/* the specimen: the selected organism, large, with its label */
|
||
const icv=document.getElementById('i-cv');
|
||
function info(){const m=MK[sel];if(!m)return;
|
||
document.getElementById('i-dot').style.background=mcol(m);document.getElementById('i-name').textContent=T('m_'+m.id);
|
||
document.getElementById('i-lat').textContent=m.lat;document.getElementById('i-no').textContent='№ '+String(sel+1).padStart(2,'0');
|
||
document.getElementById('i-f').textContent=hzText(m.hz);
|
||
const pl=document.getElementById('i-p-l'),p=document.getElementById('i-p');
|
||
if(m.w==='a'){pl.dataset.i18n='i_wla';p.textContent=len(SND/m.hz);}
|
||
else if(m.w==='e'){pl.dataset.i18n='i_wl';p.textContent=len(C/m.hz);}
|
||
else{pl.dataset.i18n='i_period';p.textContent=period(m.hz);}
|
||
pl.textContent=T(pl.dataset.i18n);
|
||
document.getElementById('i-o').textContent=signed(m.o,2);
|
||
document.getElementById('i-n').textContent=noteOf(m.hz,m.hz>=8&&m.hz<=13000);
|
||
document.getElementById('i-t').textContent=T('t_'+m.id);}
|
||
stage(icv,(F2,t)=>{const m=MK[sel];if(!m)return;const {x,w,h}=F2,r=Math.min(w,h)*.34;marks(x,w,h,10);
|
||
bone_(x,.1);x.beginPath();x.arc(w/2,h/2-6,r*1.3,0,TAU);x.stroke();
|
||
glyph(x,m.g,w/2,h/2-6,r,t);
|
||
const lab=m.w==='a'?'λ '+len(SND/m.hz):m.w==='e'?'λ '+len(C/m.hz):'T '+period(m.hz);scalebar(x,14,h-12,Math.min(60,w*.3),lab);
|
||
x.fillStyle=bone(.55);x.font=serif(13);x.textAlign='right';x.fillText(m.alive?'vivum':'non vivum',w-14,h-12);});
|
||
function select(i,pan){sel=(i+MK.length)%MK.length;const m=MK[sel];if(pan){const px=X(m.o);if(px<30||px>F.w-30)go(m.o,Math.min(V.s,G.s));}info();dirty=true;}
|
||
/* pointer: drag pans, two fingers pinch, a tap selects; the wheel zooms (sideways: pans) */
|
||
const P=new Map();let moved=0,pinch=null;
|
||
cv.addEventListener('pointerdown',e=>{try{cv.setPointerCapture(e.pointerId);}catch(_){}P.set(e.pointerId,{x:e.clientX,y:e.clientY});if(P.size===1)moved=0;
|
||
if(P.size===2){const[a,b]=[...P.values()];pinch={d:Math.abs(a.x-b.x)||1,s:V.s,c:V.c,m:(a.x+b.x)/2};}});
|
||
cv.addEventListener('pointermove',e=>{const p=P.get(e.pointerId);if(!p)return;const dx=e.clientX-p.x;p.x=e.clientX;p.y=e.clientY;
|
||
if(P.size===1){moved+=Math.abs(dx);V.c-=dx/F.w*V.s;clampV(V);G.c=V.c;G.s=V.s;dirty=true;}
|
||
else if(P.size===2&&pinch){const[a,b]=[...P.values()];const d=Math.abs(a.x-b.x)||1,r=cv.getBoundingClientRect(),mx=(pinch.m-r.left)/F.w;
|
||
const anchor=pinch.c-pinch.s/2+mx*pinch.s;V.s=pinch.s*pinch.d/d;clampV(V);V.c=anchor-(mx-.5)*V.s;clampV(V);G.c=V.c;G.s=V.s;moved=99;dirty=true;}});
|
||
function up(e){const was=P.has(e.pointerId);P.delete(e.pointerId);if(P.size<2)pinch=null;
|
||
if(was&&e.type==='pointerup'&&P.size===0&&moved<6){const r=cv.getBoundingClientRect(),x=e.clientX-r.left,y=e.clientY-r.top;
|
||
let best=null,bd=1e9;for(const h of hits){if(h.x0!==undefined){if(x>=h.x0&&x<=h.x1&&y>=h.y0&&y<=h.y1){best=h;bd=0;break;}}
|
||
else{const d=h.g?Math.hypot(x-h.x,y-h.y):Math.hypot(x-h.x,(y-h.y)*.5);const lim=h.g?h.r:18;if(d<lim&&d<bd){bd=d;best=h;}}}
|
||
if(best)select(best.i,false);}}
|
||
cv.addEventListener('pointerup',up);cv.addEventListener('pointercancel',up);
|
||
cv.addEventListener('wheel',e=>{e.preventDefault();const r=cv.getBoundingClientRect(),mx=(e.clientX-r.left)/F.w;
|
||
if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){go(G.c+e.deltaX/F.w*G.s,G.s,true);return;}
|
||
const anchor=V.c-V.s/2+mx*V.s,s=clamp(V.s*Math.exp(e.deltaY*.0016),1.2,OMAX-OMIN);V.s=s;V.c=anchor-(mx-.5)*s;clampV(V);G.c=V.c;G.s=V.s;dirty=true;},{passive:false});
|
||
cv.addEventListener('keydown',e=>{const k=e.key;if(k==='ArrowLeft'||k==='ArrowRight'){go(G.c+(k==='ArrowLeft'?-1:1)*G.s*.12,G.s);e.preventDefault();}
|
||
else if(k==='+'||k==='='){go(G.c,G.s/1.4);e.preventDefault();}else if(k==='-'||k==='_'){go(G.c,G.s*1.4);e.preventDefault();}
|
||
else if(k==='ArrowDown'||k==='ArrowUp'){select(sel+(k==='ArrowDown'?1:-1),true);e.preventDefault();}});
|
||
document.getElementById('z-in').onclick=()=>go(G.c,G.s/1.6);document.getElementById('z-out').onclick=()=>go(G.c,G.s*1.6);
|
||
document.getElementById('i-prev').onclick=()=>select(sel-1,true);document.getElementById('i-next').onclick=()=>select(sel+1,true);
|
||
document.querySelectorAll('#jumps .chip').forEach(b=>b.addEventListener('click',()=>{const j=JUMP[b.dataset.j];go(j[0],j[1]);
|
||
document.querySelectorAll('#jumps .chip').forEach(o=>o.setAttribute('aria-pressed',String(o===b)));}));
|
||
addEventListener('resize',()=>{F=fit(cv);dirty=true;});
|
||
I18N.onLang(()=>{info();dirty=true;});
|
||
/* redrawn when something moved, and a few times a second while on screen so the specimens breathe */
|
||
DRAW.push({c:cv,f:(t)=>{const e=reduce?1:.18;if(Math.abs(G.c-V.c)>1e-4||Math.abs(G.s-V.s)>1e-4){V.c+=(G.c-V.c)*e;V.s+=(G.s-V.s)*e;if(Math.abs(G.c-V.c)<1e-3&&Math.abs(G.s-V.s)<1e-3){V.c=G.c;V.s=G.s;}dirty=true;}
|
||
if(dirty||(!reduce&&t-lastDraw>.07)){dirty=false;lastDraw=t;draw(reduce?6:t);}}});
|
||
watch(cv);
|
||
return {show(hz,t,col){cursor={hz,t,col};const o=L2(hz);go(o,Math.min(Math.max(G.s,6),14));dirty=true;document.getElementById('ladder').scrollIntoView({behavior:reduce?'auto':'smooth',block:'start'});}};
|
||
})();
|
||
|
||
/* ======================= Plate II · a chorus of fireflies: polyrhythm → chord ======================= */
|
||
(function(){
|
||
const cv=document.getElementById('a-cv'),rate=document.getElementById('a-rate'),ro=document.getElementById('a-rate-o'),st=document.getElementById('a-state'),vo=document.getElementById('a-voices');
|
||
let F=fit(cv);addEventListener('resize',()=>{F=fit(cv);});
|
||
let R=[4,5,6],ph=[0,0,0],flash=[0,0,0],node=null,gain=null,sweep=false;
|
||
const VH=[120,195,240],VC=VH.map(v=>heat(v));
|
||
const r0=()=>Math.pow(220,+rate.value); /* the lowest voice: 1 .. 220 Hz (A3) */
|
||
function texts(){const f0=r0();ro.textContent=si(f0,'Hz');
|
||
st.textContent=T(f0<8?'a_rhythm':f0<24?'a_flutter':'a_pitch');st.style.setProperty('--dot',heat(f0<8?60:f0<24?170:240));
|
||
vo.innerHTML='';R.forEach((r,i)=>{const f=f0*r/R[0],d=document.createElement('div');d.style.setProperty('--c',VC[i]);
|
||
const b=document.createElement('b');b.textContent=r+' · '+si(f,'Hz');d.appendChild(b);
|
||
d.appendChild(document.createTextNode(f<20?nf(f*60,3)+' BPM':noteOf(f,true)));vo.appendChild(d);});
|
||
if(node)node.parameters.get('rate').setValueAtTime(f0,AU.ctx.currentTime);}
|
||
rate.addEventListener('input',()=>{sweep=false;sw.setAttribute('aria-pressed','false');texts();});
|
||
document.querySelectorAll('#a-ratio button').forEach(b=>b.addEventListener('click',()=>{R=b.dataset.r.split(',').map(Number);ph=[0,0,0];
|
||
document.querySelectorAll('#a-ratio button').forEach(o=>o.setAttribute('aria-pressed',String(o===b)));if(node)node.port.postMessage({r:R});texts();}));
|
||
const sw=document.getElementById('a-sweep');sw.addEventListener('click',()=>{sweep=!sweep;if(sweep&&+rate.value>=.999)rate.value=0;sw.setAttribute('aria-pressed',String(sweep));});
|
||
const ex={async start(ctx){await worklet(ctx);node=new AudioWorkletNode(ctx,'jiant-clicks',{numberOfInputs:0,outputChannelCount:[2]});
|
||
node.port.postMessage({r:R});node.parameters.get('rate').value=r0();gain=ctx.createGain();gain.gain.value=0;gain.gain.linearRampToValueAtTime(.9,ctx.currentTime+.05);
|
||
node.connect(gain);gain.connect(AU.out);ph=[0,0,0];},
|
||
stop(){fadeOut([node,gain],gain);node=null;gain=null;}};
|
||
player(document.getElementById('a-play'),ex);
|
||
I18N.onLang(texts);
|
||
/* grass, drawn once per size */
|
||
let grass=null;function blades(w,h){let s=3;const Rn=()=>{s=(s*16807)%2147483647;return s/2147483647;};const g=[];for(let i=0;i<Math.round(w/7);i++){const x0=Rn()*w,hh=h*(.08+Rn()*.16);g.push([x0,hh,(Rn()-.5)*12]);}return g;}
|
||
function firefly(x,cx,cy,r,glow,col,t){
|
||
if(glow>.02){const gr=x.createRadialGradient(cx,cy+r*.55,0,cx,cy+r*.55,r*3.2);gr.addColorStop(0,col.replace('rgb','rgba').replace(')',','+(.55*glow)+')'));gr.addColorStop(1,'rgba(0,0,0,0)');x.fillStyle=gr;x.fillRect(cx-r*3.4,cy-r*3,r*6.8,r*7);}
|
||
x.strokeStyle=heat(40,.8);x.lineWidth=1;x.beginPath();x.ellipse(cx-r*.42,cy-r*.05,r*.42,r*.18,-.5,0,TAU);x.stroke();x.beginPath();x.ellipse(cx+r*.42,cy-r*.05,r*.42,r*.18,.5,0,TAU);x.stroke();
|
||
iso(x,ELL(.3,.62),cx,cy,r,t,{gx:0,gy:0,lv:3});x.strokeStyle=heat(140);circ(x,cx,cy-r*.72,r*.16);
|
||
x.fillStyle=heat(150+glow*105,.25+glow*.75);x.beginPath();x.ellipse(cx,cy+r*.45,r*.2,r*.2,0,0,TAU);x.fill();
|
||
line(x,cx-r*.06,cy-r*.85,cx-r*.3,cy-r*1.2);line(x,cx+r*.06,cy-r*.85,cx+r*.3,cy-r*1.2);}
|
||
DRAW.push({c:cv,f:(t,dt)=>{
|
||
if(sweep){rate.value=String(Math.min(1,+rate.value+dt/24));texts();if(+rate.value>=1){sweep=false;sw.setAttribute('aria-pressed','false');}}
|
||
const {x,w,h}=F,f0=r0();x.clearRect(0,0,w,h);if(!grass||grass.w!==w){grass=blades(w,h);grass.w=w;}
|
||
/* the meadow at night */
|
||
x.strokeStyle=bone(.12);x.lineWidth=1;grass.forEach(([x0,hh,lean])=>{x.beginPath();x.moveTo(x0,h);x.quadraticCurveTo(x0+lean*.3,h-hh*.6,x0+lean,h-hh);x.stroke();});
|
||
const top=h*.6,cw=w/3;
|
||
R.forEach((r,i)=>{const f=f0*r/R[0];const before=ph[i];ph[i]+=dt*f;if(Math.floor(ph[i])!==Math.floor(before))flash[i]=1;flash[i]*=Math.exp(-dt*12);
|
||
const glow=f>14?.75:flash[i],cx=cw*(i+.5),cy=top*.48,rr=Math.min(cw*.17,h*.12);
|
||
firefly(x,cx,cy+Math.sin(t*.7+i*2)*3,rr,glow,VC[i],t+i);
|
||
x.fillStyle=bone(.75);x.font=serif(18);x.textAlign='center';x.fillText(String(r),cx,top*.48+rr*2.1);
|
||
/* its last two seconds, newest at the right: one hairline per flash; too many to draw, a band */
|
||
const y=top+10+i*((h-top-26)/3),bh=(h-top-26)/3*.62,x0=12,x1=w-12,tw=x1-x0,win=2,n=f*win;
|
||
bone_(x,.12);line(x,x0,y+bh/2,x1,y+bh/2);
|
||
if(n>tw/2){const gr=x.createLinearGradient(0,y,0,y+bh);gr.addColorStop(0,heat(VH[i],0));gr.addColorStop(.5,heat(VH[i],.7));gr.addColorStop(1,heat(VH[i],0));x.fillStyle=gr;x.fillRect(x0,y,tw,bh);x.strokeStyle=heat(VH[i],.9);line(x,x0,y+bh/2,x1,y+bh/2);}
|
||
else{x.strokeStyle=VC[i];x.lineWidth=n>tw/6?1:1.4;const p=ph[i];for(let m=Math.floor(p);m>p-n;m--){const back=(p-m)/f,px=x1-back/win*tw;line(x,px,y,px,y+bh);}x.lineWidth=1;}
|
||
});
|
||
x.fillStyle=DIM;x.font=font(9.5);x.textAlign='left';x.fillText('−2 s',12,h-4);x.textAlign='right';x.fillText(T('d_now'),w-12,h-4);
|
||
marks(x,w,h);
|
||
}});
|
||
watch(cv);texts();
|
||
})();
|
||
|
||
/* ======================= Plate III · a ciliate breathing with its modulator: LFO → AM / FM ======================= */
|
||
(function(){
|
||
const cv=document.getElementById('b-cv'),rate=document.getElementById('b-rate'),depth=document.getElementById('b-depth');
|
||
const ro=document.getElementById('b-rate-o'),dO=document.getElementById('b-depth-o'),st=document.getElementById('b-state'),rd=document.getElementById('b-read');
|
||
let F=fit(cv);addEventListener('resize',()=>{F=fit(cv);});
|
||
const FC=220;let mode='fm',pm=0,g=null,J=null,AMP=[],Jkey='';
|
||
const fm=()=>.1*Math.pow(8800,+rate.value); /* 0.1 Hz .. 880 Hz */
|
||
const dev=()=>+depth.value*FC; /* FM: deviation up to 220 Hz; AM: depth m = 0..1 */
|
||
/* Bessel J_n(β) by its integral (1/π)∫cos(nτ − β sin τ)dτ: the height of each FM sideband */
|
||
function bessel(n,b){const M=Math.max(200,Math.ceil(b*8));let s=0;for(let i=0;i<M;i++){const t=(i+.5)/M*Math.PI;s+=Math.cos(n*t-b*Math.sin(t));}return s/M;}
|
||
function lines(){const f=fm(),key=mode+f.toFixed(3)+depth.value;if(key===Jkey)return J;Jkey=key;J=[];AMP=[];
|
||
if(mode==='am'){const m=+depth.value;J.push([FC,1]);if(f>=1){J.push([FC+f,m/2]);J.push([Math.abs(FC-f),m/2]);}AMP[1]=f>=20?m/2:0;}
|
||
else{const b=dev()/f;if(f<3||b>60){J.push([FC,1,dev()]);}else{const N=Math.ceil(b+6);for(let n=-N;n<=N;n++){const a=Math.abs(bessel(n,b));J.push([Math.abs(FC+n*f),a]);if(n>0&&n<=6&&f>=20)AMP[n]=a;}}}
|
||
return J;}
|
||
function texts(){const f=fm();ro.textContent=si(f,'Hz');dO.textContent=mode==='fm'?'Δf '+si(dev()||0,'Hz'):'m '+nfx(+depth.value,2);
|
||
st.textContent=T(f<12?'b_lfo_s':f<30?'b_rough':'b_timbre');st.style.setProperty('--dot',heat(f<12?60:f<30?170:240));
|
||
const rows=[[T('b_car'),si(FC,'Hz')+' · '+noteOf(FC,true)],[T('b_mod'),si(f,'Hz')+(f>=20?' · '+noteOf(f,true):' · '+period(f))],
|
||
mode==='fm'?[T('b_idx'),nf(dev()/f,3)]:[T('b_amd'),nfx(+depth.value,2)]];
|
||
if(f>=20)rows.push([T('b_side'),[1,2].map(n=>si(FC+n*f,'Hz')+' / '+si(Math.abs(FC-n*f),'Hz')).join(' · ')]);
|
||
rd.innerHTML='';rows.forEach(([a,b])=>{const dt=document.createElement('dt');dt.textContent=a;const dd=document.createElement('dd');dd.textContent=b;rd.appendChild(dt);rd.appendChild(dd);});
|
||
if(g&&AU.ctx){const t=AU.ctx.currentTime;g.mod.frequency.setTargetAtTime(f,t,.02);
|
||
if(mode==='fm'){g.mg.gain.setTargetAtTime(dev(),t,.02);g.vca.gain.setTargetAtTime(1,t,.02);}else{const m=+depth.value;g.mg.gain.setTargetAtTime(m/2,t,.02);g.vca.gain.setTargetAtTime(1-m/2,t,.02);}}}
|
||
function route(){if(!g)return;try{g.mg.disconnect();}catch(e){}g.mg.connect(mode==='fm'?g.car.frequency:g.vca.gain);texts();}
|
||
rate.addEventListener('input',texts);depth.addEventListener('input',texts);
|
||
document.querySelectorAll('#b-mode button').forEach(b=>b.addEventListener('click',()=>{mode=b.dataset.m;document.querySelectorAll('#b-mode button').forEach(o=>o.setAttribute('aria-pressed',String(o===b)));route();texts();}));
|
||
const ex={async start(ctx){const car=ctx.createOscillator(),mod=ctx.createOscillator(),mg=ctx.createGain(),vca=ctx.createGain(),out=ctx.createGain(),an=ctx.createAnalyser();
|
||
car.frequency.value=FC;mod.frequency.value=fm();an.fftSize=8192;an.smoothingTimeConstant=.6;out.gain.value=0;out.gain.linearRampToValueAtTime(.32,ctx.currentTime+.08);
|
||
mod.connect(mg);car.connect(vca);vca.connect(out);out.connect(an);an.connect(AU.out);g={car,mod,mg,vca,out,an,buf:new Float32Array(an.frequencyBinCount)};
|
||
route();car.start();mod.start();},
|
||
stop(){if(g)fadeOut([g.car,g.mod,g.mg,g.vca,g.an,g.out],g.out);g=null;}};
|
||
player(document.getElementById('b-play'),ex);
|
||
I18N.onLang(texts);
|
||
DRAW.push({c:cv,f:(t,dt)=>{const {x,w,h}=F,f=fm();x.clearRect(0,0,w,h);pm+=dt*f;const Lj=lines();
|
||
const narrow=w<520,ow=narrow?w:Math.min(w*.45,h),oh=narrow?h*.55:h,ocx=ow/2,ocy=oh/2+(narrow?4:0),R0=Math.min(ow,oh)*.27;
|
||
/* the organism: slow, it breathes with the modulator; fast, its membrane ripples with one mode per sideband */
|
||
const dp=+depth.value,v=Math.sin(TAU*pm),slow=f<12,mid=f>=12&&f<30;
|
||
const br=slow?1+(mode==='fm'?.16:.2)*dp*v:mid?1+.04*dp*Math.sin(t*37):1;
|
||
const energy=mode==='am'?(slow?(.5+.5*v)*dp:dp*.5):(slow?.25+.25*dp*v:.2+.4*dp);
|
||
const mem=th=>{let s=1;for(let n=1;n<=6;n++){const a=AMP[n]||0;if(a)s+=.13*a*Math.cos(4*n*th+(reduce?0:t*(.5+n*.2)));}return s;};
|
||
bone_(x,.1);x.beginPath();x.arc(ocx,ocy,R0*1.6,0,TAU);x.stroke();
|
||
const cil=Math.min(f,7);x.strokeStyle=heat(60,.8);x.lineWidth=1;
|
||
for(let i=0;i<64;i++){const th=i/64*TAU,rr=R0*br*mem(th),tilt=.55*Math.sin(th*6-(reduce?0:t*TAU*Math.max(.4,cil*.3)));
|
||
const px=ocx+Math.cos(th)*rr,py=ocy+Math.sin(th)*rr,ang=th+tilt;line(x,px,py,px+Math.cos(ang)*R0*.18,py+Math.sin(ang)*R0*.18);}
|
||
[1,.74,.5,.27].forEach((s,i)=>{x.strokeStyle=heat(HT[i]+energy*60);x.beginPath();for(let k=0;k<=96;k++){const th=k/96*TAU,rr=R0*br*s*(1+(mem(th)-1)*(1-i*.2))*(1+.05*Math.sin(3*th+t*.7+i));
|
||
const px=ocx+Math.cos(th)*rr*1.08,py=ocy+Math.sin(th)*rr;k?x.lineTo(px,py):x.moveTo(px,py);}x.closePath();x.stroke();});
|
||
x.strokeStyle=heat(230);circ(x,ocx+R0*.15,ocy-R0*.1,R0*.12);x.strokeStyle=heat(250);circ(x,ocx+R0*.15,ocy-R0*.1,R0*.05);
|
||
x.strokeStyle=heat(200,.8);circ(x,ocx-R0*.3,ocy+R0*.2,R0*(.08+(slow?.05*(.5+.5*v):.05)));
|
||
x.fillStyle=bone(.7);x.font=serif(14);x.textAlign='left';x.fillText('Ciliophora · WHEEL',12,narrow?18:h-12);
|
||
/* the spectrum, 0..1500 Hz, linear (sidebands are evenly spaced): theory in the heat ramp, the live analyser behind */
|
||
const sx0=narrow?14:ow+16,sx1=w-14,sy0=narrow?oh+22:34,sy1=h-22,sh=sy1-sy0-6,FX=1500,xf=v=>sx0+v/FX*(sx1-sx0);
|
||
x.fillStyle=DIM;x.font=font(9.5);x.textAlign='left';x.fillText(T('b_spec').toUpperCase(),sx0,sy0-12);
|
||
x.fillStyle=bone(.35);x.fillRect(sx0,sy1,sx1-sx0,1);x.textAlign='center';
|
||
[0,500,1000,1500].forEach(v=>{x.fillStyle=bone(.35);x.fillRect(xf(v),sy1,1,4);x.fillStyle=DIM;x.fillText(v===0?'0':v===1500?'1.5 kHz':String(v),clamp(xf(v),sx0+8,sx1-22),sy1+15);});
|
||
if(g&&g.an){g.an.getFloatFrequencyData(g.buf);const bw=AU.ctx.sampleRate/g.an.fftSize,n=Math.min(g.buf.length,Math.ceil(FX/bw));
|
||
x.fillStyle=bone(.1);x.beginPath();x.moveTo(sx0,sy1);for(let i=0;i<n;i++){const db=clamp((g.buf[i]+100)/80,0,1);x.lineTo(xf(i*bw),sy1-db*sh);}x.lineTo(xf(n*bw),sy1);x.closePath();x.fill();}
|
||
Lj.forEach(([fr,a,d])=>{if(fr>FX)return;const px=xf(fr);
|
||
if(d!==undefined){x.strokeStyle=heat(240);line(x,px,sy1,px,sy1-sh*.9);if(d>0){bone_(x,.6);const y=sy1-sh*.5;line(x,xf(FC-d),y,xf(FC+d),y);line(x,xf(FC-d),y-4,xf(FC-d),y+4);line(x,xf(FC+d),y-4,xf(FC+d),y+4);}}
|
||
else{x.strokeStyle=heat(40+a*215);x.lineWidth=1.5;line(x,px,sy1,px,sy1-a*sh*.9);x.lineWidth=1;x.fillStyle=heat(40+a*215);x.beginPath();x.arc(px,sy1-a*sh*.9,1.6,0,TAU);x.fill();}});
|
||
marks(x,w,h);
|
||
}});
|
||
watch(cv);texts();
|
||
})();
|
||
|
||
/* ======================= Plate IV · the chromatic flower: note → colour ======================= */
|
||
(function(){
|
||
const keys=document.getElementById('keys'),rd=document.getElementById('c-read'),octB=document.getElementById('c-oct'),fcv=document.getElementById('c-cv'),scv=document.getElementById('c-spec');
|
||
let oct=4,cur=9,run=null; /* cur: semitone 0..12 above C of 'oct' */
|
||
const fOf=s=>A4*Math.pow(2,(oct-4)+(s-9)/12);
|
||
const WH=[0,2,4,5,7,9,11,12],BK=[[1,0],[3,1],[6,3],[8,4],[10,5]];
|
||
const btns=[];
|
||
function build(){keys.innerHTML='';btns.length=0;
|
||
WH.forEach(s=>{const b=document.createElement('button');b.type='button';b.className='key';b.dataset.s=s;keys.appendChild(b);btns[s]=b;});
|
||
BK.forEach(([s,after])=>{const b=document.createElement('button');b.type='button';b.className='key bk';b.dataset.s=s;b.style.left='calc((100% + 2px) / 8 * '+(after+1)+' - (100% - 14px) / 8 * .3 - 1px)';keys.appendChild(b);btns[s]=b;});
|
||
btns.forEach(b=>{if(!b)return;b.addEventListener('pointerdown',e=>{e.preventDefault();hit(+b.dataset.s);});b.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();hit(+b.dataset.s);}});});
|
||
label();}
|
||
function label(){btns.forEach((b,s)=>{if(!b)return;const f=fOf(s),L=toLight(f);b.innerHTML='';const c=document.createElement('span');c.className='pg';c.style.background=rgbs(wl2rgb(L.nm));b.appendChild(c);
|
||
b.appendChild(document.createTextNode(nn(s)));b.setAttribute('aria-label',nn(s)+(oct+(s===12?1:0))+' · '+nf(L.nm,3)+' nm');b.classList.toggle('on',s===cur);});
|
||
octB.textContent=nn(0)+oct+'–'+nn(0)+(oct+1);}
|
||
function show(){const f=fOf(cur),L=toLight(f);
|
||
const rows=[[T('c_note'),noteOf(f,true)+' · '+si(f,'Hz')],[T('c_doub'),'× 2'+String(L.n).replace(/./g,d=>SUP[d]||d)+' ('+L.n+')'],[T('c_light'),si(L.F,'Hz')],[T('c_wl'),nf(L.nm,3)+' nm'],[T('c_col'),colName(L.nm)]];
|
||
rd.innerHTML='';rows.forEach(([a,b])=>{const dt=document.createElement('dt');dt.textContent=a;const dd=document.createElement('dd');dd.textContent=b;rd.appendChild(dt);rd.appendChild(dd);});
|
||
btns.forEach((b,s)=>b&&b.classList.toggle('on',s===cur));}
|
||
/* the flower: twelve petals clockwise from the top, C at noon, each pigmented with its note's light */
|
||
let open=[...Array(12)].map(()=>0);
|
||
stage(fcv,(F,t,dt)=>{const {x,w,h}=F,cx=w/2,cy=h/2,R=Math.min(w,h)*.46;marks(x,w,h);
|
||
for(let k=0;k<12;k++){const L=toLight(fOf(k)),c=wl2rgb(L.nm),on=(cur%12)===k;open[k]+=((on?1:0)-open[k])*Math.min(1,(dt||.016)*8);
|
||
const a=-Math.PI/2+k*TAU/12,len=R*(.8+.12*open[k]+(reduce?0:.015*Math.sin(t*.9+k)));
|
||
const pts=LEAF.map(p=>[p[0],p[1]*.78]);x.save();x.translate(cx,cy);x.rotate(a);
|
||
smooth(x,pts.map(p=>[R*.16+p[0]*len,p[1]*len]));x.fillStyle='rgba('+c+','+(.62+.3*open[k])+')';x.fill();x.strokeStyle=bone(.5);x.lineWidth=1;x.stroke();
|
||
x.strokeStyle='rgba(0,0,0,.35)';[.7,.45].forEach(s=>{smooth(x,pts.map(p=>[R*.16+len*(.5+(p[0]-.5)*s),p[1]*len*s]));x.stroke();});
|
||
x.strokeStyle='rgba(0,0,0,.3)';line(x,R*.18,0,R*.16+len*.92,0);
|
||
x.restore();
|
||
x.fillStyle=on?BONE:bone(.6);x.font=font(10,on?'600':'500');x.textAlign='center';const lr=R*.16+len+10;if(lr<Math.min(w,h)/2-2)x.fillText(nn(k),cx+Math.cos(a)*lr,cy+Math.sin(a)*lr+3);}
|
||
iso(x,polar(th=>1+.06*Math.sin(9*th)),cx,cy,R*.2,t,{lv:4,e:.6});
|
||
});
|
||
fcv.addEventListener('pointerdown',e=>{const r=fcv.getBoundingClientRect(),dx=e.clientX-r.left-r.width/2,dy=e.clientY-r.top-r.height/2;if(Math.hypot(dx,dy)<Math.min(r.width,r.height)*.1)return;
|
||
let a=Math.atan2(dy,dx)+Math.PI/2;a=(a%TAU+TAU)%TAU;hit(Math.round(a/(TAU/12))%12);});
|
||
/* the visible octave, red to violet left to right (as the ladder), with chlorophyll a's absorption and the note's pin */
|
||
stage(scv,(F)=>{const {x,w,h}=F,sy=h-18,sh=12;
|
||
for(let px=0;px<w;px++){const Fq=4e14*Math.pow(2,px/w),nm=C/Fq*1e9;x.fillStyle=rgbs(wl2rgb(nm));x.fillRect(px,sy,1,sh);}
|
||
x.strokeStyle=heat(150);x.lineWidth=1.2;x.beginPath();for(let px=0;px<w;px++){const nm=C/(4e14*Math.pow(2,px/w))*1e9,y=sy-4-chlA(nm)*(sy-14);px?x.lineTo(px,y):x.moveTo(px,y);}x.stroke();x.lineWidth=1;
|
||
x.fillStyle=heat(170);x.font=font(9.5);x.textAlign='left';x.fillText(T('chl'),4,10);
|
||
[430,662].forEach(nm=>{const px=Math.log2(C/(nm*1e-9)/4e14)*w;bone_(x,.5);x.setLineDash([2,2]);line(x,px,sy-4,px,12);x.setLineDash([]);x.fillStyle=bone(.7);x.textAlign=px>w-50?'right':'left';x.fillText(nm+' nm',px+(px>w-50?-4:4),24);});
|
||
const L=toLight(fOf(cur)),px=Math.log2(L.F/4e14)*w;x.fillStyle=BONE;x.fillRect(px-1,sy-6,2,sh+10);x.beginPath();x.moveTo(px-5,sy+sh+6);x.lineTo(px+5,sy+sh+6);x.lineTo(px,sy+sh);x.fill();});
|
||
async function tone(f){const ctx=await audio();const t=ctx.currentTime+.01,o=ctx.createOscillator(),o2=ctx.createOscillator(),g=ctx.createGain();
|
||
o.type='triangle';o.frequency.value=f;o2.frequency.value=f*2;const g2=ctx.createGain();g2.gain.value=.25;
|
||
g.gain.setValueAtTime(0,t);g.gain.linearRampToValueAtTime(.32,t+.012);g.gain.exponentialRampToValueAtTime(.001,t+1.3);
|
||
o.connect(g);o2.connect(g2);g2.connect(g);g.connect(AU.out);o.start(t);o2.start(t);o.stop(t+1.35);o2.stop(t+1.35);}
|
||
function hit(s){cur=s;show();tone(fOf(s)).catch(e=>console.warn(e));}
|
||
document.getElementById('c-down').onclick=()=>{oct=Math.max(1,oct-1);label();show();};
|
||
document.getElementById('c-up').onclick=()=>{oct=Math.min(7,oct+1);label();show();};
|
||
const ex={async start(ctx){let i=0;
|
||
const step=()=>{if(i>12){ex.stop();AU.active=null;ex.look(false);return;}cur=i++;show();tone(fOf(cur)).catch(()=>{});run=setTimeout(step,300);};step();},
|
||
stop(){clearTimeout(run);run=null;}};
|
||
player(document.getElementById('c-play'),ex);
|
||
document.getElementById('c-ladder').onclick=()=>{const L=toLight(fOf(cur));LAD.show(L.F,noteOf(fOf(cur),true)+' → '+nf(L.nm,3)+' nm',rgbs(wl2rgb(L.nm)));};
|
||
I18N.onLang(()=>{label();show();});
|
||
build();show();
|
||
})();
|
||
|
||
/* ======================= Plate V · a sunflower and its day: day → LFO → a tone ======================= */
|
||
(function(){
|
||
const cv=document.getElementById('d-cv'),oc=document.getElementById('d-oct'),oo=document.getElementById('d-oct-o'),st=document.getElementById('d-state'),rd=document.getElementById('d-read');
|
||
let F=fit(cv);addEventListener('resize',()=>{F=fit(cv);});
|
||
const DAY=1/86400;let g=null,tilt=-.8;
|
||
const now=new Date();let p=(now.getHours()*3600+now.getMinutes()*60+now.getSeconds())/86400; /* at octave 0: the clock's own day */
|
||
const fr=()=>DAY*Math.pow(2,+oc.value);
|
||
const mix=f=>clamp((Math.log2(f)-Math.log2(14))/(Math.log2(40)-Math.log2(14)),0,1); /* from LFO on the drone to the tone itself */
|
||
function texts(){const f=fr();oo.textContent='+'+nfx(+oc.value,2);
|
||
st.textContent=T(f<.05?'d_slow':f<20?'d_lfo':'d_pitch');st.style.setProperty('--dot',heat(f<.05?60:f<20?190:245));
|
||
const rows=[[T('d_f'),hzText(f)],[T('d_cyc'),period(f)]];if(f>=8)rows.push([T('i_note'),noteOf(f,true)]);
|
||
rd.innerHTML='';rows.forEach(([a,b])=>{const dt=document.createElement('dt');dt.textContent=a;const dd=document.createElement('dd');dd.textContent=b;rd.appendChild(dt);rd.appendChild(dd);});
|
||
if(g&&AU.ctx){const t=AU.ctx.currentTime,m=mix(f);g.sun.frequency.setTargetAtTime(f,t,.03);g.tone.gain.setTargetAtTime(m*.32,t,.05);g.dr.gain.setTargetAtTime((1-m)*.5,t,.05);}}
|
||
oc.addEventListener('input',texts);
|
||
const ex={async start(ctx){const t=ctx.currentTime,f=fr();
|
||
/* the sun: a sine whose phase starts where the drawing is (elevation = −cos 2πp) */
|
||
const ph=TAU*p-Math.PI/2,re=new Float32Array([0,Math.sin(ph)]),im=new Float32Array([0,Math.cos(ph)]);
|
||
const sun=ctx.createOscillator();sun.setPeriodicWave(ctx.createPeriodicWave(re,im,{disableNormalization:true}));sun.frequency.value=f;
|
||
const s1=ctx.createOscillator(),s2=ctx.createOscillator();s1.type=s2.type='sawtooth';s1.frequency.value=110;s2.frequency.value=110.37;
|
||
const lp=ctx.createBiquadFilter();lp.type='lowpass';lp.frequency.value=900;lp.Q.value=3;const vca=ctx.createGain();vca.gain.value=.5;
|
||
const sA=ctx.createGain();sA.gain.value=.5;const sF=ctx.createGain();sF.gain.value=650;const dr=ctx.createGain();dr.gain.value=0;const tone=ctx.createGain();tone.gain.value=0;
|
||
const out=ctx.createGain();out.gain.value=0;out.gain.linearRampToValueAtTime(.7,t+.2);
|
||
s1.connect(lp);s2.connect(lp);lp.connect(vca);vca.connect(dr);dr.connect(out);sun.connect(sA);sA.connect(vca.gain);sun.connect(sF);sF.connect(lp.frequency);
|
||
sun.connect(tone);tone.connect(out);out.connect(AU.out);[sun,s1,s2].forEach(o=>o.start());g={sun,dr,tone,out,all:[sun,s1,s2,lp,vca,sA,sF,dr,tone,out]};texts();},
|
||
stop(){if(g)fadeOut(g.all,g.out);g=null;}};
|
||
player(document.getElementById('d-play'),ex);
|
||
document.getElementById('d-ladder').onclick=()=>{const f=fr();LAD.show(f,'☉ +'+nfx(+oc.value,2)+' oct · '+si(f,'Hz'),heat(200));};
|
||
I18N.onLang(texts);
|
||
DRAW.push({c:cv,f:(t,dt)=>{const {x,w,h}=F,f=fr();x.clearRect(0,0,w,h);p+=dt*f;
|
||
const hy=h*.7,el=-Math.cos(TAU*p),fast=f>8,day=clamp(el*2,0,1);
|
||
/* the sky: a faint warmth near the horizon by day, nothing at night */
|
||
if(!fast&&el>-.25){const gr=x.createLinearGradient(0,0,0,hy);gr.addColorStop(0,'rgba(0,0,0,0)');gr.addColorStop(1,heat(150+90*day,.05+.12*clamp(el+.25,0,1)));x.fillStyle=gr;x.fillRect(0,0,w,hy);}
|
||
/* the sun's path; very fast it is one hot streak */
|
||
const sx=w/2-(w*.42)*Math.cos(TAU*(p-.25)),sy=hy-(hy-28)*Math.sin(TAU*(p-.25));
|
||
x.save();x.setLineDash([2,4]);bone_(x,.18);x.beginPath();x.ellipse(w/2,hy,w*.42,hy-28,0,Math.PI,TAU);x.stroke();x.restore();
|
||
if(fast){x.lineWidth=3;x.strokeStyle=heat(230,.55);x.beginPath();x.ellipse(w/2,hy,w*.42,hy-28,0,Math.PI,TAU);x.stroke();x.lineWidth=1;}
|
||
else if(el>-.05){[14,10,6,3].forEach((r,i)=>{x.strokeStyle=heat(150+i*32);circ(x,sx,sy,r);});for(let i=0;i<12;i++){const a=i/12*TAU+t*.1;x.strokeStyle=heat(200,.6);line(x,sx+Math.cos(a)*18,sy+Math.sin(a)*18,sx+Math.cos(a)*24,sy+Math.sin(a)*24);}}
|
||
/* stars at night */
|
||
if(!fast&&el<.1){let s2=5;const Rn=()=>{s2=(s2*16807)%2147483647;return s2/2147483647;};for(let i=0;i<40;i++){x.fillStyle=bone((.15+Rn()*.45)*clamp(.1-el,0,1));x.fillRect(Rn()*w,Rn()*hy*.9,1,1);}}
|
||
/* ground */
|
||
bone_(x,.4);line(x,0,hy+.5,w,hy+.5);
|
||
/* the sunflower: by day the head follows the sun, at night it turns back east; sped up, it trembles */
|
||
const sunT=clamp((sx-w/2)/(w*.42),-1,1)*.85;const target=el>0?sunT:-.85;const k=fast?1:clamp(f*4000,1.5,40);
|
||
tilt+=(target-tilt)*clamp(dt*k,0,1);const tl=fast?sunT*.1+Math.sin(t*50)*.03:tilt;
|
||
const bx=w/2,by=hy,hx=bx+Math.sin(tl)*h*.18,hyy=hy-h*.5;
|
||
x.strokeStyle=heat(60);x.lineWidth=1.4;x.beginPath();x.moveTo(bx,by);x.quadraticCurveTo(bx,by-h*.25,hx,hyy);x.stroke();x.lineWidth=1;
|
||
const lift=fast?.5:.25+.6*day;
|
||
iso(x,LEAF,bx,by-h*.16,h*.17,t,{rot:-.25-lift*.6,lv:3,gx:.5,gy:0});iso(x,LEAF,bx,by-h*.24,h*.15,t,{rot:Math.PI+.25+lift*.6,lv:3,gx:.5,gy:0,ph:1});
|
||
const openP=fast?.8:.55+.45*day,hr=Math.min(w,h)*.1;
|
||
x.save();x.translate(hx,hyy);x.rotate(tl*.8);x.scale(1-Math.abs(tl)*.25,1);
|
||
for(let i=0;i<16;i++){const a=i/16*TAU;x.save();x.rotate(a);smooth(x,LEAF.map(p=>[hr*.8+p[0]*hr*1.2*openP,p[1]*hr*.9]));x.strokeStyle=heat(215+20*(i%2));x.stroke();x.restore();}
|
||
[1,.72,.46,.22].forEach((s,i)=>{x.strokeStyle=heat(150+i*30);circ(x,0,0,hr*.95*s);});x.restore();
|
||
/* the trace: the sun's height over two cycles, now in the middle */
|
||
const ty=hy+(h-hy)*.55,ta=(h-hy)*.28;bone_(x,.55);x.beginPath();for(let px=0;px<=w;px+=2){const q=(fast?0:p)+(px/w-.5)*2,y=ty-(-Math.cos(TAU*q))*ta;px?x.lineTo(px,y):x.moveTo(px,y);}x.stroke();
|
||
x.fillStyle=heat(240);x.beginPath();x.arc(w/2,ty-(fast?-Math.cos(0):el)*ta,2.5,0,TAU);x.fill();
|
||
x.fillStyle=DIM;x.font=font(9.5);x.textAlign='left';x.fillText('−'+period(f),8,h-5);x.textAlign='right';x.fillText('+'+period(f),w-8,h-5);x.textAlign='center';x.fillText(T('d_now'),w/2,h-5);
|
||
x.fillStyle=bone(.7);x.font=serif(14);x.textAlign='left';x.fillText('Helianthus annuus',12,20);
|
||
marks(x,w,h);
|
||
}});
|
||
watch(cv);texts();
|
||
})();
|
||
|
||
requestAnimationFrame(tick);
|
||
I18N.start();
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|