xair-api 2.3.2__py3-none-any.whl → 2.4.1__py3-none-any.whl
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/__init__.py +1 -1
- xair_api/adapter.py +13 -6
- xair_api/bus.py +6 -6
- xair_api/config.py +44 -44
- xair_api/dca.py +9 -9
- xair_api/errors.py +1 -1
- xair_api/fx.py +9 -9
- xair_api/headamp.py +49 -0
- xair_api/kinds.py +14 -15
- xair_api/lr.py +6 -6
- xair_api/meta.py +2 -2
- xair_api/rtn.py +12 -12
- xair_api/shared.py +168 -168
- xair_api/strip.py +7 -7
- xair_api/util.py +1 -1
- xair_api/xair.py +27 -24
- {xair_api-2.3.2.dist-info → xair_api-2.4.1.dist-info}/METADATA +28 -18
- xair_api-2.4.1.dist-info/RECORD +20 -0
- {xair_api-2.3.2.dist-info → xair_api-2.4.1.dist-info}/WHEEL +1 -1
- xair_api-2.3.2.dist-info/RECORD +0 -20
- xair_api-2.3.2.dist-info/entry_points.txt +0 -7
- {xair_api-2.3.2.dist-info → xair_api-2.4.1.dist-info}/LICENSE +0 -0
xair_api/shared.py
CHANGED
|
@@ -12,473 +12,473 @@ class Config:
|
|
|
12
12
|
@property
|
|
13
13
|
def address(self) -> str:
|
|
14
14
|
root = super(Config, self).address
|
|
15
|
-
return f
|
|
15
|
+
return f'{root}/config'
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
18
|
def name(self) -> str:
|
|
19
|
-
return self.getter(
|
|
19
|
+
return self.getter('name')[0]
|
|
20
20
|
|
|
21
21
|
@name.setter
|
|
22
22
|
def name(self, val: str):
|
|
23
|
-
self.setter(
|
|
23
|
+
self.setter('name', val)
|
|
24
24
|
|
|
25
25
|
@property
|
|
26
26
|
def color(self) -> int:
|
|
27
|
-
return self.getter(
|
|
27
|
+
return self.getter('color')[0]
|
|
28
28
|
|
|
29
29
|
@color.setter
|
|
30
30
|
def color(self, val: int):
|
|
31
|
-
self.setter(
|
|
31
|
+
self.setter('color', val)
|
|
32
32
|
|
|
33
33
|
@property
|
|
34
34
|
def inputsource(self) -> int:
|
|
35
|
-
return self.getter(
|
|
35
|
+
return self.getter('insrc')[0]
|
|
36
36
|
|
|
37
37
|
@inputsource.setter
|
|
38
38
|
def inputsource(self, val: int):
|
|
39
|
-
self.setter(
|
|
39
|
+
self.setter('insrc', val)
|
|
40
40
|
|
|
41
41
|
@property
|
|
42
42
|
def usbreturn(self) -> int:
|
|
43
|
-
return self.getter(
|
|
43
|
+
return self.getter('rtnsrc')[0]
|
|
44
44
|
|
|
45
45
|
@usbreturn.setter
|
|
46
46
|
def usbreturn(self, val: int):
|
|
47
|
-
self.setter(
|
|
47
|
+
self.setter('rtnsrc', val)
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
class Preamp:
|
|
51
51
|
@property
|
|
52
52
|
def address(self) -> str:
|
|
53
53
|
root = super(Preamp, self).address
|
|
54
|
-
return f
|
|
54
|
+
return f'{root}/preamp'
|
|
55
55
|
|
|
56
56
|
@property
|
|
57
57
|
def usbtrim(self) -> float:
|
|
58
|
-
return round(util.lin_get(-18, 18, self.getter(
|
|
58
|
+
return round(util.lin_get(-18, 18, self.getter('rtntrim')[0]), 1)
|
|
59
59
|
|
|
60
60
|
@usbtrim.setter
|
|
61
61
|
def usbtrim(self, val: float):
|
|
62
62
|
if not -18 <= val <= 18:
|
|
63
63
|
self.logger.warning(
|
|
64
|
-
f
|
|
64
|
+
f'usbtrim got {val}, expected value in range -18.0 to 18.0'
|
|
65
65
|
)
|
|
66
|
-
self.setter(
|
|
66
|
+
self.setter('rtntrim', util.lin_set(-18, 18, val))
|
|
67
67
|
|
|
68
68
|
@property
|
|
69
69
|
def usbinput(self) -> bool:
|
|
70
|
-
return self.getter(
|
|
70
|
+
return self.getter('rtnsw')[0] == 1
|
|
71
71
|
|
|
72
72
|
@usbinput.setter
|
|
73
73
|
def usbinput(self, val: bool):
|
|
74
|
-
self.setter(
|
|
74
|
+
self.setter('rtnsw', 1 if val else 0)
|
|
75
75
|
|
|
76
76
|
@property
|
|
77
77
|
def invert(self) -> bool:
|
|
78
|
-
return self.getter(
|
|
78
|
+
return self.getter('invert')[0] == 1
|
|
79
79
|
|
|
80
80
|
@invert.setter
|
|
81
81
|
def invert(self, val: bool):
|
|
82
|
-
self.setter(
|
|
82
|
+
self.setter('invert', 1 if val else 0)
|
|
83
83
|
|
|
84
84
|
@property
|
|
85
85
|
def highpasson(self) -> bool:
|
|
86
|
-
return self.getter(
|
|
86
|
+
return self.getter('hpon')[0] == 1
|
|
87
87
|
|
|
88
88
|
@highpasson.setter
|
|
89
89
|
def highpasson(self, val: bool):
|
|
90
|
-
self.setter(
|
|
90
|
+
self.setter('hpon', 1 if val else 0)
|
|
91
91
|
|
|
92
92
|
@property
|
|
93
93
|
def highpassfilter(self) -> int:
|
|
94
|
-
return int(util.log_get(20, 400, self.getter(
|
|
94
|
+
return int(util.log_get(20, 400, self.getter('hpf')[0]))
|
|
95
95
|
|
|
96
96
|
@highpassfilter.setter
|
|
97
97
|
def highpassfilter(self, val: int):
|
|
98
98
|
if not 20 <= val <= 400:
|
|
99
99
|
self.logger.warning(
|
|
100
|
-
f
|
|
100
|
+
f'highpassfilter got {val}, expected value in range 20 to 400'
|
|
101
101
|
)
|
|
102
|
-
self.setter(
|
|
102
|
+
self.setter('hpf', util.log_set(20, 400, val))
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
class Gate:
|
|
106
106
|
@property
|
|
107
107
|
def address(self) -> str:
|
|
108
108
|
root = super(Gate, self).address
|
|
109
|
-
return f
|
|
109
|
+
return f'{root}/gate'
|
|
110
110
|
|
|
111
111
|
@property
|
|
112
112
|
def on(self) -> bool:
|
|
113
|
-
return self.getter(
|
|
113
|
+
return self.getter('on')[0] == 1
|
|
114
114
|
|
|
115
115
|
@on.setter
|
|
116
116
|
def on(self, val: bool):
|
|
117
|
-
self.setter(
|
|
117
|
+
self.setter('on', 1 if val else 0)
|
|
118
118
|
|
|
119
119
|
@property
|
|
120
120
|
def mode(self) -> str:
|
|
121
|
-
opts = (
|
|
122
|
-
return opts[self.getter(
|
|
121
|
+
opts = ('gate', 'exp2', 'exp3', 'exp4', 'duck')
|
|
122
|
+
return opts[self.getter('mode')[0]]
|
|
123
123
|
|
|
124
124
|
@mode.setter
|
|
125
125
|
def mode(self, val: str):
|
|
126
|
-
opts = (
|
|
126
|
+
opts = ('gate', 'exp2', 'exp3', 'exp4', 'duck')
|
|
127
127
|
if val not in opts:
|
|
128
|
-
self.logger.warning(f
|
|
129
|
-
self.setter(
|
|
128
|
+
self.logger.warning(f'mode got {val}, expected one of {opts}')
|
|
129
|
+
self.setter('mode', opts.index(val))
|
|
130
130
|
|
|
131
131
|
@property
|
|
132
132
|
def threshold(self) -> float:
|
|
133
|
-
return round(util.lin_get(-80, 0, self.getter(
|
|
133
|
+
return round(util.lin_get(-80, 0, self.getter('thr')[0]), 1)
|
|
134
134
|
|
|
135
135
|
@threshold.setter
|
|
136
136
|
def threshold(self, val: float):
|
|
137
137
|
if not -80 <= val <= 0:
|
|
138
138
|
self.logger.warning(
|
|
139
|
-
f
|
|
139
|
+
f'threshold got {val}, expected value in range -80.0 to 0.0'
|
|
140
140
|
)
|
|
141
|
-
self.setter(
|
|
141
|
+
self.setter('thr', util.lin_set(-80, 0, val))
|
|
142
142
|
|
|
143
143
|
@property
|
|
144
144
|
def range(self) -> int:
|
|
145
|
-
return int(util.lin_get(3, 60, self.getter(
|
|
145
|
+
return int(util.lin_get(3, 60, self.getter('range')[0]))
|
|
146
146
|
|
|
147
147
|
@range.setter
|
|
148
148
|
def range(self, val: int):
|
|
149
149
|
if not 3 <= val <= 60:
|
|
150
|
-
self.logger.warning(f
|
|
151
|
-
self.setter(
|
|
150
|
+
self.logger.warning(f'range got {val}, expected value in range 3 to 60')
|
|
151
|
+
self.setter('range', util.lin_set(3, 60, val))
|
|
152
152
|
|
|
153
153
|
@property
|
|
154
154
|
def attack(self) -> int:
|
|
155
|
-
return int(util.lin_get(0, 120, self.getter(
|
|
155
|
+
return int(util.lin_get(0, 120, self.getter('attack')[0]))
|
|
156
156
|
|
|
157
157
|
@attack.setter
|
|
158
158
|
def attack(self, val: int):
|
|
159
159
|
if not 0 <= val <= 120:
|
|
160
|
-
self.logger.warning(f
|
|
161
|
-
self.setter(
|
|
160
|
+
self.logger.warning(f'attack got {val}, expected value in range 0 to 120')
|
|
161
|
+
self.setter('attack', util.lin_set(0, 120, val))
|
|
162
162
|
|
|
163
163
|
@property
|
|
164
164
|
def hold(self) -> Union[float, int]:
|
|
165
|
-
val = util.log_get(0.02, 2000, self.getter(
|
|
165
|
+
val = util.log_get(0.02, 2000, self.getter('hold')[0])
|
|
166
166
|
return round(val, 1) if val < 100 else int(val)
|
|
167
167
|
|
|
168
168
|
@hold.setter
|
|
169
169
|
def hold(self, val: float):
|
|
170
170
|
if not 0.02 <= val <= 2000:
|
|
171
171
|
self.logger.warning(
|
|
172
|
-
f
|
|
172
|
+
f'hold got {val}, expected value in range 0.02 to 2000.0'
|
|
173
173
|
)
|
|
174
|
-
self.setter(
|
|
174
|
+
self.setter('hold', util.log_set(0.02, 2000, val))
|
|
175
175
|
|
|
176
176
|
@property
|
|
177
177
|
def release(self) -> int:
|
|
178
|
-
return int(util.log_get(5, 4000, self.getter(
|
|
178
|
+
return int(util.log_get(5, 4000, self.getter('release')[0]))
|
|
179
179
|
|
|
180
180
|
@release.setter
|
|
181
181
|
def release(self, val: int):
|
|
182
182
|
if not 5 <= val <= 4000:
|
|
183
|
-
self.logger.warning(f
|
|
184
|
-
self.setter(
|
|
183
|
+
self.logger.warning(f'release got {val}, expected value in range 5 to 4000')
|
|
184
|
+
self.setter('release', util.log_set(5, 4000, val))
|
|
185
185
|
|
|
186
186
|
@property
|
|
187
187
|
def keysource(self):
|
|
188
|
-
return self.getter(
|
|
188
|
+
return self.getter('keysrc')[0]
|
|
189
189
|
|
|
190
190
|
@keysource.setter
|
|
191
191
|
def keysource(self, val):
|
|
192
|
-
self.setter(
|
|
192
|
+
self.setter('keysrc', val)
|
|
193
193
|
|
|
194
194
|
@property
|
|
195
195
|
def filteron(self):
|
|
196
|
-
return self.getter(
|
|
196
|
+
return self.getter('filter/on')[0] == 1
|
|
197
197
|
|
|
198
198
|
@filteron.setter
|
|
199
199
|
def filteron(self, val: bool):
|
|
200
|
-
self.setter(
|
|
200
|
+
self.setter('filter/on', 1 if val else 0)
|
|
201
201
|
|
|
202
202
|
@property
|
|
203
203
|
def filtertype(self) -> int:
|
|
204
|
-
return int(self.getter(
|
|
204
|
+
return int(self.getter('filter/type')[0])
|
|
205
205
|
|
|
206
206
|
@filtertype.setter
|
|
207
207
|
def filtertype(self, val: int):
|
|
208
|
-
self.setter(
|
|
208
|
+
self.setter('filter/type', val)
|
|
209
209
|
|
|
210
210
|
@property
|
|
211
211
|
def filterfreq(self) -> Union[float, int]:
|
|
212
|
-
retval = util.log_get(20, 20000, self.getter(
|
|
212
|
+
retval = util.log_get(20, 20000, self.getter('filter/f')[0])
|
|
213
213
|
return int(retval) if retval > 1000 else round(retval, 1)
|
|
214
214
|
|
|
215
215
|
@filterfreq.setter
|
|
216
216
|
def filterfreq(self, val: Union[float, int]):
|
|
217
217
|
if not 20 <= val <= 20000:
|
|
218
218
|
self.logger.warning(
|
|
219
|
-
f
|
|
219
|
+
f'filterfreq got {val}, expected value in range 20 to 20000'
|
|
220
220
|
)
|
|
221
|
-
self.setter(
|
|
221
|
+
self.setter('filter/f', util.log_set(20, 20000, val))
|
|
222
222
|
|
|
223
223
|
|
|
224
224
|
class Dyn:
|
|
225
225
|
@property
|
|
226
226
|
def address(self) -> str:
|
|
227
227
|
root = super(Dyn, self).address
|
|
228
|
-
return f
|
|
228
|
+
return f'{root}/dyn'
|
|
229
229
|
|
|
230
230
|
@property
|
|
231
231
|
def on(self) -> bool:
|
|
232
|
-
return self.getter(
|
|
232
|
+
return self.getter('on')[0] == 1
|
|
233
233
|
|
|
234
234
|
@on.setter
|
|
235
235
|
def on(self, val: bool):
|
|
236
|
-
self.setter(
|
|
236
|
+
self.setter('on', 1 if val else 0)
|
|
237
237
|
|
|
238
238
|
@property
|
|
239
239
|
def mode(self) -> str:
|
|
240
|
-
opts = (
|
|
241
|
-
return opts[self.getter(
|
|
240
|
+
opts = ('comp', 'exp')
|
|
241
|
+
return opts[self.getter('mode')[0]]
|
|
242
242
|
|
|
243
243
|
@mode.setter
|
|
244
244
|
def mode(self, val: str):
|
|
245
|
-
opts = (
|
|
245
|
+
opts = ('comp', 'exp')
|
|
246
246
|
if val not in opts:
|
|
247
|
-
self.logger.warning(f
|
|
248
|
-
self.setter(
|
|
247
|
+
self.logger.warning(f'mode got {val}, expected one of {opts}')
|
|
248
|
+
self.setter('mode', opts.index(val))
|
|
249
249
|
|
|
250
250
|
@property
|
|
251
251
|
def det(self) -> str:
|
|
252
|
-
opts = (
|
|
253
|
-
return opts[self.getter(
|
|
252
|
+
opts = ('peak', 'rms')
|
|
253
|
+
return opts[self.getter('det')[0]]
|
|
254
254
|
|
|
255
255
|
@det.setter
|
|
256
256
|
def det(self, val: str):
|
|
257
|
-
opts = (
|
|
257
|
+
opts = ('peak', 'rms')
|
|
258
258
|
if val not in opts:
|
|
259
|
-
self.logger.warning(f
|
|
260
|
-
self.setter(
|
|
259
|
+
self.logger.warning(f'det got {val}, expected one of {opts}')
|
|
260
|
+
self.setter('det', opts.index(val))
|
|
261
261
|
|
|
262
262
|
@property
|
|
263
263
|
def env(self) -> str:
|
|
264
|
-
opts = (
|
|
265
|
-
return opts[self.getter(
|
|
264
|
+
opts = ('lin', 'log')
|
|
265
|
+
return opts[self.getter('env')[0]]
|
|
266
266
|
|
|
267
267
|
@env.setter
|
|
268
268
|
def env(self, val: str):
|
|
269
|
-
opts = (
|
|
269
|
+
opts = ('lin', 'log')
|
|
270
270
|
if val not in opts:
|
|
271
|
-
self.logger.warning(f
|
|
272
|
-
self.setter(
|
|
271
|
+
self.logger.warning(f'env got {val}, expected one of {opts}')
|
|
272
|
+
self.setter('env', opts.index(val))
|
|
273
273
|
|
|
274
274
|
@property
|
|
275
275
|
def threshold(self) -> float:
|
|
276
|
-
return round(util.lin_get(-60, 0, self.getter(
|
|
276
|
+
return round(util.lin_get(-60, 0, self.getter('thr')[0]), 1)
|
|
277
277
|
|
|
278
278
|
@threshold.setter
|
|
279
279
|
def threshold(self, val: float):
|
|
280
280
|
if not -60 <= val <= 0:
|
|
281
281
|
self.logger.warning(
|
|
282
|
-
f
|
|
282
|
+
f'threshold got {val}, expected value in range -60.0 to 0'
|
|
283
283
|
)
|
|
284
|
-
self.setter(
|
|
284
|
+
self.setter('thr', util.lin_set(-60, 0, val))
|
|
285
285
|
|
|
286
286
|
@property
|
|
287
287
|
def ratio(self) -> Union[float, int]:
|
|
288
288
|
opts = (1.1, 1.3, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 7.0, 10, 20, 100)
|
|
289
|
-
return opts[self.getter(
|
|
289
|
+
return opts[self.getter('ratio')[0]]
|
|
290
290
|
|
|
291
291
|
@ratio.setter
|
|
292
292
|
def ratio(self, val: int):
|
|
293
|
-
self.setter(
|
|
293
|
+
self.setter('ratio', val)
|
|
294
294
|
|
|
295
295
|
@property
|
|
296
296
|
def knee(self) -> int:
|
|
297
|
-
return int(util.lin_get(0, 5, self.getter(
|
|
297
|
+
return int(util.lin_get(0, 5, self.getter('knee')[0]))
|
|
298
298
|
|
|
299
299
|
@knee.setter
|
|
300
300
|
def knee(self, val: int):
|
|
301
301
|
if not 0 <= val <= 5:
|
|
302
|
-
self.logger.warning(f
|
|
303
|
-
self.setter(
|
|
302
|
+
self.logger.warning(f'knee got {val}, expected value in range 0 to 5')
|
|
303
|
+
self.setter('knee', util.lin_set(0, 5, val))
|
|
304
304
|
|
|
305
305
|
@property
|
|
306
306
|
def mgain(self) -> float:
|
|
307
|
-
return round(util.lin_get(0, 24, self.getter(
|
|
307
|
+
return round(util.lin_get(0, 24, self.getter('mgain')[0]), 1)
|
|
308
308
|
|
|
309
309
|
@mgain.setter
|
|
310
310
|
def mgain(self, val: float):
|
|
311
311
|
if not 0 <= val <= 24:
|
|
312
|
-
self.logger.warning(f
|
|
313
|
-
self.setter(
|
|
312
|
+
self.logger.warning(f'mgain got {val}, expected value in range 0.0 to 24.0')
|
|
313
|
+
self.setter('mgain', util.lin_set(0, 24, val))
|
|
314
314
|
|
|
315
315
|
@property
|
|
316
316
|
def attack(self) -> int:
|
|
317
|
-
return int(util.lin_get(0, 120, self.getter(
|
|
317
|
+
return int(util.lin_get(0, 120, self.getter('attack')[0]))
|
|
318
318
|
|
|
319
319
|
@attack.setter
|
|
320
320
|
def attack(self, val: int):
|
|
321
321
|
if not 0 <= val <= 120:
|
|
322
|
-
self.logger.warning(f
|
|
323
|
-
self.setter(
|
|
322
|
+
self.logger.warning(f'attack got {val}, expected value in range 0 to 120')
|
|
323
|
+
self.setter('attack', util.lin_set(0, 120, val))
|
|
324
324
|
|
|
325
325
|
@property
|
|
326
326
|
def hold(self) -> Union[float, int]:
|
|
327
|
-
val = util.log_get(0.02, 2000, self.getter(
|
|
327
|
+
val = util.log_get(0.02, 2000, self.getter('hold')[0])
|
|
328
328
|
return round(val, 1) if val < 100 else int(val)
|
|
329
329
|
|
|
330
330
|
@hold.setter
|
|
331
331
|
def hold(self, val: float):
|
|
332
332
|
if not 0.02 <= val <= 2000:
|
|
333
333
|
self.logger.warning(
|
|
334
|
-
f
|
|
334
|
+
f'hold got {val}, expected value in range 0.02 to 2000.0'
|
|
335
335
|
)
|
|
336
|
-
self.setter(
|
|
336
|
+
self.setter('hold', util.log_set(0.02, 2000, val))
|
|
337
337
|
|
|
338
338
|
@property
|
|
339
339
|
def release(self) -> int:
|
|
340
|
-
return int(util.log_get(5, 4000, self.getter(
|
|
340
|
+
return int(util.log_get(5, 4000, self.getter('release')[0]))
|
|
341
341
|
|
|
342
342
|
@release.setter
|
|
343
343
|
def release(self, val: int):
|
|
344
344
|
if not 5 <= val <= 4000:
|
|
345
|
-
self.logger.warning(f
|
|
346
|
-
self.setter(
|
|
345
|
+
self.logger.warning(f'release got {val}, expected value in range 5 to 4000')
|
|
346
|
+
self.setter('release', util.log_set(5, 4000, val))
|
|
347
347
|
|
|
348
348
|
@property
|
|
349
349
|
def mix(self) -> int:
|
|
350
|
-
return int(util.lin_get(0, 100, self.getter(
|
|
350
|
+
return int(util.lin_get(0, 100, self.getter('mix')[0]))
|
|
351
351
|
|
|
352
352
|
@mix.setter
|
|
353
353
|
def mix(self, val: int):
|
|
354
354
|
if not 0 <= val <= 100:
|
|
355
|
-
self.logger.warning(f
|
|
356
|
-
self.setter(
|
|
355
|
+
self.logger.warning(f'mix got {val}, expected value in range 0 to 100')
|
|
356
|
+
self.setter('mix', util.lin_set(0, 100, val))
|
|
357
357
|
|
|
358
358
|
@property
|
|
359
359
|
def keysource(self):
|
|
360
|
-
return self.getter(
|
|
360
|
+
return self.getter('keysrc')[0]
|
|
361
361
|
|
|
362
362
|
@keysource.setter
|
|
363
363
|
def keysource(self, val):
|
|
364
|
-
self.setter(
|
|
364
|
+
self.setter('keysrc', val)
|
|
365
365
|
|
|
366
366
|
@property
|
|
367
367
|
def auto(self) -> bool:
|
|
368
|
-
return self.getter(
|
|
368
|
+
return self.getter('auto')[0] == 1
|
|
369
369
|
|
|
370
370
|
@auto.setter
|
|
371
371
|
def auto(self, val: bool):
|
|
372
|
-
self.setter(
|
|
372
|
+
self.setter('auto', 1 if val else 0)
|
|
373
373
|
|
|
374
374
|
@property
|
|
375
375
|
def filteron(self):
|
|
376
|
-
return self.getter(
|
|
376
|
+
return self.getter('filter/on')[0] == 1
|
|
377
377
|
|
|
378
378
|
@filteron.setter
|
|
379
379
|
def filteron(self, val: bool):
|
|
380
|
-
self.setter(
|
|
380
|
+
self.setter('filter/on', 1 if val else 0)
|
|
381
381
|
|
|
382
382
|
@property
|
|
383
383
|
def filtertype(self) -> int:
|
|
384
|
-
return int(self.getter(
|
|
384
|
+
return int(self.getter('filter/type')[0])
|
|
385
385
|
|
|
386
386
|
@filtertype.setter
|
|
387
387
|
def filtertype(self, val: int):
|
|
388
|
-
self.setter(
|
|
388
|
+
self.setter('filter/type', val)
|
|
389
389
|
|
|
390
390
|
@property
|
|
391
391
|
def filterfreq(self) -> Union[float, int]:
|
|
392
|
-
retval = util.log_get(20, 20000, self.getter(
|
|
392
|
+
retval = util.log_get(20, 20000, self.getter('filter/f')[0])
|
|
393
393
|
return int(retval) if retval > 1000 else round(retval, 1)
|
|
394
394
|
|
|
395
395
|
@filterfreq.setter
|
|
396
396
|
def filterfreq(self, val: Union[float, int]):
|
|
397
397
|
if not 20 <= val <= 20000:
|
|
398
398
|
self.logger.warning(
|
|
399
|
-
f
|
|
399
|
+
f'filterfreq got {val}, expected value in range 20 to 20000'
|
|
400
400
|
)
|
|
401
|
-
self.setter(
|
|
401
|
+
self.setter('filter/f', util.log_set(20, 20000, val))
|
|
402
402
|
|
|
403
403
|
|
|
404
404
|
class Insert:
|
|
405
405
|
@property
|
|
406
406
|
def address(self) -> str:
|
|
407
407
|
root = super(Insert, self).address
|
|
408
|
-
return f
|
|
408
|
+
return f'{root}/insert'
|
|
409
409
|
|
|
410
410
|
@property
|
|
411
411
|
def on(self) -> bool:
|
|
412
|
-
return self.getter(
|
|
412
|
+
return self.getter('on')[0] == 1
|
|
413
413
|
|
|
414
414
|
@on.setter
|
|
415
415
|
def on(self, val: bool):
|
|
416
|
-
self.setter(
|
|
416
|
+
self.setter('on', 1 if val else 0)
|
|
417
417
|
|
|
418
418
|
@property
|
|
419
419
|
def sel(self) -> int:
|
|
420
|
-
return self.getter(
|
|
420
|
+
return self.getter('sel')[0]
|
|
421
421
|
|
|
422
422
|
@sel.setter
|
|
423
423
|
def sel(self, val: int):
|
|
424
|
-
self.setter(
|
|
424
|
+
self.setter('sel', val)
|
|
425
425
|
|
|
426
426
|
|
|
427
427
|
class EQ:
|
|
428
428
|
@classmethod
|
|
429
429
|
def make_fourband(cls, _cls, remote, index=None):
|
|
430
|
-
EQBand_cls = type(
|
|
430
|
+
EQBand_cls = type('EQBand', (EQ.EQBand, _cls), {})
|
|
431
431
|
return type(
|
|
432
|
-
|
|
432
|
+
'EQ',
|
|
433
433
|
(cls,),
|
|
434
434
|
{
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
435
|
+
'low': EQBand_cls(1, remote, index),
|
|
436
|
+
'lomid': EQBand_cls(2, remote, index),
|
|
437
|
+
'himid': EQBand_cls(3, remote, index),
|
|
438
|
+
'high': EQBand_cls(4, remote, index),
|
|
439
439
|
},
|
|
440
440
|
)
|
|
441
441
|
|
|
442
442
|
@classmethod
|
|
443
443
|
def make_sixband(cls, _cls, remote, index=None):
|
|
444
|
-
EQBand_cls = type(
|
|
444
|
+
EQBand_cls = type('EQBand', (EQ.EQBand, _cls), {})
|
|
445
445
|
return type(
|
|
446
|
-
|
|
446
|
+
'EQ',
|
|
447
447
|
(cls,),
|
|
448
448
|
{
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
449
|
+
'low': EQBand_cls(1, remote, index),
|
|
450
|
+
'low2': EQBand_cls(2, remote, index),
|
|
451
|
+
'lomid': EQBand_cls(3, remote, index),
|
|
452
|
+
'himid': EQBand_cls(4, remote, index),
|
|
453
|
+
'high2': EQBand_cls(5, remote, index),
|
|
454
|
+
'high': EQBand_cls(6, remote, index),
|
|
455
455
|
},
|
|
456
456
|
)
|
|
457
457
|
|
|
458
458
|
@property
|
|
459
459
|
def address(self) -> str:
|
|
460
460
|
root = super(EQ, self).address
|
|
461
|
-
return f
|
|
461
|
+
return f'{root}/eq'
|
|
462
462
|
|
|
463
463
|
@property
|
|
464
464
|
def on(self) -> bool:
|
|
465
|
-
return self.getter(
|
|
465
|
+
return self.getter('on')[0] == 1
|
|
466
466
|
|
|
467
467
|
@on.setter
|
|
468
468
|
def on(self, val: bool):
|
|
469
|
-
self.setter(
|
|
469
|
+
self.setter('on', 1 if val else 0)
|
|
470
470
|
|
|
471
471
|
@property
|
|
472
472
|
def mode(self) -> str:
|
|
473
|
-
opts = (
|
|
474
|
-
return opts[self.getter(
|
|
473
|
+
opts = ('peq', 'geq', 'teq')
|
|
474
|
+
return opts[self.getter('mode')[0]]
|
|
475
475
|
|
|
476
476
|
@mode.setter
|
|
477
477
|
def mode(self, val: str):
|
|
478
|
-
opts = (
|
|
478
|
+
opts = ('peq', 'geq', 'teq')
|
|
479
479
|
if val not in opts:
|
|
480
|
-
self.logger.warning(f
|
|
481
|
-
self.setter(
|
|
480
|
+
self.logger.warning(f'mode got {val}, expected one of {opts}')
|
|
481
|
+
self.setter('mode', opts.index(val))
|
|
482
482
|
|
|
483
483
|
class EQBand:
|
|
484
484
|
def __init__(self, i, remote, index):
|
|
@@ -488,53 +488,53 @@ class EQ:
|
|
|
488
488
|
@property
|
|
489
489
|
def address(self) -> str:
|
|
490
490
|
root = super(EQ.EQBand, self).address
|
|
491
|
-
return f
|
|
491
|
+
return f'{root}/eq/{self.i}'
|
|
492
492
|
|
|
493
493
|
@property
|
|
494
494
|
def type(self) -> int:
|
|
495
|
-
return int(self.getter(
|
|
495
|
+
return int(self.getter('type')[0])
|
|
496
496
|
|
|
497
497
|
@type.setter
|
|
498
498
|
def type(self, val: int):
|
|
499
|
-
self.setter(
|
|
499
|
+
self.setter('type', val)
|
|
500
500
|
|
|
501
501
|
@property
|
|
502
502
|
def frequency(self) -> float:
|
|
503
|
-
retval = util.log_get(20, 20000, self.getter(
|
|
503
|
+
retval = util.log_get(20, 20000, self.getter('f')[0])
|
|
504
504
|
return round(retval, 1)
|
|
505
505
|
|
|
506
506
|
@frequency.setter
|
|
507
507
|
def frequency(self, val: float):
|
|
508
508
|
if not 20 <= val <= 20000:
|
|
509
509
|
self.logger.warning(
|
|
510
|
-
f
|
|
510
|
+
f'frequency got {val}, expected value in range 20.0 to 20000.0'
|
|
511
511
|
)
|
|
512
|
-
self.setter(
|
|
512
|
+
self.setter('f', util.log_set(20, 20000, val))
|
|
513
513
|
|
|
514
514
|
@property
|
|
515
515
|
def gain(self) -> float:
|
|
516
|
-
return round(util.lin_get(-15, 15, self.getter(
|
|
516
|
+
return round(util.lin_get(-15, 15, self.getter('g')[0]), 1)
|
|
517
517
|
|
|
518
518
|
@gain.setter
|
|
519
519
|
def gain(self, val: float):
|
|
520
520
|
if not -15 <= val <= 15:
|
|
521
521
|
self.logger.warning(
|
|
522
|
-
f
|
|
522
|
+
f'gain got {val}, expected value in range -15.0 to 15.0'
|
|
523
523
|
)
|
|
524
|
-
self.setter(
|
|
524
|
+
self.setter('g', util.lin_set(-15, 15, val))
|
|
525
525
|
|
|
526
526
|
@property
|
|
527
527
|
def quality(self) -> float:
|
|
528
|
-
retval = util.log_get(0.3, 10, self.getter(
|
|
528
|
+
retval = util.log_get(0.3, 10, self.getter('q')[0])
|
|
529
529
|
return round(retval, 1)
|
|
530
530
|
|
|
531
531
|
@quality.setter
|
|
532
532
|
def quality(self, val: float):
|
|
533
533
|
if not 0.3 <= val <= 10:
|
|
534
534
|
self.logger.warning(
|
|
535
|
-
f
|
|
535
|
+
f'quality got {val}, expected value in range 0.3 to 10.0'
|
|
536
536
|
)
|
|
537
|
-
self.setter(
|
|
537
|
+
self.setter('q', util.log_set(0.3, 10, val))
|
|
538
538
|
|
|
539
539
|
|
|
540
540
|
class GEQ:
|
|
@@ -561,90 +561,90 @@ class GEQ:
|
|
|
561
561
|
@property
|
|
562
562
|
def address(self) -> str:
|
|
563
563
|
root = super(GEQ, self).address
|
|
564
|
-
return f
|
|
564
|
+
return f'{root}/geq'
|
|
565
565
|
|
|
566
566
|
|
|
567
567
|
class Mix:
|
|
568
568
|
@property
|
|
569
569
|
def address(self) -> str:
|
|
570
570
|
root = super(Mix, self).address
|
|
571
|
-
return f
|
|
571
|
+
return f'{root}/mix'
|
|
572
572
|
|
|
573
573
|
@property
|
|
574
574
|
def on(self) -> bool:
|
|
575
|
-
return self.getter(
|
|
575
|
+
return self.getter('on')[0] == 1
|
|
576
576
|
|
|
577
577
|
@on.setter
|
|
578
578
|
def on(self, val: bool):
|
|
579
|
-
self.setter(
|
|
579
|
+
self.setter('on', 1 if val else 0)
|
|
580
580
|
|
|
581
581
|
@property
|
|
582
582
|
@util.db_from
|
|
583
583
|
def fader(self) -> float:
|
|
584
|
-
return self.getter(
|
|
584
|
+
return self.getter('fader')[0]
|
|
585
585
|
|
|
586
586
|
@fader.setter
|
|
587
587
|
@util.db_to
|
|
588
588
|
def fader(self, val: float):
|
|
589
|
-
self.setter(
|
|
589
|
+
self.setter('fader', val)
|
|
590
590
|
|
|
591
591
|
@property
|
|
592
592
|
def lr(self) -> bool:
|
|
593
|
-
return self.getter(
|
|
593
|
+
return self.getter('lr')[0] == 1
|
|
594
594
|
|
|
595
595
|
@lr.setter
|
|
596
596
|
def lr(self, val: bool):
|
|
597
|
-
self.setter(
|
|
597
|
+
self.setter('lr', 1 if val else 0)
|
|
598
598
|
|
|
599
599
|
|
|
600
600
|
class Group:
|
|
601
601
|
@property
|
|
602
602
|
def address(self) -> str:
|
|
603
603
|
root = super(Group, self).address
|
|
604
|
-
return f
|
|
604
|
+
return f'{root}/grp'
|
|
605
605
|
|
|
606
606
|
@property
|
|
607
607
|
def dca(self) -> int:
|
|
608
|
-
return self.getter(
|
|
608
|
+
return self.getter('dca')[0]
|
|
609
609
|
|
|
610
610
|
@dca.setter
|
|
611
611
|
def dca(self, val: int):
|
|
612
|
-
self.setter(
|
|
612
|
+
self.setter('dca', val)
|
|
613
613
|
|
|
614
614
|
@property
|
|
615
615
|
def mute(self) -> int:
|
|
616
|
-
return self.getter(
|
|
616
|
+
return self.getter('mute')[0]
|
|
617
617
|
|
|
618
618
|
@mute.setter
|
|
619
619
|
def mute(self, val: int):
|
|
620
|
-
self.setter(
|
|
620
|
+
self.setter('mute', val)
|
|
621
621
|
|
|
622
622
|
|
|
623
623
|
class Automix:
|
|
624
624
|
@property
|
|
625
625
|
def address(self) -> str:
|
|
626
626
|
root = super(Automix, self).address
|
|
627
|
-
return f
|
|
627
|
+
return f'{root}/automix'
|
|
628
628
|
|
|
629
629
|
@property
|
|
630
630
|
def group(self) -> int:
|
|
631
|
-
return self.getter(
|
|
631
|
+
return self.getter('group')[0]
|
|
632
632
|
|
|
633
633
|
@group.setter
|
|
634
634
|
def group(self, val: int):
|
|
635
|
-
self.setter(
|
|
635
|
+
self.setter('group', val)
|
|
636
636
|
|
|
637
637
|
@property
|
|
638
638
|
def weight(self) -> float:
|
|
639
|
-
return round(util.lin_get(-12, 12, self.getter(
|
|
639
|
+
return round(util.lin_get(-12, 12, self.getter('weight')[0]), 1)
|
|
640
640
|
|
|
641
641
|
@weight.setter
|
|
642
642
|
def weight(self, val: float):
|
|
643
643
|
if not -12 <= val <= 12:
|
|
644
644
|
self.logger.warning(
|
|
645
|
-
f
|
|
645
|
+
f'weight got {val}, expected value in range -12.0 to 12.0'
|
|
646
646
|
)
|
|
647
|
-
self.setter(
|
|
647
|
+
self.setter('weight', util.lin_set(-12, 12, val))
|
|
648
648
|
|
|
649
649
|
|
|
650
650
|
class Send:
|
|
@@ -654,20 +654,20 @@ class Send:
|
|
|
654
654
|
|
|
655
655
|
@classmethod
|
|
656
656
|
def make(cls, _cls, i, remote, index=None):
|
|
657
|
-
SEND_cls = type(
|
|
657
|
+
SEND_cls = type('Send', (cls, _cls), {})
|
|
658
658
|
return SEND_cls(i, remote, index)
|
|
659
659
|
|
|
660
660
|
@property
|
|
661
661
|
def address(self) -> str:
|
|
662
662
|
root = super(Send, self).address
|
|
663
|
-
return f
|
|
663
|
+
return f'{root}/mix/{str(self.i).zfill(2)}'
|
|
664
664
|
|
|
665
665
|
@property
|
|
666
666
|
@util.db_from
|
|
667
667
|
def level(self) -> float:
|
|
668
|
-
return self.getter(
|
|
668
|
+
return self.getter('level')[0]
|
|
669
669
|
|
|
670
670
|
@level.setter
|
|
671
671
|
@util.db_to
|
|
672
672
|
def level(self, val: float):
|
|
673
|
-
self.setter(
|
|
673
|
+
self.setter('level', val)
|