The Cove's shore life: crabs up the beach from dusk till dawn (keep to the sand, pinch if you get close, crab meat to cook), gulls after food on the sand and fish on a smoking rack; online too

This commit is contained in:
Paul Bailey
2026-11-07 10:23:49 +00:00
parent 5bcfa23710
commit 9709d2c424
30 changed files with 878 additions and 11 deletions

View File

@@ -616,6 +616,29 @@ def make_voices():
_encode(os.path.join(d, "fox_yip_%d.ogg" % i),
[voice(200 + i, 0.18, lambda q, k=i: 800 + 80 * k + 500 * sin(math.pi * q), _swell(0.05, 0.5),
[(1100, 3, 1.0), (2600, 4, 0.4)], breath=0.2, rasp=0.2, jitter=0.02)], SR_FX, 5)
# 0.6.0, the Cove: a gull's "kee-ow" (and a laughing "ha-ha-ha"), and a
# crab's claws clicking.
_encode(os.path.join(d, "gull_cry_0.ogg"),
[voice(210, 0.55, lambda q: 1350 - 500 * q ** 1.4 + 120 * sin(math.pi * min(1, q * 3)), _swell(0.06, 0.55),
[(1700, 4, 1.0), (3300, 5, 0.5)], breath=0.25, rasp=0.25, rasp_hz=70, jitter=0.03)], SR_FX, 5)
hs = [0.0, 0.14, 0.28, 0.42]
def genv(q, ps=hs):
t = q * 0.6
return max(max(0.0, min(1, (t - p) / 0.015)) * max(0.0, 1 - (t - p) / 0.11) if t >= p else 0.0 for p in ps)
_encode(os.path.join(d, "gull_cry_1.ogg"),
[voice(211, 0.6, lambda q: 1150 - 150 * q, genv, [(1600, 4, 1.0), (3100, 5, 0.5)],
breath=0.3, rasp=0.3, rasp_hz=70, jitter=0.03)], SR_FX, 5)
for i in range(2):
rng = random.Random(220 + i)
cb = fx_buf(0.3)
for t in [0.0, 0.07, 0.11, 0.2][: 2 + i * 2]:
i0 = int(t * SR_FX)
f = rng.uniform(2600, 3600)
for j in range(int(0.012 * SR_FX)):
if i0 + j < len(cb):
cb[i0 + j] += sin(TAU * f * j / SR_FX) * exp(-j / 60) * 0.9
add_noise(cb, SR_FX, t, 0.004, 0.7, lp=0.95, hp=0.4, env=lambda q: 1 - q, rng=rng)
_encode(os.path.join(d, "crab_click_%d.ogg" % i), [cb], SR_FX, 5)
def make_sfx():