diff options
| author | yum <yum.food.vr@gmail.com> | 2023-08-30 17:13:19 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-08-30 17:13:19 -0700 |
| commit | 358f3ed8c44bbe45d8f4546afeeb0afaae85ea8b (patch) | |
| tree | bb49a94c72668aff16b104de089a3c90436e67ac /Sounds | |
| parent | 444914a701628ca2d1937f8d5cc9a714b478917c (diff) | |
Continue work on in-game audio, revert steamvr.py
We now play arpeggiated *chords* of vowels instead of one, allowing for
a denser audio feedback mechanism.
Diffstat (limited to 'Sounds')
| -rw-r--r-- | Sounds/aiueo/a.wav | bin | 79406 -> 38654 bytes | |||
| -rw-r--r-- | Sounds/aiueo/e.wav | bin | 79406 -> 38654 bytes | |||
| -rw-r--r-- | Sounds/aiueo/i.wav | bin | 79406 -> 38654 bytes | |||
| -rw-r--r-- | Sounds/aiueo/o.wav | bin | 79406 -> 38654 bytes | |||
| -rw-r--r-- | Sounds/aiueo/play.py | 9 | ||||
| -rw-r--r-- | Sounds/aiueo/u.wav | bin | 79406 -> 38654 bytes |
6 files changed, 6 insertions, 3 deletions
diff --git a/Sounds/aiueo/a.wav b/Sounds/aiueo/a.wav Binary files differindex 97fd2ab..06aabc6 100644 --- a/Sounds/aiueo/a.wav +++ b/Sounds/aiueo/a.wav diff --git a/Sounds/aiueo/e.wav b/Sounds/aiueo/e.wav Binary files differindex 50f9acf..5bcebf5 100644 --- a/Sounds/aiueo/e.wav +++ b/Sounds/aiueo/e.wav diff --git a/Sounds/aiueo/i.wav b/Sounds/aiueo/i.wav Binary files differindex 2c557cf..f1d86c9 100644 --- a/Sounds/aiueo/i.wav +++ b/Sounds/aiueo/i.wav diff --git a/Sounds/aiueo/o.wav b/Sounds/aiueo/o.wav Binary files differindex 0fca069..cbafbdb 100644 --- a/Sounds/aiueo/o.wav +++ b/Sounds/aiueo/o.wav diff --git a/Sounds/aiueo/play.py b/Sounds/aiueo/play.py index 5d94031..674cf2e 100644 --- a/Sounds/aiueo/play.py +++ b/Sounds/aiueo/play.py @@ -5,7 +5,8 @@ import time def get_wav_files_in_cwd(): """Returns a list of .wav files in the current working directory.""" - return [f for f in os.listdir() if f.endswith('.wav')] + cwd = os.path.dirname(os.path.abspath(__file__)) + return [os.path.join(cwd, f) for f in os.listdir(cwd) if f.endswith('.wav')] # Pro tip: wrap this in a predicate def play_random_wav(wav_files): @@ -15,11 +16,13 @@ def play_random_wav(wav_files): def probably_play_random_wav(wav_files): """Plays a random .wav file from the list. Probably.""" - if random.randint(1,3) != 1: + if random.randint(1,3) == 1: play_random_wav(wav_files) def main(): wav_files = get_wav_files_in_cwd() + for file in wav_files: + print(f"file get: {file}") if not wav_files: print("No .wav files found in the current directory.") return @@ -27,7 +30,7 @@ def main(): try: while True: probably_play_random_wav(wav_files) - time.sleep(0.2) + time.sleep(0.04) except KeyboardInterrupt: print("Program terminated by user.") winsound.PlaySound(None, winsound.SND_PURGE) # Stop any ongoing asynchronous sounds diff --git a/Sounds/aiueo/u.wav b/Sounds/aiueo/u.wav Binary files differindex afea76e..9bb6dda 100644 --- a/Sounds/aiueo/u.wav +++ b/Sounds/aiueo/u.wav |
