xair-api 2.3.2__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.2 → xair_api-2.4.0}/PKG-INFO +15 -3
- {xair_api-2.3.2 → xair_api-2.4.0}/README.md +12 -2
- xair_api-2.4.0/pyproject.toml +135 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/adapter.py +7 -0
- xair_api-2.4.0/xair_api/headamp.py +49 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/kinds.py +1 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/xair.py +3 -0
- xair_api-2.3.2/pyproject.toml +0 -43
- {xair_api-2.3.2 → xair_api-2.4.0}/LICENSE +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/__init__.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/bus.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/config.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/dca.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/errors.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/fx.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/lr.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/meta.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/rtn.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/shared.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/strip.py +0 -0
- {xair_api-2.3.2 → xair_api-2.4.0}/xair_api/util.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
|
|
@@ -132,6 +133,10 @@ A class representing auxreturn channel
|
|
|
132
133
|
|
|
133
134
|
A class representing the main config settings
|
|
134
135
|
|
|
136
|
+
`mixer.headamp`
|
|
137
|
+
|
|
138
|
+
A class representing the channel preamps (phantom power/gain).
|
|
139
|
+
|
|
135
140
|
### `LR`
|
|
136
141
|
|
|
137
142
|
Contains the subclasses:
|
|
@@ -162,6 +167,13 @@ Contains the subclasses:
|
|
|
162
167
|
Contains the subclasses:
|
|
163
168
|
(`Config`, `Preamp`, `EQ`, `Mix`, `Group`, `Send`)
|
|
164
169
|
|
|
170
|
+
### `HeadAmp`
|
|
171
|
+
|
|
172
|
+
The following properties are available:
|
|
173
|
+
|
|
174
|
+
- `gain`: float, from -12.0 to 60.0
|
|
175
|
+
- `phantom`: bool
|
|
176
|
+
|
|
165
177
|
### `Subclasses`
|
|
166
178
|
|
|
167
179
|
For each subclass the corresponding properties are available.
|
|
@@ -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
|
|
@@ -114,6 +113,10 @@ A class representing auxreturn channel
|
|
|
114
113
|
|
|
115
114
|
A class representing the main config settings
|
|
116
115
|
|
|
116
|
+
`mixer.headamp`
|
|
117
|
+
|
|
118
|
+
A class representing the channel preamps (phantom power/gain).
|
|
119
|
+
|
|
117
120
|
### `LR`
|
|
118
121
|
|
|
119
122
|
Contains the subclasses:
|
|
@@ -144,6 +147,13 @@ Contains the subclasses:
|
|
|
144
147
|
Contains the subclasses:
|
|
145
148
|
(`Config`, `Preamp`, `EQ`, `Mix`, `Group`, `Send`)
|
|
146
149
|
|
|
150
|
+
### `HeadAmp`
|
|
151
|
+
|
|
152
|
+
The following properties are available:
|
|
153
|
+
|
|
154
|
+
- `gain`: float, from -12.0 to 60.0
|
|
155
|
+
- `phantom`: bool
|
|
156
|
+
|
|
147
157
|
### `Subclasses`
|
|
148
158
|
|
|
149
159
|
For each subclass the corresponding properties are available.
|
|
@@ -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,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)
|
|
@@ -20,6 +20,7 @@ from .config import Config
|
|
|
20
20
|
from .dca import DCA
|
|
21
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
|
|
@@ -134,6 +135,7 @@ def _make_remote(kind: KindMap) -> XAirRemote:
|
|
|
134
135
|
self.fxreturn = tuple(adapter.FxRtn.make(self, i) for i in range(kind.num_fx))
|
|
135
136
|
self.auxin = tuple(adapter.AuxRtn.make(self, i) for i in range(kind.num_auxrtn))
|
|
136
137
|
self.config = Config.make(self)
|
|
138
|
+
self.headamp = tuple(adapter.HeadAmp(self, i) for i in range(kind.num_headamp))
|
|
137
139
|
|
|
138
140
|
def init_xair(self, *args, **kwargs):
|
|
139
141
|
defaultkwargs = {
|
|
@@ -154,6 +156,7 @@ def _make_remote(kind: KindMap) -> XAirRemote:
|
|
|
154
156
|
self.fxreturn = tuple(FxRtn.make(self, i) for i in range(kind.num_fx))
|
|
155
157
|
self.auxreturn = AuxRtn.make(self)
|
|
156
158
|
self.config = Config.make(self)
|
|
159
|
+
self.headamp = tuple(HeadAmp(self, i) for i in range(kind.num_strip))
|
|
157
160
|
|
|
158
161
|
if kind.id_ == "X32":
|
|
159
162
|
return type(
|
xair_api-2.3.2/pyproject.toml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "xair-api"
|
|
3
|
-
version = "2.3.2"
|
|
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
|
-
black = "^22.6.0"
|
|
19
|
-
isort = "^5.10.1"
|
|
20
|
-
tox = "^4.12.1"
|
|
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
|
-
allowlist_externals = poetry
|
|
40
|
-
commands =
|
|
41
|
-
poetry install -v
|
|
42
|
-
poetry run pytest tests/
|
|
43
|
-
"""
|
|
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
|
|
File without changes
|
|
File without changes
|