Skip to content

Commit 4369f7d

Browse files
committed
Documentation: Improve usage section and add use cases
1 parent 0d4d751 commit 4369f7d

File tree

2 files changed

+61
-12
lines changed

2 files changed

+61
-12
lines changed

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Utilities:
2929
* `overwitch-record`, which records multitrack audio from Overbridge devices.
3030

3131
For a device manager application for Elektron devices, check [Elektroid](https://dagargo.github.io/elektroid/).
32+
3233
## Installation
3334

3435
As with other autotools project, you need to run the commands below. There is a compilation option available.
@@ -86,24 +87,41 @@ To allow the service to be started at boot, running `systemctl --user enable ove
8687

8788
## Usage
8889

89-
Overwitch contains three JACK clients, one for the desktop, one for the command line and one to be used as a service. Additionally, a recording and playing utilities for the command line are also included.
90+
Overwitch contains two JACK clients. One is a D-Bus and systemd compatible hotplug service, which is used by the GUI application; and the other is a CLI application. Additionally, a playing and recording utilities for the CLI are also included.
9091

9192
Regarding the JACK clients, latency needs to be under control and it can be tuned with the following parameters.
9293

93-
- Blocks, which controls the amount of data sent in a single USB operation. The higher, the higher latency but the lower CPU usage. 4 blocks keeps the latency quite low and does not impact on the CPU.
94-
- Quality, which controls the resampler accuracy. The higher, the more CPU consuming. A medium value is recommended. Notice that in `overwitch-cli`, a value of 0 means the highest quality while a value of 4 means the lowest.
94+
- Blocks, which controls the amount of data sent in a single USB operation. The more blocks, the higher latency but the lower CPU usage.
95+
- Quality, which controls the resampler accuracy. The higher the quality, the higher CPU usage. A medium value is recommended. Notice that in `overwitch-cli`, a value of 0 means the highest quality while a value of 4 means the lowest.
96+
97+
### Use cases
98+
99+
For all use cases, the default installation is needed.
100+
101+
#### Typical desktop user
102+
103+
Just use `overwitch` (GUI). This will start up the included D-Bus service when needed. No other tools are required.
104+
Notice that closing the application window does **not** terminate the D-Bus service, which means that the hotplug system is still running. Starting the application again will show the window with the ongoing state of all the devices. To terminate everything, click on the exit menu.
105+
106+
#### Non GUI user
107+
108+
Install the systemd service from the `systemd` directory and start it up. This uses the same code as the D-Bus service and runs the devices as soon as they are connected. No other tools are required. Stopping the service will stop all the devices.
109+
110+
#### Testing
111+
112+
In case of testing Overwitch, only the CLI utilities should be used. In this scenario, use all of these with `-vv` to add some debugging output.
95113

96114
### overwitch
97115

98-
The GUI is self explanatory and does not requiere any parameter passed from the command line. It runs all found Overbridge device in different JACK clients.
116+
The GUI is self explanatory and does not requiere any parameter passed from the command line. It controls the D-Bus service, which will manage any Overbridge device.
99117

100118
Notice that once an Overbridge device is running the options can not be changed so you will need to stop the running instances and refresh the list.
101119

102120
It is possible to rename Overbridge devices by simply editing its name on the list. Still, as JACK devices can not be renamed while running, the device will be restarted.
103121

104122
### overwitch-service
105123

106-
Using `overwitch-service` allows having a systemd unit which uses device hotplugging. This will load the configuration from the same config file the GUI uses.
124+
Using `overwitch-service` allows having a systemd unit which uses device hotplug. This will load the configuration from the same configuration file the GUI uses.
107125

108126
This is a configuration example with the recommended properties. Not all the properties are shown here.
109127

@@ -119,6 +137,8 @@ $ cat ~/.config/overwitch/preferences.json
119137

120138
Obviously, when running the service there is no need for the GUI whatsoever.
121139

140+
Notice that this binary is used by both the D-Bus service and the systemd service is rarely needed to be run like this.
141+
122142
### overwitch-cli
123143

124144
The CLI interface allows the user to create a single JACK client and have full control the options to be used.
@@ -130,10 +150,15 @@ $ overwitch-cli -l
130150
0: Digitakt (ID 1935:000c) at bus 001, address 005
131151
```
132152

133-
Then, you can choose which device you want to use by using one of these options. Notice that the second option will only work for the first device found with that name.
153+
Then, you can choose which device you want to use by using `-n`.
134154

135155
```
136156
$ overwitch-cli -n 0
157+
```
158+
159+
You can select the device by name too but the use of this option is discouraged and `-n` should be used instead. When using this option, the first device in the list will be used.
160+
161+
```
137162
$ overwitch-cli -d Digitakt
138163
```
139164

docs/usage.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,41 @@ order: 3
77

88
## Usage
99

10-
Overwitch contains three JACK clients, one for the desktop, one for the command line and one to be used as a service. Additionally, a recording and playing utilities for the command line are also included.
10+
Overwitch contains two JACK clients. One is a D-Bus and systemd compatible hotplug service, which is used by the GUI application; and the other is a CLI application. Additionally, a playing and recording utilities for the CLI are also included.
1111

1212
Regarding the JACK clients, latency needs to be under control and it can be tuned with the following parameters.
1313

14-
- Blocks, which controls the amount of data sent in a single USB operation. The higher, the higher latency but the lower CPU usage. 4 blocks keeps the latency quite low and does not impact on the CPU.
15-
- Quality, which controls the resampler accuracy. The higher, the more CPU consuming. A medium value is recommended. Notice that in `overwitch-cli`, a value of 0 means the highest quality while a value of 4 means the lowest.
14+
- Blocks, which controls the amount of data sent in a single USB operation. The more blocks, the higher latency but the lower CPU usage.
15+
- Quality, which controls the resampler accuracy. The higher the quality, the higher CPU usage. A medium value is recommended. Notice that in `overwitch-cli`, a value of 0 means the highest quality while a value of 4 means the lowest.
16+
17+
### Use cases
18+
19+
For all use cases, the default installation is needed.
20+
21+
#### Typical desktop user
22+
23+
Just use `overwitch` (GUI). This will start up the included D-Bus service when needed. No other tools are required.
24+
Notice that closing the application window does **not** terminate the D-Bus service, which means that the hotplug system is still running. Starting the application again will show the window with the ongoing state of all the devices. To terminate everything, click on the exit menu.
25+
26+
#### Non GUI user
27+
28+
Install the systemd service from the `systemd` directory and start it up. This uses the same code as the D-Bus service and runs the devices as soon as they are connected. No other tools are required. Stopping the service will stop all the devices.
29+
30+
#### Testing
31+
32+
In case of testing Overwitch, only the CLI utilities should be used. In this scenario, use all of these with `-vv` to add some debugging output.
1633

1734
### overwitch
1835

19-
The GUI is self explanatory and does not requiere any parameter passed from the command line. It runs all found Overbridge device in different JACK clients.
36+
The GUI is self explanatory and does not requiere any parameter passed from the command line. It controls the D-Bus service, which will manage any Overbridge device.
2037

2138
Notice that once an Overbridge device is running the options can not be changed so you will need to stop the running instances and refresh the list.
2239

2340
It is possible to rename Overbridge devices by simply editing its name on the list. Still, as JACK devices can not be renamed while running, the device will be restarted.
2441

2542
### overwitch-service
2643

27-
Using `overwitch-service` allows having a systemd unit which uses device hotplugging. This will load the configuration from the same config file the GUI uses.
44+
Using `overwitch-service` allows having a systemd unit which uses device hotplug. This will load the configuration from the same configuration file the GUI uses.
2845

2946
This is a configuration example with the recommended properties. Not all the properties are shown here.
3047

@@ -40,6 +57,8 @@ $ cat ~/.config/overwitch/preferences.json
4057

4158
Obviously, when running the service there is no need for the GUI whatsoever.
4259

60+
Notice that this binary is used by both the D-Bus service and the systemd service is rarely needed to be run like this.
61+
4362
### overwitch-cli
4463

4564
The CLI interface allows the user to create a single JACK client and have full control the options to be used.
@@ -51,10 +70,15 @@ $ overwitch-cli -l
5170
0: Digitakt (ID 1935:000c) at bus 001, address 005
5271
```
5372

54-
Then, you can choose which device you want to use by using one of these options. Notice that the second option will only work for the first device found with that name.
73+
Then, you can choose which device you want to use by using `-n`.
5574

5675
```
5776
$ overwitch-cli -n 0
77+
```
78+
79+
You can select the device by name too but the use of this option is discouraged and `-n` should be used instead. When using this option, the first device in the list will be used.
80+
81+
```
5882
$ overwitch-cli -d Digitakt
5983
```
6084

0 commit comments

Comments
 (0)