v0.23.0: Routine, first public version
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
"""The calm streak animations' sounds (calm.py): 2 s, soft attacks, no bangs; gen_sounds.py writes
|
||||
them quiet (like the calm set's) and eases off their ends. Seeds 2900-2999."""
|
||||
import random
|
||||
|
||||
from sound_kit import add_noise, add_tone, pad, sbuf, soft_bell
|
||||
|
||||
|
||||
def settle():
|
||||
"""A slow sprinkle of tiny high bells, drifting down."""
|
||||
b = sbuf()
|
||||
rng = random.Random(2900)
|
||||
for k in range(9):
|
||||
soft_bell(b, 0.1 + k * 0.17 + rng.uniform(0, 0.05), 1760 - k * 90, 0.06, 0.5)
|
||||
pad(b, 0.0, 2.0, 440, 0.06, a=0.8, d=0.9)
|
||||
return b
|
||||
|
||||
|
||||
def chalk():
|
||||
"""Soft chalky taps and scratches, then a quiet warm note."""
|
||||
b = sbuf()
|
||||
for k in range(7):
|
||||
add_noise(b, 0.45 + k * 0.13, 0.08, 0.18, a=0.005, d=0.03, lp0=0.55, lp1=0.4, seed=2910 + k)
|
||||
add_noise(b, 1.45, 0.25, 0.08, a=0.05, d=0.1, lp0=0.2, seed=2918)
|
||||
soft_bell(b, 1.5, 392, 0.12, 0.6)
|
||||
return b
|
||||
|
||||
|
||||
def noon():
|
||||
"""A warm chord swelling slowly, with one soft bell at its height."""
|
||||
b = sbuf()
|
||||
for k, f in enumerate((196, 247, 294)):
|
||||
pad(b, k * 0.2, 2.0 - k * 0.2, f, 0.1, a=0.7, d=1.0)
|
||||
soft_bell(b, 1.0, 784, 0.1, 0.7)
|
||||
return b
|
||||
|
||||
|
||||
def beads():
|
||||
"""Wooden beads clicking softly along their rods, one by one, then a gentle chime."""
|
||||
b = sbuf()
|
||||
for k in range(12):
|
||||
st = 0.05 + k * 0.105
|
||||
add_tone(b, st, 0.06, 520 + (k % 4) * 40, 470, 0.12, a=0.002, d=0.02, shape="tri")
|
||||
add_noise(b, st, 0.02, 0.05, a=0.001, d=0.008, lp0=0.3, seed=2920 + k)
|
||||
soft_bell(b, 1.35, 659, 0.1, 0.6)
|
||||
return b
|
||||
|
||||
|
||||
SOUNDS = [settle, chalk, noon, beads]
|
||||
Reference in New Issue
Block a user