edit example and readme

edit example and readme
This commit is contained in:
onyx-and-iris 2022-03-05 20:16:28 +00:00
parent 975715696b
commit 405fd7efa4
2 changed files with 12 additions and 24 deletions

View File

@ -1,11 +1,13 @@
# Simple Tkinter GUI
Since Tkinter is packaged with Python 3.9 for Windows you should be able to run this example with nothing more than
Python on your system.
No dependencies required, Tkinter should come packaged with Python 3.9+.
This is a demonstartion app with very limited control, showing strips across all three versions.
This app demonstrates strips only across all three Voicemeeter versions with very limited control.
### Notes
### Use
Ensure VBAN is enabled and the TEXT incoming stream is configured and ON.
Since the vbancmd interface implements both the TEXT sub protocol and the RT Packet service it's possible that an incorrect configuration
may result in odd behaviour, such as getters working but setters not. For example, you may see the levels change but be unable to effect
the gain sliders when moving them.
Set the kind_id, ip, streamname and port in the code.
From current examples\gui directory
```python
python .
```

View File

@ -55,8 +55,7 @@ class App(tk.Tk):
""" configure grid """
self.col_row_configure()
""" initiate watchers/updaters """
self.refresh_public_packet()
""" initiate watchers """
[self.watch_levels(i) for i in range(self.col)]
@property
@ -94,19 +93,6 @@ class App(tk.Tk):
[child.grid_configure(padx=1, pady=1)
for child in self.winfo_children()]
"""
The following functions perform background tasks. Importantly the public packet is constantly updated
allowing the vban_cmd interface to fetch updated values.
"""
def refresh_public_packet(self):
self.after(1, self.refresh_public_packet_step)
def refresh_public_packet_step(self):
""" updates public packet in the background """
vban.public_packet = vban._get_rt()
self.after(25, self.refresh_public_packet_step)
def watch_levels(self, i):
self.after(1, self.watch_levels_step, i)
@ -132,7 +118,7 @@ if __name__ == "__main__":
opts = {
# make sure VBAN is configured on remote machine then set IP accordingly
'ip': 'ws.local',
'streamname': 'Command1',
'streamname': 'testing',
'port': 6990,
}