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 /Scripts/osc_ctrl.py | |
| 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 'Scripts/osc_ctrl.py')
| -rw-r--r-- | Scripts/osc_ctrl.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Scripts/osc_ctrl.py b/Scripts/osc_ctrl.py index ad5667f..413e2ae 100644 --- a/Scripts/osc_ctrl.py +++ b/Scripts/osc_ctrl.py @@ -103,18 +103,12 @@ def pageMessage(osc_state: OscState, msg: str, estate: EmotesState) -> bool: sounds_to_make = set() letter_i = 1 for letter in ["a", "e", "i", "o", "u"]: - if letter in msg_slice: + if letter in msg_slice.lower(): sounds_to_make.add(letter_i) letter_i += 1 - if len(sounds_to_make) == 0: + if len(sounds_to_make) > 0: for i in range(5): - playAudio(osc_state, i+1, False) - else: - sound_to_make = random.sample(sounds_to_make, 1)[0] - for i in range(5): - if i+1 == sound_to_make: - # TODO(yum) think about making this probabilistic - print(f"Playing sound {i+1}") + if i+1 in sounds_to_make: playAudio(osc_state, i+1, True) else: playAudio(osc_state, i+1, False) |
