diff --git a/resources/sounds/chirp_start.wav b/resources/sounds/chirp_start.wav index 9f15de4..d161a2f 100644 Binary files a/resources/sounds/chirp_start.wav and b/resources/sounds/chirp_start.wav differ diff --git a/resources/sounds/chirp_stop.wav b/resources/sounds/chirp_stop.wav index ccf0b70..495f835 100644 Binary files a/resources/sounds/chirp_stop.wav and b/resources/sounds/chirp_stop.wav differ diff --git a/resources/sounds/drop_start.wav b/resources/sounds/drop_start.wav index f4397ad..2faed0d 100644 Binary files a/resources/sounds/drop_start.wav and b/resources/sounds/drop_start.wav differ diff --git a/resources/sounds/drop_stop.wav b/resources/sounds/drop_stop.wav index 42eeda0..0c3db1a 100644 Binary files a/resources/sounds/drop_stop.wav and b/resources/sounds/drop_stop.wav differ diff --git a/resources/sounds/ember_start.wav b/resources/sounds/ember_start.wav index 8a01b4a..84c5d54 100644 Binary files a/resources/sounds/ember_start.wav and b/resources/sounds/ember_start.wav differ diff --git a/resources/sounds/ember_stop.wav b/resources/sounds/ember_stop.wav index a67f42c..bca48cb 100644 Binary files a/resources/sounds/ember_stop.wav and b/resources/sounds/ember_stop.wav differ diff --git a/resources/sounds/flick_start.wav b/resources/sounds/flick_start.wav index 40f4efe..a656abf 100644 Binary files a/resources/sounds/flick_start.wav and b/resources/sounds/flick_start.wav differ diff --git a/resources/sounds/flick_stop.wav b/resources/sounds/flick_stop.wav index 49b9193..9f4f3d9 100644 Binary files a/resources/sounds/flick_stop.wav and b/resources/sounds/flick_stop.wav differ diff --git a/resources/sounds/glass_start.wav b/resources/sounds/glass_start.wav index 3f7fa81..5c7a760 100644 Binary files a/resources/sounds/glass_start.wav and b/resources/sounds/glass_start.wav differ diff --git a/resources/sounds/glass_stop.wav b/resources/sounds/glass_stop.wav index 1fc7222..7d698e5 100644 Binary files a/resources/sounds/glass_stop.wav and b/resources/sounds/glass_stop.wav differ diff --git a/resources/sounds/lift_start.wav b/resources/sounds/lift_start.wav index 72865f2..17bad6a 100644 Binary files a/resources/sounds/lift_start.wav and b/resources/sounds/lift_start.wav differ diff --git a/resources/sounds/lift_stop.wav b/resources/sounds/lift_stop.wav index ac16a46..d67e3ac 100644 Binary files a/resources/sounds/lift_stop.wav and b/resources/sounds/lift_stop.wav differ diff --git a/resources/sounds/scale_start.wav b/resources/sounds/scale_start.wav index bf3619e..bd61ba9 100644 Binary files a/resources/sounds/scale_start.wav and b/resources/sounds/scale_start.wav differ diff --git a/resources/sounds/scale_stop.wav b/resources/sounds/scale_stop.wav index 3e43a18..1cfec33 100644 Binary files a/resources/sounds/scale_stop.wav and b/resources/sounds/scale_stop.wav differ diff --git a/resources/sounds/soft_start.wav b/resources/sounds/soft_start.wav index 4390096..83c6290 100644 Binary files a/resources/sounds/soft_start.wav and b/resources/sounds/soft_start.wav differ diff --git a/resources/sounds/soft_stop.wav b/resources/sounds/soft_stop.wav index 2ac6fa2..38f6fc7 100644 Binary files a/resources/sounds/soft_stop.wav and b/resources/sounds/soft_stop.wav differ diff --git a/resources/sounds/step_start.wav b/resources/sounds/step_start.wav index 2cbce59..855788d 100644 Binary files a/resources/sounds/step_start.wav and b/resources/sounds/step_start.wav differ diff --git a/resources/sounds/step_stop.wav b/resources/sounds/step_stop.wav index aba0abc..f1d9ede 100644 Binary files a/resources/sounds/step_stop.wav and b/resources/sounds/step_stop.wav differ diff --git a/resources/sounds/voca_start.wav b/resources/sounds/voca_start.wav index 1b6d540..f260dbd 100644 Binary files a/resources/sounds/voca_start.wav and b/resources/sounds/voca_start.wav differ diff --git a/resources/sounds/voca_stop.wav b/resources/sounds/voca_stop.wav index b184832..d197b4d 100644 Binary files a/resources/sounds/voca_stop.wav and b/resources/sounds/voca_stop.wav differ diff --git a/scripts/generate_sounds.py b/scripts/generate_sounds.py index deae7b0..12c25ed 100644 --- a/scripts/generate_sounds.py +++ b/scripts/generate_sounds.py @@ -5,7 +5,9 @@ Writes 16-bit PCM mono files at 44.1 kHz into resources/sounds/: - start_recording.wav / stop_recording.wav / error.wav: the original Linux pair. Kept on disk; not used as the implicit default anymore. -- {id}_start.wav / {id}_stop.wav for each family tone except Off. + +Family catalog pairs ({id}_start.wav / {id}_stop.wav) are downloaded preview +bytes. This script never synthesizes or overwrites them. Usage: python scripts/generate_sounds.py @@ -15,7 +17,6 @@ from __future__ import annotations import math import os -import shutil import struct import wave @@ -207,59 +208,30 @@ def main() -> None: lambda: generate_glide_tone(error_path, E4, C4, duration=0.7, amplitude=0.14), ) - # lift: Linux-family F4→A4 sine glide (own files; does not replace the originals) - generate_glide_tone(os.path.join(sounds_dir, "lift_start.wav"), F4, A4, 0.48, 0.16) - generate_glide_tone(os.path.join(sounds_dir, "lift_stop.wav"), A4, F4, 0.48, 0.16) + # Family catalog pairs are downloaded preview bytes. Never synthesize or + # overwrite them. + family_ids = ( + "lift", + "flick", + "ember", + "step", + "voca", + "soft", + "chirp", + "scale", + "drop", + "glass", + ) + family_names = {f"{tone_id}_{kind}.wav" for tone_id in family_ids for kind in ("start", "stop")} + for name in sorted(family_names): + path = os.path.join(sounds_dir, name) + if os.path.exists(path): + print(f"Keeping downloaded catalog: {path}") + else: + print(f"Missing catalog WAV (not synthesizing): {path}") - # flick: same interval, shorter - generate_glide_tone(os.path.join(sounds_dir, "flick_start.wav"), F4, A4, 0.18, 0.15) - generate_glide_tone(os.path.join(sounds_dir, "flick_stop.wav"), A4, F4, 0.18, 0.15) - - # ember: low warm G3→C4 - generate_glide_tone(os.path.join(sounds_dir, "ember_start.wav"), G3, C4, 0.55, 0.15) - generate_glide_tone(os.path.join(sounds_dir, "ember_stop.wav"), C4, G3, 0.55, 0.15) - - # step: two soft C/E ticks - generate_ticks(os.path.join(sounds_dir, "step_start.wav"), (C4, E4), 0.07, 0.05, 0.11) - generate_ticks(os.path.join(sounds_dir, "step_stop.wav"), (E4, C4), 0.07, 0.05, 0.11) - - # voca: open fifth swell (id is voca, not fifth) - generate_fifth_swell(os.path.join(sounds_dir, "voca_start.wav"), C4, G4, 0.44, 0.14, True) - generate_fifth_swell(os.path.join(sounds_dir, "voca_stop.wav"), C4, G4, 0.40, 0.13, False) - - # soft: very short muted ticks - generate_ticks(os.path.join(sounds_dir, "soft_start.wav"), (C5,), 0.05, 0.0, 0.07, decay=22.0) - generate_ticks(os.path.join(sounds_dir, "soft_stop.wav"), (A4,), 0.055, 0.0, 0.07, decay=22.0) - - # chirp: light high chirp - generate_glide_tone(os.path.join(sounds_dir, "chirp_start.wav"), A5, C6, 0.09, 0.10) - generate_glide_tone(os.path.join(sounds_dir, "chirp_stop.wav"), C6, A5, 0.10, 0.10) - - # scale: pentatonic A4→C5 - generate_scale(os.path.join(sounds_dir, "scale_start.wav"), (A4, C5), 0.09, 0.025, 0.12) - generate_scale(os.path.join(sounds_dir, "scale_stop.wav"), (C5, A4), 0.09, 0.025, 0.12) - - # drop: low start, deeper stop - generate_glide_tone(os.path.join(sounds_dir, "drop_start.wav"), D3, F3, 0.40, 0.16) - generate_glide_tone(os.path.join(sounds_dir, "drop_stop.wav"), C3, G2, 0.48, 0.16) - - # glass: thin glass ping - generate_ping(os.path.join(sounds_dir, "glass_start.wav"), E7, 0.30, 0.10) - generate_ping(os.path.join(sounds_dir, "glass_stop.wav"), C7, 0.34, 0.09) - - # Package data lives in src/vocalinux/resources and is what ResourceManager - # prefers when running from a checkout. Keep both trees in sync. - packaged_dir = os.path.join(repo_root, "src", "vocalinux", "resources", "sounds") - os.makedirs(packaged_dir, exist_ok=True) - for name in os.listdir(sounds_dir): - if not name.endswith(".wav"): - continue - if name in {"start_recording.wav", "stop_recording.wav", "error.wav"}: - continue - shutil.copy2(os.path.join(sounds_dir, name), os.path.join(packaged_dir, name)) - print(f"Copied: {os.path.join(packaged_dir, name)}") - - print("\nCatalog pairs written. Original start/stop/error files were left in place.") + print("\nOriginal start/stop/error files were left in place.") + print("Family catalog WAVs were not written.") if __name__ == "__main__": diff --git a/src/vocalinux/resources/sounds/chirp_start.wav b/src/vocalinux/resources/sounds/chirp_start.wav index 9f15de4..d161a2f 100644 Binary files a/src/vocalinux/resources/sounds/chirp_start.wav and b/src/vocalinux/resources/sounds/chirp_start.wav differ diff --git a/src/vocalinux/resources/sounds/chirp_stop.wav b/src/vocalinux/resources/sounds/chirp_stop.wav index ccf0b70..495f835 100644 Binary files a/src/vocalinux/resources/sounds/chirp_stop.wav and b/src/vocalinux/resources/sounds/chirp_stop.wav differ diff --git a/src/vocalinux/resources/sounds/drop_start.wav b/src/vocalinux/resources/sounds/drop_start.wav index f4397ad..2faed0d 100644 Binary files a/src/vocalinux/resources/sounds/drop_start.wav and b/src/vocalinux/resources/sounds/drop_start.wav differ diff --git a/src/vocalinux/resources/sounds/drop_stop.wav b/src/vocalinux/resources/sounds/drop_stop.wav index 42eeda0..0c3db1a 100644 Binary files a/src/vocalinux/resources/sounds/drop_stop.wav and b/src/vocalinux/resources/sounds/drop_stop.wav differ diff --git a/src/vocalinux/resources/sounds/ember_start.wav b/src/vocalinux/resources/sounds/ember_start.wav index 8a01b4a..84c5d54 100644 Binary files a/src/vocalinux/resources/sounds/ember_start.wav and b/src/vocalinux/resources/sounds/ember_start.wav differ diff --git a/src/vocalinux/resources/sounds/ember_stop.wav b/src/vocalinux/resources/sounds/ember_stop.wav index a67f42c..bca48cb 100644 Binary files a/src/vocalinux/resources/sounds/ember_stop.wav and b/src/vocalinux/resources/sounds/ember_stop.wav differ diff --git a/src/vocalinux/resources/sounds/flick_start.wav b/src/vocalinux/resources/sounds/flick_start.wav index 40f4efe..a656abf 100644 Binary files a/src/vocalinux/resources/sounds/flick_start.wav and b/src/vocalinux/resources/sounds/flick_start.wav differ diff --git a/src/vocalinux/resources/sounds/flick_stop.wav b/src/vocalinux/resources/sounds/flick_stop.wav index 49b9193..9f4f3d9 100644 Binary files a/src/vocalinux/resources/sounds/flick_stop.wav and b/src/vocalinux/resources/sounds/flick_stop.wav differ diff --git a/src/vocalinux/resources/sounds/glass_start.wav b/src/vocalinux/resources/sounds/glass_start.wav index 3f7fa81..5c7a760 100644 Binary files a/src/vocalinux/resources/sounds/glass_start.wav and b/src/vocalinux/resources/sounds/glass_start.wav differ diff --git a/src/vocalinux/resources/sounds/glass_stop.wav b/src/vocalinux/resources/sounds/glass_stop.wav index 1fc7222..7d698e5 100644 Binary files a/src/vocalinux/resources/sounds/glass_stop.wav and b/src/vocalinux/resources/sounds/glass_stop.wav differ diff --git a/src/vocalinux/resources/sounds/lift_start.wav b/src/vocalinux/resources/sounds/lift_start.wav index 72865f2..17bad6a 100644 Binary files a/src/vocalinux/resources/sounds/lift_start.wav and b/src/vocalinux/resources/sounds/lift_start.wav differ diff --git a/src/vocalinux/resources/sounds/lift_stop.wav b/src/vocalinux/resources/sounds/lift_stop.wav index ac16a46..d67e3ac 100644 Binary files a/src/vocalinux/resources/sounds/lift_stop.wav and b/src/vocalinux/resources/sounds/lift_stop.wav differ diff --git a/src/vocalinux/resources/sounds/scale_start.wav b/src/vocalinux/resources/sounds/scale_start.wav index bf3619e..bd61ba9 100644 Binary files a/src/vocalinux/resources/sounds/scale_start.wav and b/src/vocalinux/resources/sounds/scale_start.wav differ diff --git a/src/vocalinux/resources/sounds/scale_stop.wav b/src/vocalinux/resources/sounds/scale_stop.wav index 3e43a18..1cfec33 100644 Binary files a/src/vocalinux/resources/sounds/scale_stop.wav and b/src/vocalinux/resources/sounds/scale_stop.wav differ diff --git a/src/vocalinux/resources/sounds/soft_start.wav b/src/vocalinux/resources/sounds/soft_start.wav index 4390096..83c6290 100644 Binary files a/src/vocalinux/resources/sounds/soft_start.wav and b/src/vocalinux/resources/sounds/soft_start.wav differ diff --git a/src/vocalinux/resources/sounds/soft_stop.wav b/src/vocalinux/resources/sounds/soft_stop.wav index 2ac6fa2..38f6fc7 100644 Binary files a/src/vocalinux/resources/sounds/soft_stop.wav and b/src/vocalinux/resources/sounds/soft_stop.wav differ diff --git a/src/vocalinux/resources/sounds/step_start.wav b/src/vocalinux/resources/sounds/step_start.wav index 2cbce59..855788d 100644 Binary files a/src/vocalinux/resources/sounds/step_start.wav and b/src/vocalinux/resources/sounds/step_start.wav differ diff --git a/src/vocalinux/resources/sounds/step_stop.wav b/src/vocalinux/resources/sounds/step_stop.wav index aba0abc..f1d9ede 100644 Binary files a/src/vocalinux/resources/sounds/step_stop.wav and b/src/vocalinux/resources/sounds/step_stop.wav differ diff --git a/src/vocalinux/resources/sounds/voca_start.wav b/src/vocalinux/resources/sounds/voca_start.wav index 1b6d540..f260dbd 100644 Binary files a/src/vocalinux/resources/sounds/voca_start.wav and b/src/vocalinux/resources/sounds/voca_start.wav differ diff --git a/src/vocalinux/resources/sounds/voca_stop.wav b/src/vocalinux/resources/sounds/voca_stop.wav index b184832..d197b4d 100644 Binary files a/src/vocalinux/resources/sounds/voca_stop.wav and b/src/vocalinux/resources/sounds/voca_stop.wav differ