diff options
| author | yum <yum.food.vr@gmail.com> | 2022-10-24 22:08:06 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-10-24 22:08:06 -0700 |
| commit | 08655f96dc798e3e129058a5e97c5aa7ff96e798 (patch) | |
| tree | b2543852ec52fec22319f562a737e48e95681b37 /osc_ctrl.py | |
| parent | 4b0d262f4630538cc04f6e8bda407fe3f3ba213b (diff) | |
STT now beeps when it shows text, and can be locked to world
Empty cells are excluded from the beeping behavior. Note: I have not
checked in the prefab with the audio source yet.
* libtastt gen_fx now adds 3 toggles to FX layer: toggle board, toggle world
lock, toggle beep sound
* libunity guid_map can now append instead of replacing
* TaSTT_Toggle_{On,Off}.anim now use the prefab path, as do generated
animations
Diffstat (limited to 'osc_ctrl.py')
| -rw-r--r-- | osc_ctrl.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/osc_ctrl.py b/osc_ctrl.py index 14f4ba5..4ef238e 100644 --- a/osc_ctrl.py +++ b/osc_ctrl.py @@ -99,6 +99,12 @@ def sendMessageCellDiscrete(client, msg_cell, which_cell): # Disable each layer. disable(client) + empty_cell = [state.encoding[' ']] * NUM_LAYERS + if msg_cell != state.encoding[' '] * BOARD_COLS: + addr="/avatar/parameters/" + generate_utils.getSpeechNoiseToggleParam() + client.send_message(addr, False) + print("beep") + time.sleep(CELL_TX_TIME_S / 3.0) # Really long messages just wrap back around. @@ -112,6 +118,14 @@ def sendMessageCellDiscrete(client, msg_cell, which_cell): # Seek each layer to the current cell. for i in range(0, len(msg_cell)): updateCell(client, i, msg_cell[i], s0, s1, s2, s3) + if msg_cell != empty_cell: + addr="/avatar/parameters/" + generate_utils.getSpeechNoiseToggleParam() + client.send_message(addr, False) + + # If we're drawing something, turn the beep on. + if msg_cell != empty_cell: + addr="/avatar/parameters/" + generate_utils.getSpeechNoiseToggleParam() + client.send_message(addr, True) # Wait for convergence. time.sleep(CELL_TX_TIME_S / 3.0) |
