Ambient: Zugfahrt – zweiter Klack jedes Paares 2 Halbtöne höher; sw v82
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 6m50s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mrwnslz 2026-10-04 00:28:44 +02:00
parent 356a5299da
commit 986ccad5c9
2 changed files with 6 additions and 6 deletions

View file

@ -928,18 +928,18 @@ function buildWomb(K) {
// Zugfahrt: Rollgeräusch + Schienenstöße. Jeder Stoß wird von zwei Achsen kurz nacheinander angeschlagen
// (Achsabstand 3,1 m, Schienenlänge 33 m) -> "klack-klack ......... klack-klack", Pause ≈ 11× Paarabstand, Takt folgt der Geschwindigkeit.
function railClack(K, t, amp) {
function railClack(K, t, amp, pitch = 1) {
const ctx = S.ctx, nb = noiseBuf("white");
const s1 = ctx.createBufferSource(), bp = bq("bandpass", R(300, 650) * (.7 + .8 * K.b), .8), g1 = ctx.createGain(); // dumpfer Anschlag
const s1 = ctx.createBufferSource(), bp = bq("bandpass", R(300, 650) * (.7 + .8 * K.b) * pitch, .8), g1 = ctx.createGain(); // dumpfer Anschlag
s1.buffer = nb; s1.connect(bp).connect(g1).connect(K.out);
g1.gain.setValueAtTime(0, t); g1.gain.linearRampToValueAtTime(amp * .55, t + .004); g1.gain.exponentialRampToValueAtTime(.001, t + .08);
s1.start(t, R(0, 8), .1);
const o = ctx.createOscillator(), og = ctx.createGain(); // Schlag im Wagenboden
o.frequency.setValueAtTime(95, t); o.frequency.exponentialRampToValueAtTime(48, t + .12);
o.frequency.setValueAtTime(95 * pitch, t); o.frequency.exponentialRampToValueAtTime(48 * pitch, t + .12);
og.gain.setValueAtTime(0, t); og.gain.linearRampToValueAtTime(amp * .8, t + .005); og.gain.exponentialRampToValueAtTime(.001, t + .24);
o.connect(og).connect(K.out); o.start(t); o.stop(t + .3);
// Karosserie klingt nach: zwei Resonanzmoden, lang abklingend
const f1 = R(170, 220);
const f1 = R(170, 220) * pitch;
[[f1, 1.5, .65], [f1 * 1.9, .7, .45]].forEach(([f, a, dec]) => {
const s2 = ctx.createBufferSource(), rb = bq("bandpass", f, 10), g2 = ctx.createGain();
s2.buffer = nb; s2.connect(rb).connect(g2).connect(K.out);
@ -964,7 +964,7 @@ function buildTrain(K) {
const now = T();
while (K.nextJoint < now + 2.5) { // alle Achsen der Schienenstöße der nächsten Sekunden vorplanen (ein stockender Hauptthread reißt so keine Lücke)
const v = K.v, t0 = K.nextJoint, amp = .8 * (.85 + Math.random() * .3);
[0, 3.1 / v].forEach((o, i) => railClack(K, t0 + o, amp * (i ? .9 : 1))); // zwei Achsen des Drehgestells, dann Pause bis zum nächsten Stoß
[0, 3.1 / v].forEach((o, i) => railClack(K, t0 + o, amp * (i ? .9 : 1), i ? 1.12 : 1)); // zwei Achsen des Drehgestells, dann Pause bis zum nächsten Stoß
K.nextJoint += 33 / v;
}
if (now > K.nextPoints) { // Weiche: kurzes schnelles Klapperbündel

View file

@ -2,7 +2,7 @@
* diora service worker — caches the app shell for offline use.
*/
const CACHE = 'diora-v81';
const CACHE = 'diora-v82';
const SHELL = [
'/static/css/app.css',
'/static/js/app.js',