-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in app_bundle (pull request #7)
App bundle Approved-by: Gustav Andersson Approved-by: Ilias Bergstrom
- Loading branch information
Showing
17 changed files
with
1,927 additions
and
1,217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
venv/* | ||
venv | ||
|
||
.idea | ||
|
||
sushi_gui/__pycache__/ | ||
sushi_gui/sushi_rpc_pb2* | ||
sushi_gui/build/ | ||
sushi_gui/dist/ | ||
__pycache__/ | ||
sushi_rpc_pb2* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "sushi-grpc-api"] | ||
path = sushi-grpc-api | ||
url = [email protected]:mindswteam/sushi-grpc-api.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,66 @@ | ||
# QT UI | ||
Generic GUI for controlling Sushi over gRPC, built with python and QT. Can control both local instances and remote devices. Intended for testing and development. | ||
# SUSHI GUI | ||
A generic GUI for controlling Sushi over gRPC, built with Python and QT. | ||
It can control both local instances and remote devices. | ||
Intended for testing and development. | ||
|
||
## Usage | ||
## Installation | ||
It is assumed you have Python 3 on your system. And Sushi, of course... | ||
|
||
After cloning this repo, do not forget to run `git submodule update --init --recursive`! | ||
### Dependencies | ||
The preferred way to install deps is in a virtual environment. Here is how to do it with the builtin `venv` module. Using | ||
`virtualenv` instead is also possible. | ||
- `python3 -m venv venv` will create a virtual environment named *venv* with your installed Python | ||
- `source venv/bin/activate` to activate that environment | ||
- `pip install -r requirements.txt` to install all the dependencies in the environment | ||
|
||
### Sushi .proto definitions | ||
`sushi-grpc-api` is included in this repo as a submodule. It contains the proto definition file for Sushi. | ||
In the Sushi repo, you will find the `.proto` definition file for Sushi. By default, this GUI will use that. | ||
|
||
$ python3 ./qt_client.py | ||
In case you need to use another proto file, you should set the environment variable SUSHI_GRPC_ELKPY_PROTO to that | ||
path. | ||
|
||
## Dependencies | ||
* grpc-tools >= 1.29 | ||
* protobuf | ||
* PySide2 | ||
Also, note that Sushi comes with its proto file when you check it out. Specifically in `sushi/rpc_interface/protos/sushi_rpc.proto`. | ||
So setting environment variable like that: | ||
``` | ||
$ export SUSHI_GRPC_ELKPY_PROTO=path_to_sushi/rpc_interface/protos/sushi_rpc.proto | ||
``` | ||
will make the GUI use the proto file included with Sushi. | ||
|
||
## Notes | ||
* Make sure to set the path to _sushi_rpc.proto_ before launching. | ||
* If controlling Sushi running on a remote device, change the ip from localhost to the *ip of the elk device*. | ||
* It is assumed that you have copied the ElkPy package to the UI top directory, as advised in the ElkPy documentation. | ||
If you want to use ElkPy from another place, do not forget to adapt the relevant `import` statements. | ||
If you find yourself using this often and wanting to set the variable *once and for all*, you should add the command to your | ||
`.bashrc` or `.zshrc`, depending on which shell you are using. | ||
|
||
# TK UI (deprecated) | ||
`client.py` is a generic GUI for controlling Sushi over gRPC, built with python and Tk. Can control both local instances and remote devices. Intended for testing and development and not for externa use. UI is very ugly and the code not up to standard for publishing. | ||
|
||
Only works with Sushi version <= 0.9, use QT UI with more recent versions of Sushi | ||
--- | ||
|
||
|
||
## Usage | ||
Assuming that Sushi is running on your machine: | ||
|
||
$ python3 ./sushi-gui.py | ||
|
||
## Controlling Sushi when it is running on another machine | ||
The GUI lets you specify an IP address and port number to connect to. Simple as that. | ||
|
||
In case you need to hard-code a different default address than `localhost:51051`, feel free | ||
to edit `sushi-gui.py:4`: | ||
``` | ||
SUSHI_ADDRESS = 'localhost:51051' | ||
``` | ||
with the new default address. | ||
|
||
## Limitations | ||
Although meant as a debugging/testing tools for Sushi developers, this GUI does **not** implement all of Sushi's features. | ||
Most notably, some behavior one might expect after learning about the notification system is missing: | ||
|
||
### Processor update notifications and ordering | ||
Sushi allows for adding processor anywhere in the processor stack. But this GUI does not. When adding a plugin, it will | ||
always add it at the bottom of the stack, i.e. in the last position in the audio flow. This limitation gets even more | ||
annoying when the processor addition is done via other means which do allow for insertion in any position because this | ||
GUI will **not** reflect the new ordering: the new plugin will always be shown at the bottom of the stack even though | ||
it is actually somewhere else. Keep that in mind. | ||
|
||
$ python3 ./client.py | ||
--- | ||
Copyright 2023 Elk Audio AB, Stockholm, Sweden. | ||
|
||
Make sure to set the path to _sushi_rpc.proto_ before launching. If controlling Sushi running on a remote device, change the ip from localhost to the ip of the elk device. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[build-system] | ||
requires = ["setuptools>=59.5.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "sushi_gui" | ||
version = "1.0.0" | ||
authors = [ | ||
{ name="Maxime Gendebien", email="[email protected]" }, | ||
{ name="Gustav Andersson", email="[email protected]" }, | ||
] | ||
description = "A simple GUI for Sushi, using PySide and gRPC." | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)" | ||
] | ||
dependencies = ['elkpy', 'grpcio', 'grpcio-tools', 'PySide>=6.4'] |
Oops, something went wrong.