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
|
|
@ -24,12 +24,16 @@ const VOICES: int = 12
|
|||
|
||||
const SHOT: String = "shot"
|
||||
const SHIP_DEATH: String = "ship_death"
|
||||
const ENEMY_DEATH: String = "enemy_death"
|
||||
const BUILDING_DEATH: String = "building_death"
|
||||
const DIALOG: String = "dialog"
|
||||
|
||||
const SOUNDS: Dictionary = {
|
||||
SHOT: "res://audio/sfx_shot.wav",
|
||||
SHIP_DEATH: "res://audio/sfx_ship_death.wav",
|
||||
ENEMY_DEATH: "res://audio/sfx_ship_death.wav",
|
||||
BUILDING_DEATH: "res://audio/sfx_building_death.wav",
|
||||
DIALOG: "res://audio/sfx_dialog.wav",
|
||||
}
|
||||
|
||||
# Per-sound level. A shot is fired constantly and a death happens once, so
|
||||
|
|
@ -37,7 +41,9 @@ const SOUNDS: Dictionary = {
|
|||
const LEVELS: Dictionary = {
|
||||
SHOT: -26.0,
|
||||
SHIP_DEATH: -23.0,
|
||||
ENEMY_DEATH: -23.0,
|
||||
BUILDING_DEATH: -23.0,
|
||||
DIALOG: -19.0,
|
||||
}
|
||||
|
||||
# Shots vary a little in pitch so a stream of them does not turn into one
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
BIN
audio/sfx_dialog.wav
Normal file
BIN
audio/sfx_dialog.wav
Normal file
Binary file not shown.
24
audio/sfx_dialog.wav.import
Normal file
24
audio/sfx_dialog.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dxg516krws85k"
|
||||
path="res://.godot/imported/sfx_dialog.wav-d50ed12ab44ac60044a5fcd0eb2c25c1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx_dialog.wav"
|
||||
dest_files=["res://.godot/imported/sfx_dialog.wav-d50ed12ab44ac60044a5fcd0eb2c25c1.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Loading…
Reference in a new issue