Restore landing fade and missing event sounds
This commit is contained in:
parent
546107efb9
commit
eb1615ab6b
10 changed files with 91 additions and 15 deletions
|
|
@ -125,6 +125,28 @@ def shot(seconds=0.22):
|
|||
return [_saturate(v, 2.0) * _attack(i, 0.0015) for i, v in enumerate(mixed)]
|
||||
|
||||
|
||||
def dialog(seconds=0.24):
|
||||
"""A short radio handshake when a transmission line appears.
|
||||
|
||||
Two rising digital tones establish the signal; a small static tail keeps
|
||||
it in the same physical world as the scan-line presentation without
|
||||
turning every revealed character into a click."""
|
||||
n = int(RATE * seconds)
|
||||
tone = [0.0] * n
|
||||
for start, end, level, delay in ((520.0, 820.0, 0.55, 0.0),
|
||||
(940.0, 1380.0, 0.32, 0.045)):
|
||||
begin = int(RATE * delay)
|
||||
part = _sweep(n - begin, start, end, 0.8)
|
||||
for i, value in enumerate(part):
|
||||
at = begin + i
|
||||
tone[at] += value * level * _decay(i, len(part), 2.8)
|
||||
static = [value * _decay(i, n, 2.1) * 0.16
|
||||
for i, value in enumerate(_noise(n, 17, lambda t: 0.55 - 0.42 * t))]
|
||||
mixed = _mix(tone, static)
|
||||
return [_saturate(value, 1.8) * _attack(i, 0.002)
|
||||
for i, value in enumerate(mixed)]
|
||||
|
||||
|
||||
def explosion(seconds, sub_from, sub_to, roar_seed, debris_level, drive):
|
||||
"""A blast in three layers on three clocks: the crack is over in a
|
||||
fifth of a second, the roar runs most of the length, and the debris
|
||||
|
|
@ -163,6 +185,7 @@ def explosion(seconds, sub_from, sub_to, roar_seed, debris_level, drive):
|
|||
|
||||
if __name__ == "__main__":
|
||||
_write("sfx_shot", shot())
|
||||
_write("sfx_dialog", dialog())
|
||||
# A vessel coming apart: bright, fast, with real low end under it.
|
||||
_write("sfx_ship_death", explosion(1.45, 260.0, 38.0, 5, 0.16, 2.6))
|
||||
# A structure: longer, deeper, and it keeps coming down afterwards.
|
||||
|
|
|
|||
Loading…
Reference in a new issue