xair-api 2.3.1__tar.gz → 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xair_api-2.3.1 → xair_api-2.4.0}/PKG-INFO +25 -4
- {xair_api-2.3.1 → xair_api-2.4.0}/README.md +22 -3
- xair_api-2.4.0/pyproject.toml +135 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/adapter.py +7 -0
- xair_api-2.4.0/xair_api/errors.py +14 -0
- xair_api-2.4.0/xair_api/headamp.py +49 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/kinds.py +1 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/util.py +29 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/xair.py +21 -12
- xair_api-2.3.1/pyproject.toml +0 -29
- xair_api-2.3.1/xair_api/errors.py +0 -2
- {xair_api-2.3.1 → xair_api-2.4.0}/LICENSE +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/__init__.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/bus.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/config.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/dca.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/fx.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/lr.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/meta.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/rtn.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/shared.py +0 -0
- {xair_api-2.3.1 → xair_api-2.4.0}/xair_api/strip.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xair-api
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: Remote control Behringer X-Air | Midas MR mixers through OSC
|
|
5
5
|
Home-page: https://github.com/onyx-and-iris/xair-api-python
|
|
6
6
|
License: MIT
|
|
@@ -11,6 +11,8 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
16
|
Requires-Dist: python-osc (>=1.8.0,<2.0.0)
|
|
15
17
|
Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
|
|
16
18
|
Project-URL: Repository, https://github.com/onyx-and-iris/xair-api-python
|
|
@@ -18,8 +20,7 @@ Description-Content-Type: text/markdown
|
|
|
18
20
|
|
|
19
21
|
[](https://badge.fury.io/py/xair-api)
|
|
20
22
|
[](https://github.com/onyx-and-iris/xair-api-python/blob/dev/LICENSE)
|
|
21
|
-
[](https://pycqa.github.io/isort/)
|
|
23
|
+
[](https://github.com/astral-sh/ruff)
|
|
23
24
|

|
|
24
25
|
|
|
25
26
|
# Xair API
|
|
@@ -73,7 +74,7 @@ if __name__ == "__main__":
|
|
|
73
74
|
main()
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
#### `xair_api.connect(kind_id, ip=ip, delay=
|
|
77
|
+
#### `xair_api.connect(kind_id, ip=ip, delay=0.02, connect_timeout=2)`
|
|
77
78
|
|
|
78
79
|
Currently the following devices are supported:
|
|
79
80
|
|
|
@@ -90,6 +91,7 @@ The following keyword arguments may be passed:
|
|
|
90
91
|
- `port`: mixer port, defaults to 10023 for x32 and 10024 for xair
|
|
91
92
|
- `delay`: a delay between each command (applies to the getters). Defaults to 20ms.
|
|
92
93
|
- a note about delay, stability may rely on network connection. For wired connections the delay can be safely reduced.
|
|
94
|
+
- `connect_timeout`: amount of time to wait for a validated connection. Defaults to 2s.
|
|
93
95
|
|
|
94
96
|
## API
|
|
95
97
|
|
|
@@ -131,6 +133,10 @@ A class representing auxreturn channel
|
|
|
131
133
|
|
|
132
134
|
A class representing the main config settings
|
|
133
135
|
|
|
136
|
+
`mixer.headamp`
|
|
137
|
+
|
|
138
|
+
A class representing the channel preamps (phantom power/gain).
|
|
139
|
+
|
|
134
140
|
### `LR`
|
|
135
141
|
|
|
136
142
|
Contains the subclasses:
|
|
@@ -161,6 +167,13 @@ Contains the subclasses:
|
|
|
161
167
|
Contains the subclasses:
|
|
162
168
|
(`Config`, `Preamp`, `EQ`, `Mix`, `Group`, `Send`)
|
|
163
169
|
|
|
170
|
+
### `HeadAmp`
|
|
171
|
+
|
|
172
|
+
The following properties are available:
|
|
173
|
+
|
|
174
|
+
- `gain`: float, from -12.0 to 60.0
|
|
175
|
+
- `phantom`: bool
|
|
176
|
+
|
|
164
177
|
### `Subclasses`
|
|
165
178
|
|
|
166
179
|
For each subclass the corresponding properties are available.
|
|
@@ -335,6 +348,14 @@ for example:
|
|
|
335
348
|
print(mixer.query("/ch/01/mix/on"))
|
|
336
349
|
```
|
|
337
350
|
|
|
351
|
+
### Errors
|
|
352
|
+
|
|
353
|
+
- `errors.XAirRemoteError`: Base error class for XAIR Remote.
|
|
354
|
+
- `errors.XAirRemoteConnectionTimeoutError`:Exception raised when a connection attempt times out.
|
|
355
|
+
- The following attributes are available:
|
|
356
|
+
- `ip`: IP of the mixer.
|
|
357
|
+
- `port`: Port of the mixer.
|
|
358
|
+
|
|
338
359
|
### `Tests`
|
|
339
360
|
|
|
340
361
|
Unplug any expensive equipment before running tests.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[](https://badge.fury.io/py/xair-api)
|
|
2
2
|
[](https://github.com/onyx-and-iris/xair-api-python/blob/dev/LICENSE)
|
|
3
|
-
[](https://pycqa.github.io/isort/)
|
|
3
|
+
[](https://github.com/astral-sh/ruff)
|
|
5
4
|

|
|
6
5
|
|
|
7
6
|
# Xair API
|
|
@@ -55,7 +54,7 @@ if __name__ == "__main__":
|
|
|
55
54
|
main()
|
|
56
55
|
```
|
|
57
56
|
|
|
58
|
-
#### `xair_api.connect(kind_id, ip=ip, delay=
|
|
57
|
+
#### `xair_api.connect(kind_id, ip=ip, delay=0.02, connect_timeout=2)`
|
|
59
58
|
|
|
60
59
|
Currently the following devices are supported:
|
|
61
60
|
|
|
@@ -72,6 +71,7 @@ The following keyword arguments may be passed:
|
|
|
72
71
|
- `port`: mixer port, defaults to 10023 for x32 and 10024 for xair
|
|
73
72
|
- `delay`: a delay between each command (applies to the getters). Defaults to 20ms.
|
|
74
73
|
- a note about delay, stability may rely on network connection. For wired connections the delay can be safely reduced.
|
|
74
|
+
- `connect_timeout`: amount of time to wait for a validated connection. Defaults to 2s.
|
|
75
75
|
|
|
76
76
|
## API
|
|
77
77
|
|
|
@@ -113,6 +113,10 @@ A class representing auxreturn channel
|
|
|
113
113
|
|
|
114
114
|
A class representing the main config settings
|
|
115
115
|
|
|
116
|
+
`mixer.headamp`
|
|
117
|
+
|
|
118
|
+
A class representing the channel preamps (phantom power/gain).
|
|
119
|
+
|
|
116
120
|
### `LR`
|
|
117
121
|
|
|
118
122
|
Contains the subclasses:
|
|
@@ -143,6 +147,13 @@ Contains the subclasses:
|
|
|
143
147
|
Contains the subclasses:
|
|
144
148
|
(`Config`, `Preamp`, `EQ`, `Mix`, `Group`, `Send`)
|
|
145
149
|
|
|
150
|
+
### `HeadAmp`
|
|
151
|
+
|
|
152
|
+
The following properties are available:
|
|
153
|
+
|
|
154
|
+
- `gain`: float, from -12.0 to 60.0
|
|
155
|
+
- `phantom`: bool
|
|
156
|
+
|
|
146
157
|
### `Subclasses`
|
|
147
158
|
|
|
148
159
|
For each subclass the corresponding properties are available.
|
|
@@ -317,6 +328,14 @@ for example:
|
|
|
317
328
|
print(mixer.query("/ch/01/mix/on"))
|
|
318
329
|
```
|
|
319
330
|
|
|
331
|
+
### Errors
|
|
332
|
+
|
|
333
|
+
- `errors.XAirRemoteError`: Base error class for XAIR Remote.
|
|
334
|
+
- `errors.XAirRemoteConnectionTimeoutError`:Exception raised when a connection attempt times out.
|
|
335
|
+
- The following attributes are available:
|
|
336
|
+
- `ip`: IP of the mixer.
|
|
337
|
+
- `port`: Port of the mixer.
|
|
338
|
+
|
|
320
339
|
### `Tests`
|
|
321
340
|
|
|
322
341
|
Unplug any expensive equipment before running tests.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "xair-api"
|
|
3
|
+
version = "2.4.0"
|
|
4
|
+
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
|
5
|
+
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
|
6
|
+
license = "MIT"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
repository = "https://github.com/onyx-and-iris/xair-api-python"
|
|
9
|
+
|
|
10
|
+
[tool.poetry.dependencies]
|
|
11
|
+
python = "^3.10"
|
|
12
|
+
python-osc = "^1.8.0"
|
|
13
|
+
tomli = { version = "^2.0.1", python = "<3.11" }
|
|
14
|
+
|
|
15
|
+
[tool.poetry.group.dev.dependencies]
|
|
16
|
+
pytest = "^7.4.4"
|
|
17
|
+
pytest-randomly = "^3.12.0"
|
|
18
|
+
ruff = "^0.8.6"
|
|
19
|
+
tox = "^4.23.2"
|
|
20
|
+
virtualenv-pyenv = "^0.5.0"
|
|
21
|
+
|
|
22
|
+
[build-system]
|
|
23
|
+
requires = ["poetry-core>=1.0.0"]
|
|
24
|
+
build-backend = "poetry.core.masonry.api"
|
|
25
|
+
|
|
26
|
+
[tool.poetry.scripts]
|
|
27
|
+
obs = "scripts:ex_obs"
|
|
28
|
+
sends = "scripts:ex_sends"
|
|
29
|
+
xair = "scripts:test_xair"
|
|
30
|
+
x32 = "scripts:test_x32"
|
|
31
|
+
all = "scripts:test_all"
|
|
32
|
+
|
|
33
|
+
[tool.tox]
|
|
34
|
+
legacy_tox_ini = """
|
|
35
|
+
[tox]
|
|
36
|
+
envlist = py310,py311,py312
|
|
37
|
+
|
|
38
|
+
[testenv]
|
|
39
|
+
setenv = VIRTUALENV_DISCOVERY=pyenv
|
|
40
|
+
allowlist_externals = poetry
|
|
41
|
+
commands =
|
|
42
|
+
poetry install -v
|
|
43
|
+
poetry run pytest tests/
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
[tool.ruff]
|
|
47
|
+
lint.select = [
|
|
48
|
+
"E",
|
|
49
|
+
"F",
|
|
50
|
+
]
|
|
51
|
+
lint.ignore = [
|
|
52
|
+
"E501",
|
|
53
|
+
]
|
|
54
|
+
lint.fixable = [
|
|
55
|
+
"A",
|
|
56
|
+
"B",
|
|
57
|
+
"C",
|
|
58
|
+
"D",
|
|
59
|
+
"E",
|
|
60
|
+
"F",
|
|
61
|
+
"G",
|
|
62
|
+
"I",
|
|
63
|
+
"N",
|
|
64
|
+
"Q",
|
|
65
|
+
"S",
|
|
66
|
+
"T",
|
|
67
|
+
"W",
|
|
68
|
+
"ANN",
|
|
69
|
+
"ARG",
|
|
70
|
+
"BLE",
|
|
71
|
+
"COM",
|
|
72
|
+
"DJ",
|
|
73
|
+
"DTZ",
|
|
74
|
+
"EM",
|
|
75
|
+
"ERA",
|
|
76
|
+
"EXE",
|
|
77
|
+
"FBT",
|
|
78
|
+
"ICN",
|
|
79
|
+
"INP",
|
|
80
|
+
"ISC",
|
|
81
|
+
"NPY",
|
|
82
|
+
"PD",
|
|
83
|
+
"PGH",
|
|
84
|
+
"PIE",
|
|
85
|
+
"PL",
|
|
86
|
+
"PT",
|
|
87
|
+
"PTH",
|
|
88
|
+
"PYI",
|
|
89
|
+
"RET",
|
|
90
|
+
"RSE",
|
|
91
|
+
"RUF",
|
|
92
|
+
"SIM",
|
|
93
|
+
"SLF",
|
|
94
|
+
"TCH",
|
|
95
|
+
"TID",
|
|
96
|
+
"TRY",
|
|
97
|
+
"UP",
|
|
98
|
+
"YTT",
|
|
99
|
+
]
|
|
100
|
+
lint.unfixable = []
|
|
101
|
+
exclude = [
|
|
102
|
+
".bzr",
|
|
103
|
+
".direnv",
|
|
104
|
+
".eggs",
|
|
105
|
+
".git",
|
|
106
|
+
".git-rewrite",
|
|
107
|
+
".hg",
|
|
108
|
+
".mypy_cache",
|
|
109
|
+
".nox",
|
|
110
|
+
".pants.d",
|
|
111
|
+
".pytype",
|
|
112
|
+
".ruff_cache",
|
|
113
|
+
".svn",
|
|
114
|
+
".tox",
|
|
115
|
+
".venv",
|
|
116
|
+
"__pypackages__",
|
|
117
|
+
"_build",
|
|
118
|
+
"buck-out",
|
|
119
|
+
"build",
|
|
120
|
+
"dist",
|
|
121
|
+
"node_modules",
|
|
122
|
+
"venv",
|
|
123
|
+
]
|
|
124
|
+
line-length = 88
|
|
125
|
+
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
126
|
+
target-version = "py312"
|
|
127
|
+
|
|
128
|
+
[tool.ruff.lint.mccabe]
|
|
129
|
+
max-complexity = 10
|
|
130
|
+
|
|
131
|
+
[tool.ruff.lint.per-file-ignores]
|
|
132
|
+
"__init__.py" = [
|
|
133
|
+
"E402",
|
|
134
|
+
"F401",
|
|
135
|
+
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .bus import Bus as IBus
|
|
2
|
+
from .headamp import HeadAmp as IHeadAmp
|
|
2
3
|
from .lr import LR as ILR
|
|
3
4
|
from .rtn import AuxRtn as IAuxRtn
|
|
4
5
|
from .rtn import FxRtn as IFxRtn
|
|
@@ -38,3 +39,9 @@ class Matrix(ILR):
|
|
|
38
39
|
@property
|
|
39
40
|
def address(self) -> str:
|
|
40
41
|
return f"/mtx/{str(self.index).zfill(2)}"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class HeadAmp(IHeadAmp):
|
|
45
|
+
@property
|
|
46
|
+
def address(self):
|
|
47
|
+
return f"/headamp/{str(self.index).zfill(3)}"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class XAirRemoteError(Exception):
|
|
2
|
+
"""Base error class for XAIR Remote."""
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class XAirRemoteConnectionTimeoutError(XAirRemoteError):
|
|
6
|
+
"""Exception raised when a connection attempt times out"""
|
|
7
|
+
|
|
8
|
+
def __init__(self, ip, port):
|
|
9
|
+
self.ip = ip
|
|
10
|
+
self.port = port
|
|
11
|
+
|
|
12
|
+
super().__init__(
|
|
13
|
+
f"Timeout attempting to connect to mixer at {self.ip}:{self.port}"
|
|
14
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
from . import util
|
|
5
|
+
|
|
6
|
+
logger = logging.getLogger(__name__)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class IHeadAmp(abc.ABC):
|
|
10
|
+
"""Abstract Base Class for headamps"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, remote, index: int):
|
|
13
|
+
self._remote = remote
|
|
14
|
+
self.index = index + 1
|
|
15
|
+
self.logger = logger.getChild(self.__class__.__name__)
|
|
16
|
+
|
|
17
|
+
def getter(self, param: str):
|
|
18
|
+
return self._remote.query(f"{self.address}/{param}")
|
|
19
|
+
|
|
20
|
+
def setter(self, param: str, val: int):
|
|
21
|
+
self._remote.send(f"{self.address}/{param}", val)
|
|
22
|
+
|
|
23
|
+
@abc.abstractmethod
|
|
24
|
+
def address(self):
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class HeadAmp(IHeadAmp):
|
|
29
|
+
"""Concrete class for headamps"""
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def address(self):
|
|
33
|
+
return f"/headamp/{str(self.index).zfill(2)}"
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def gain(self):
|
|
37
|
+
return round(util.lin_get(-12, 60, self.getter("gain")[0]), 1)
|
|
38
|
+
|
|
39
|
+
@gain.setter
|
|
40
|
+
def gain(self, val):
|
|
41
|
+
self.setter("gain", util.lin_set(-12, 60, val))
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def phantom(self):
|
|
45
|
+
return self.getter("phantom")[0] == 1
|
|
46
|
+
|
|
47
|
+
@phantom.setter
|
|
48
|
+
def phantom(self, val):
|
|
49
|
+
self.setter("phantom", 1 if val else 0)
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import functools
|
|
2
|
+
import time
|
|
2
3
|
from math import exp, log
|
|
3
4
|
|
|
5
|
+
from .errors import XAirRemoteConnectionTimeoutError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def timeout(func):
|
|
9
|
+
"""
|
|
10
|
+
Times out the validate_connection function once time elapsed exceeds remote.connect_timeout.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
@functools.wraps(func)
|
|
14
|
+
def wrapper(*args, **kwargs):
|
|
15
|
+
remote, *_ = args
|
|
16
|
+
|
|
17
|
+
err = None
|
|
18
|
+
start = time.time()
|
|
19
|
+
while time.time() < start + remote.connect_timeout:
|
|
20
|
+
try:
|
|
21
|
+
func(*args, **kwargs)
|
|
22
|
+
remote.logger.debug(f"login time: {round(time.time() - start, 2)}")
|
|
23
|
+
err = None
|
|
24
|
+
break
|
|
25
|
+
except XAirRemoteConnectionTimeoutError as e:
|
|
26
|
+
err = e
|
|
27
|
+
continue
|
|
28
|
+
if err:
|
|
29
|
+
raise err
|
|
30
|
+
|
|
31
|
+
return wrapper
|
|
32
|
+
|
|
4
33
|
|
|
5
34
|
def lin_get(min, max, val):
|
|
6
35
|
return min + (max - min) * val
|
|
@@ -14,12 +14,13 @@ from pythonosc.dispatcher import Dispatcher
|
|
|
14
14
|
from pythonosc.osc_message_builder import OscMessageBuilder
|
|
15
15
|
from pythonosc.osc_server import BlockingOSCUDPServer
|
|
16
16
|
|
|
17
|
-
from . import adapter, kinds
|
|
17
|
+
from . import adapter, kinds, util
|
|
18
18
|
from .bus import Bus
|
|
19
19
|
from .config import Config
|
|
20
20
|
from .dca import DCA
|
|
21
|
-
from .errors import XAirRemoteError
|
|
21
|
+
from .errors import XAirRemoteConnectionTimeoutError, XAirRemoteError
|
|
22
22
|
from .fx import FX, FXSend
|
|
23
|
+
from .headamp import HeadAmp
|
|
23
24
|
from .kinds import KindMap
|
|
24
25
|
from .lr import LR
|
|
25
26
|
from .rtn import AuxRtn, FxRtn
|
|
@@ -47,8 +48,6 @@ class OSCClientServer(BlockingOSCUDPServer):
|
|
|
47
48
|
class XAirRemote(abc.ABC):
|
|
48
49
|
"""Handles the communication with the mixer via the OSC protocol"""
|
|
49
50
|
|
|
50
|
-
_CONNECT_TIMEOUT = 0.5
|
|
51
|
-
|
|
52
51
|
_info_response = []
|
|
53
52
|
|
|
54
53
|
def __init__(self, **kwargs):
|
|
@@ -57,6 +56,7 @@ class XAirRemote(abc.ABC):
|
|
|
57
56
|
self.xair_ip = kwargs["ip"] or self._ip_from_toml()
|
|
58
57
|
self.xair_port = kwargs["port"]
|
|
59
58
|
self._delay = kwargs["delay"]
|
|
59
|
+
self.connect_timeout = kwargs["connect_timeout"]
|
|
60
60
|
self.logger = logger.getChild(self.__class__.__name__)
|
|
61
61
|
if not self.xair_ip:
|
|
62
62
|
raise XAirRemoteError("No valid ip detected")
|
|
@@ -74,13 +74,10 @@ class XAirRemote(abc.ABC):
|
|
|
74
74
|
conn = tomllib.load(f)
|
|
75
75
|
return conn["connection"].get("ip")
|
|
76
76
|
|
|
77
|
+
@util.timeout
|
|
77
78
|
def validate_connection(self):
|
|
78
|
-
self.
|
|
79
|
-
|
|
80
|
-
if not self.info_response:
|
|
81
|
-
raise XAirRemoteError(
|
|
82
|
-
"Failed to setup OSC connection to mixer. Please check for correct ip address."
|
|
83
|
-
)
|
|
79
|
+
if not self.query("/xinfo"):
|
|
80
|
+
raise XAirRemoteConnectionTimeoutError(self.xair_ip, self.xair_port)
|
|
84
81
|
self.logger.info(
|
|
85
82
|
f"Successfully connected to {self.info_response[2]} at {self.info_response[0]}."
|
|
86
83
|
)
|
|
@@ -117,7 +114,12 @@ def _make_remote(kind: KindMap) -> XAirRemote:
|
|
|
117
114
|
"""
|
|
118
115
|
|
|
119
116
|
def init_x32(self, *args, **kwargs):
|
|
120
|
-
defaultkwargs = {
|
|
117
|
+
defaultkwargs = {
|
|
118
|
+
"ip": None,
|
|
119
|
+
"port": 10023,
|
|
120
|
+
"delay": 0.02,
|
|
121
|
+
"connect_timeout": 2,
|
|
122
|
+
}
|
|
121
123
|
kwargs = defaultkwargs | kwargs
|
|
122
124
|
XAirRemote.__init__(self, *args, **kwargs)
|
|
123
125
|
self.kind = kind
|
|
@@ -133,9 +135,15 @@ def _make_remote(kind: KindMap) -> XAirRemote:
|
|
|
133
135
|
self.fxreturn = tuple(adapter.FxRtn.make(self, i) for i in range(kind.num_fx))
|
|
134
136
|
self.auxin = tuple(adapter.AuxRtn.make(self, i) for i in range(kind.num_auxrtn))
|
|
135
137
|
self.config = Config.make(self)
|
|
138
|
+
self.headamp = tuple(adapter.HeadAmp(self, i) for i in range(kind.num_headamp))
|
|
136
139
|
|
|
137
140
|
def init_xair(self, *args, **kwargs):
|
|
138
|
-
defaultkwargs = {
|
|
141
|
+
defaultkwargs = {
|
|
142
|
+
"ip": None,
|
|
143
|
+
"port": 10024,
|
|
144
|
+
"delay": 0.02,
|
|
145
|
+
"connect_timeout": 2,
|
|
146
|
+
}
|
|
139
147
|
kwargs = defaultkwargs | kwargs
|
|
140
148
|
XAirRemote.__init__(self, *args, **kwargs)
|
|
141
149
|
self.kind = kind
|
|
@@ -148,6 +156,7 @@ def _make_remote(kind: KindMap) -> XAirRemote:
|
|
|
148
156
|
self.fxreturn = tuple(FxRtn.make(self, i) for i in range(kind.num_fx))
|
|
149
157
|
self.auxreturn = AuxRtn.make(self)
|
|
150
158
|
self.config = Config.make(self)
|
|
159
|
+
self.headamp = tuple(HeadAmp(self, i) for i in range(kind.num_strip))
|
|
151
160
|
|
|
152
161
|
if kind.id_ == "X32":
|
|
153
162
|
return type(
|
xair_api-2.3.1/pyproject.toml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "xair-api"
|
|
3
|
-
version = "2.3.1"
|
|
4
|
-
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
|
5
|
-
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
|
6
|
-
license = "MIT"
|
|
7
|
-
readme = "README.md"
|
|
8
|
-
repository = "https://github.com/onyx-and-iris/xair-api-python"
|
|
9
|
-
|
|
10
|
-
[tool.poetry.dependencies]
|
|
11
|
-
python = "^3.10"
|
|
12
|
-
python-osc = "^1.8.0"
|
|
13
|
-
tomli = { version = "^2.0.1", python = "<3.11" }
|
|
14
|
-
|
|
15
|
-
[tool.poetry.group.dev.dependencies]
|
|
16
|
-
pytest = "^7.1.2"
|
|
17
|
-
pytest-randomly = "^3.12.0"
|
|
18
|
-
black = "^22.6.0"
|
|
19
|
-
isort = "^5.10.1"
|
|
20
|
-
|
|
21
|
-
[build-system]
|
|
22
|
-
requires = ["poetry-core>=1.0.0"]
|
|
23
|
-
build-backend = "poetry.core.masonry.api"
|
|
24
|
-
|
|
25
|
-
[tool.poetry.scripts]
|
|
26
|
-
obs = "scripts:ex_obs"
|
|
27
|
-
sends = "scripts:ex_sends"
|
|
28
|
-
xair = "scripts:test_xair"
|
|
29
|
-
x32 = "scripts:test_x32"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|