evo8-linux 0.1.0__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.
- evo8/__init__.py +3 -0
- evo8/about.py +131 -0
- evo8/alsa.py +77 -0
- evo8/apps.py +76 -0
- evo8/calibrate.py +159 -0
- evo8/cli.py +214 -0
- evo8/data/__init__.py +0 -0
- evo8/data/applications/evo8-mixer.desktop +8 -0
- evo8/data/evo8-mixer.svg +38 -0
- evo8/data/pipewire/pipewire-pulse.conf.d/20-bloquear-volumen-micro.conf +16 -0
- evo8/data/pipewire/pipewire.conf.d/20-mezcla.conf +158 -0
- evo8/data/systemd/evo8-restore.service +8 -0
- evo8/data/udev/70-audient-evo8.rules +7 -0
- evo8/gui/__init__.py +1 -0
- evo8/gui/app.py +92 -0
- evo8/gui/backend.py +485 -0
- evo8/gui/meters.py +86 -0
- evo8/gui/qml/AboutPage.qml +257 -0
- evo8/gui/qml/CardProfiles.qml +118 -0
- evo8/gui/qml/ConsolePage.qml +255 -0
- evo8/gui/qml/Divider.qml +8 -0
- evo8/gui/qml/GlyphButton.qml +30 -0
- evo8/gui/qml/HardwarePage.qml +603 -0
- evo8/gui/qml/HwMixStrip.qml +178 -0
- evo8/gui/qml/Main.qml +139 -0
- evo8/gui/qml/PixelSlider.qml +80 -0
- evo8/gui/qml/Strip.qml +396 -0
- evo8/gui/qml/StripGroup.qml +23 -0
- evo8/gui/qml/Theme.qml +22 -0
- evo8/gui/qml/Tip.qml +20 -0
- evo8/gui/qml/Toggle.qml +41 -0
- evo8/gui/qml/VMeter.qml +28 -0
- evo8/gui/qml/format.js +88 -0
- evo8/gui/qml/qmldir +14 -0
- evo8/gui/snapshot.py +98 -0
- evo8/hw.py +147 -0
- evo8/mix.py +109 -0
- evo8/monitor.py +229 -0
- evo8/profiles.py +112 -0
- evo8/pw.py +164 -0
- evo8/state.py +45 -0
- evo8/usb.py +122 -0
- evo8/user_setup.py +224 -0
- evo8_linux-0.1.0.dist-info/METADATA +198 -0
- evo8_linux-0.1.0.dist-info/RECORD +49 -0
- evo8_linux-0.1.0.dist-info/WHEEL +5 -0
- evo8_linux-0.1.0.dist-info/entry_points.txt +5 -0
- evo8_linux-0.1.0.dist-info/licenses/LICENSE +21 -0
- evo8_linux-0.1.0.dist-info/top_level.txt +1 -0
evo8/gui/qml/Strip.qml
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import "."
|
|
3
|
+
import "format.js" as F
|
|
4
|
+
|
|
5
|
+
// One channel strip, top to bottom:
|
|
6
|
+
// title / subtitle
|
|
7
|
+
// optional top control (PRE gain, Compartido listening level) + its reset
|
|
8
|
+
// share + mute buttons
|
|
9
|
+
// meter(s) beside an upright fader with its standard position marked
|
|
10
|
+
// value + reset
|
|
11
|
+
// optional bottom control (Compartido's sync delay) + reset
|
|
12
|
+
// optional MONITOR switch
|
|
13
|
+
Item {
|
|
14
|
+
id: strip
|
|
15
|
+
property string title: ""
|
|
16
|
+
property string subtitle: ""
|
|
17
|
+
property bool master: false
|
|
18
|
+
|
|
19
|
+
property string topLabel: ""
|
|
20
|
+
property bool topEnabled: true
|
|
21
|
+
property real topValue: 0
|
|
22
|
+
property real topMinimum: 0
|
|
23
|
+
property real topMaximum: 1
|
|
24
|
+
property real topStep: 0.01
|
|
25
|
+
property string topText: ""
|
|
26
|
+
property real topStandard: NaN
|
|
27
|
+
property string topTip: ""
|
|
28
|
+
|
|
29
|
+
property bool faderEnabled: true
|
|
30
|
+
property bool faderVisible: true
|
|
31
|
+
property string noFaderText: ""
|
|
32
|
+
property real value: 0
|
|
33
|
+
property real minimum: 0
|
|
34
|
+
property real maximum: 1
|
|
35
|
+
property real step: 0.01
|
|
36
|
+
property real standard: NaN
|
|
37
|
+
property string valueText: ""
|
|
38
|
+
property real meterLeft: -1
|
|
39
|
+
property real meterRight: -1
|
|
40
|
+
property bool muted: false
|
|
41
|
+
property bool showMute: true
|
|
42
|
+
property bool shareVisible: false
|
|
43
|
+
property bool sharedOn: false
|
|
44
|
+
|
|
45
|
+
property string bottomLabel: ""
|
|
46
|
+
property bool bottomEnabled: true
|
|
47
|
+
property real bottomValue: 0
|
|
48
|
+
property real bottomMaximum: 1
|
|
49
|
+
property real bottomStep: 1
|
|
50
|
+
property string bottomText: ""
|
|
51
|
+
property real bottomStandard: NaN
|
|
52
|
+
property string bottomTip: ""
|
|
53
|
+
|
|
54
|
+
// Optional button under the bottom control (Compartido: calibrate).
|
|
55
|
+
property string actionText: ""
|
|
56
|
+
property bool actionEnabled: true
|
|
57
|
+
property string actionTip: ""
|
|
58
|
+
signal actionClicked()
|
|
59
|
+
|
|
60
|
+
property bool monitorVisible: false
|
|
61
|
+
property bool monitorChecked: false
|
|
62
|
+
property bool monitorEnabled: true
|
|
63
|
+
property string monitorTip: ""
|
|
64
|
+
|
|
65
|
+
signal moved(real value)
|
|
66
|
+
signal topMoved(real value)
|
|
67
|
+
signal bottomMoved(real value)
|
|
68
|
+
signal muteToggled()
|
|
69
|
+
signal shareToggled()
|
|
70
|
+
signal monitorToggled()
|
|
71
|
+
|
|
72
|
+
readonly property bool hasStandard: !isNaN(standard)
|
|
73
|
+
// Width of a regular strip (the master is 1.3×) and fader height; the
|
|
74
|
+
// console sets both so the strips fill the window.
|
|
75
|
+
property real unit: Theme.stripWidth
|
|
76
|
+
property real faderHeight: Theme.faderHeight
|
|
77
|
+
// Everything but the fader, summed from the other children (the
|
|
78
|
+
// column's own height includes the fader: that would be a binding loop).
|
|
79
|
+
readonly property real chromeHeight: {
|
|
80
|
+
var h = 16, n = 0
|
|
81
|
+
for (var i = 0; i < column.children.length; i++) {
|
|
82
|
+
var c = column.children[i]
|
|
83
|
+
if (c === faderArea || !c.visible) continue
|
|
84
|
+
h += c.height
|
|
85
|
+
n++
|
|
86
|
+
}
|
|
87
|
+
return h + column.spacing * n
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
width: master ? unit * 1.3 : unit
|
|
91
|
+
height: column.implicitHeight + 16
|
|
92
|
+
|
|
93
|
+
Rectangle {
|
|
94
|
+
anchors.fill: parent
|
|
95
|
+
radius: Theme.radius
|
|
96
|
+
color: Theme.alpha(Theme.foreground, strip.master ? 0.07 : 0.03)
|
|
97
|
+
border.width: strip.master ? 1 : 0
|
|
98
|
+
border.color: Theme.alpha(Theme.foreground, 0.28)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Label + reset on one line, the slider, the value underneath.
|
|
102
|
+
component SmallControl: Column {
|
|
103
|
+
id: sc
|
|
104
|
+
property string label: ""
|
|
105
|
+
property bool controlEnabled: true
|
|
106
|
+
property real val: 0
|
|
107
|
+
property real minimum: 0
|
|
108
|
+
property real maximum: 1
|
|
109
|
+
property real step: 0.01
|
|
110
|
+
property string text: ""
|
|
111
|
+
property real standard: NaN
|
|
112
|
+
property string tip: ""
|
|
113
|
+
signal changed(real v)
|
|
114
|
+
width: parent.width
|
|
115
|
+
spacing: 3
|
|
116
|
+
|
|
117
|
+
Item {
|
|
118
|
+
width: parent.width
|
|
119
|
+
height: labelText.implicitHeight
|
|
120
|
+
opacity: sc.controlEnabled ? 1 : 0.45
|
|
121
|
+
Text {
|
|
122
|
+
id: labelText
|
|
123
|
+
text: sc.label
|
|
124
|
+
color: Theme.dim
|
|
125
|
+
font.family: Theme.font
|
|
126
|
+
font.pixelSize: Theme.caption
|
|
127
|
+
font.letterSpacing: 1.2
|
|
128
|
+
font.bold: true
|
|
129
|
+
MouseArea { id: labelMouse; anchors.fill: parent; hoverEnabled: true }
|
|
130
|
+
Tip { visible: labelMouse.containsMouse && sc.tip !== ""; text: sc.tip }
|
|
131
|
+
}
|
|
132
|
+
GlyphButton {
|
|
133
|
+
anchors.right: parent.right
|
|
134
|
+
anchors.verticalCenter: labelText.verticalCenter
|
|
135
|
+
visible: !isNaN(sc.standard)
|
|
136
|
+
text: ""
|
|
137
|
+
font.pixelSize: Theme.caption
|
|
138
|
+
active: sc.controlEnabled && !F.atDefault(sc.val, sc.standard, sc.step)
|
|
139
|
+
tip: "Volver al estándar"
|
|
140
|
+
onClicked: sc.changed(sc.standard)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
PixelSlider {
|
|
144
|
+
width: parent.width
|
|
145
|
+
minimum: sc.minimum
|
|
146
|
+
maximum: sc.maximum
|
|
147
|
+
step: sc.step
|
|
148
|
+
value: sc.val
|
|
149
|
+
enabled: sc.controlEnabled
|
|
150
|
+
onMoved: function(v) { sc.changed(v) }
|
|
151
|
+
}
|
|
152
|
+
Text {
|
|
153
|
+
width: parent.width
|
|
154
|
+
horizontalAlignment: Text.AlignHCenter
|
|
155
|
+
text: sc.text
|
|
156
|
+
color: sc.controlEnabled ? Theme.foreground : Theme.dim
|
|
157
|
+
font.family: Theme.font
|
|
158
|
+
font.pixelSize: Theme.caption
|
|
159
|
+
font.bold: true
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
Column {
|
|
164
|
+
id: column
|
|
165
|
+
anchors.left: parent.left
|
|
166
|
+
anchors.right: parent.right
|
|
167
|
+
anchors.top: parent.top
|
|
168
|
+
anchors.margins: 8
|
|
169
|
+
spacing: 8
|
|
170
|
+
|
|
171
|
+
Column {
|
|
172
|
+
width: parent.width
|
|
173
|
+
spacing: 1
|
|
174
|
+
Text {
|
|
175
|
+
width: parent.width
|
|
176
|
+
horizontalAlignment: Text.AlignHCenter
|
|
177
|
+
text: strip.title
|
|
178
|
+
color: Theme.foreground
|
|
179
|
+
font.family: Theme.font
|
|
180
|
+
font.pixelSize: Theme.body
|
|
181
|
+
font.bold: true
|
|
182
|
+
elide: Text.ElideRight
|
|
183
|
+
}
|
|
184
|
+
Text {
|
|
185
|
+
width: parent.width
|
|
186
|
+
horizontalAlignment: Text.AlignHCenter
|
|
187
|
+
text: strip.subtitle === "" ? " " : strip.subtitle
|
|
188
|
+
color: Theme.dim
|
|
189
|
+
font.family: Theme.font
|
|
190
|
+
font.pixelSize: Theme.caption
|
|
191
|
+
elide: Text.ElideRight
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Top control; an empty slot keeps every strip's fader aligned.
|
|
196
|
+
Item {
|
|
197
|
+
width: parent.width
|
|
198
|
+
height: 62
|
|
199
|
+
SmallControl {
|
|
200
|
+
visible: strip.topLabel !== ""
|
|
201
|
+
label: strip.topLabel
|
|
202
|
+
controlEnabled: strip.topEnabled
|
|
203
|
+
val: strip.topValue
|
|
204
|
+
minimum: strip.topMinimum
|
|
205
|
+
maximum: strip.topMaximum
|
|
206
|
+
step: strip.topStep
|
|
207
|
+
text: strip.topText
|
|
208
|
+
standard: strip.topStandard
|
|
209
|
+
tip: strip.topTip
|
|
210
|
+
onChanged: function(v) { strip.topMoved(v) }
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Share + mute.
|
|
215
|
+
Item {
|
|
216
|
+
width: parent.width
|
|
217
|
+
height: 26
|
|
218
|
+
Row {
|
|
219
|
+
anchors.centerIn: parent
|
|
220
|
+
spacing: 14
|
|
221
|
+
GlyphButton {
|
|
222
|
+
visible: strip.shareVisible
|
|
223
|
+
text: ""
|
|
224
|
+
font.pixelSize: Theme.title
|
|
225
|
+
color: strip.sharedOn ? Theme.foreground : Theme.dim
|
|
226
|
+
opacity: strip.sharedOn ? 1 : 0.55
|
|
227
|
+
active: strip.faderEnabled
|
|
228
|
+
tip: strip.sharedOn ? "En Compartido (entra a la Mezcla)" : "Enviar a Compartido"
|
|
229
|
+
onClicked: strip.shareToggled()
|
|
230
|
+
}
|
|
231
|
+
GlyphButton {
|
|
232
|
+
visible: strip.showMute
|
|
233
|
+
text: strip.muted ? "" : ""
|
|
234
|
+
font.pixelSize: Theme.title
|
|
235
|
+
color: strip.muted ? Theme.urgent : Theme.foreground
|
|
236
|
+
active: strip.faderEnabled
|
|
237
|
+
tip: strip.muted ? "Activar" : "Silenciar"
|
|
238
|
+
onClicked: strip.muteToggled()
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Meters beside the fader.
|
|
244
|
+
Item {
|
|
245
|
+
id: faderArea
|
|
246
|
+
width: parent.width
|
|
247
|
+
height: strip.faderHeight
|
|
248
|
+
|
|
249
|
+
Text {
|
|
250
|
+
visible: !strip.faderVisible
|
|
251
|
+
anchors.centerIn: parent
|
|
252
|
+
width: parent.width
|
|
253
|
+
horizontalAlignment: Text.AlignHCenter
|
|
254
|
+
wrapMode: Text.WordWrap
|
|
255
|
+
text: strip.noFaderText
|
|
256
|
+
color: Theme.dim
|
|
257
|
+
font.family: Theme.font
|
|
258
|
+
font.pixelSize: Theme.caption
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
Row {
|
|
262
|
+
visible: strip.faderVisible
|
|
263
|
+
anchors.centerIn: parent
|
|
264
|
+
height: parent.height
|
|
265
|
+
spacing: 4
|
|
266
|
+
|
|
267
|
+
VMeter { visible: strip.meterLeft >= 0; height: parent.height; level: strip.meterLeft }
|
|
268
|
+
VMeter { visible: strip.meterRight >= 0; height: parent.height; level: strip.meterRight }
|
|
269
|
+
Item { visible: strip.meterLeft >= 0; width: 8; height: 1 }
|
|
270
|
+
|
|
271
|
+
Item {
|
|
272
|
+
width: 30
|
|
273
|
+
height: parent.height
|
|
274
|
+
opacity: strip.faderEnabled ? (strip.muted ? 0.5 : 1) : 0.25
|
|
275
|
+
|
|
276
|
+
// Standard position mark.
|
|
277
|
+
Rectangle {
|
|
278
|
+
visible: strip.hasStandard
|
|
279
|
+
width: parent.width
|
|
280
|
+
height: 1
|
|
281
|
+
color: Theme.alpha(Theme.foreground, 0.35)
|
|
282
|
+
y: parent.height * (1 - (strip.standard - strip.minimum)
|
|
283
|
+
/ Math.max(0.0001, strip.maximum - strip.minimum))
|
|
284
|
+
}
|
|
285
|
+
PixelSlider {
|
|
286
|
+
anchors.centerIn: parent
|
|
287
|
+
width: parent.height
|
|
288
|
+
rotation: -90
|
|
289
|
+
minimum: strip.minimum
|
|
290
|
+
maximum: strip.maximum
|
|
291
|
+
step: strip.step
|
|
292
|
+
value: strip.value
|
|
293
|
+
enabled: strip.faderEnabled
|
|
294
|
+
onMoved: function(v) { strip.moved(v) }
|
|
295
|
+
onRightClicked: strip.muteToggled()
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Value and reset.
|
|
302
|
+
Item {
|
|
303
|
+
width: parent.width
|
|
304
|
+
height: valueText.implicitHeight
|
|
305
|
+
Text {
|
|
306
|
+
id: valueText
|
|
307
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
308
|
+
anchors.horizontalCenterOffset: strip.hasStandard ? -8 : 0
|
|
309
|
+
text: strip.muted ? "silencio" : strip.valueText
|
|
310
|
+
color: strip.muted ? Theme.urgent : Theme.foreground
|
|
311
|
+
font.family: Theme.font
|
|
312
|
+
font.pixelSize: Theme.caption
|
|
313
|
+
font.bold: true
|
|
314
|
+
}
|
|
315
|
+
GlyphButton {
|
|
316
|
+
anchors.left: valueText.right
|
|
317
|
+
anchors.leftMargin: 6
|
|
318
|
+
anchors.verticalCenter: valueText.verticalCenter
|
|
319
|
+
visible: strip.hasStandard
|
|
320
|
+
text: ""
|
|
321
|
+
font.pixelSize: Theme.caption
|
|
322
|
+
active: strip.faderEnabled && !F.atDefault(strip.value, strip.standard, strip.step)
|
|
323
|
+
tip: "Volver al estándar"
|
|
324
|
+
onClicked: strip.moved(strip.standard)
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
SmallControl {
|
|
329
|
+
visible: strip.bottomLabel !== ""
|
|
330
|
+
label: strip.bottomLabel
|
|
331
|
+
controlEnabled: strip.bottomEnabled
|
|
332
|
+
val: strip.bottomValue
|
|
333
|
+
minimum: 0
|
|
334
|
+
maximum: strip.bottomMaximum
|
|
335
|
+
step: strip.bottomStep
|
|
336
|
+
text: strip.bottomText
|
|
337
|
+
standard: strip.bottomStandard
|
|
338
|
+
tip: strip.bottomTip
|
|
339
|
+
onChanged: function(v) { strip.bottomMoved(v) }
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
Rectangle {
|
|
343
|
+
visible: strip.actionText !== ""
|
|
344
|
+
width: parent.width
|
|
345
|
+
height: actionLabel.implicitHeight + 10
|
|
346
|
+
radius: Theme.radius
|
|
347
|
+
opacity: strip.actionEnabled ? 1 : 0.5
|
|
348
|
+
color: actionMouse.containsMouse && strip.actionEnabled ? Theme.alpha(Theme.foreground, 0.12) : "transparent"
|
|
349
|
+
border.width: 1
|
|
350
|
+
border.color: Theme.alpha(Theme.foreground, strip.actionEnabled ? 0.45 : 0.2)
|
|
351
|
+
Text {
|
|
352
|
+
id: actionLabel
|
|
353
|
+
anchors.centerIn: parent
|
|
354
|
+
text: strip.actionText
|
|
355
|
+
color: Theme.foreground
|
|
356
|
+
font.family: Theme.font
|
|
357
|
+
font.pixelSize: Theme.caption
|
|
358
|
+
}
|
|
359
|
+
MouseArea {
|
|
360
|
+
id: actionMouse
|
|
361
|
+
anchors.fill: parent
|
|
362
|
+
enabled: strip.actionEnabled
|
|
363
|
+
hoverEnabled: true
|
|
364
|
+
cursorShape: Qt.PointingHandCursor
|
|
365
|
+
onClicked: strip.actionClicked()
|
|
366
|
+
}
|
|
367
|
+
Tip {
|
|
368
|
+
visible: actionMouse.containsMouse && strip.actionTip !== ""
|
|
369
|
+
text: strip.actionTip
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
Column {
|
|
374
|
+
visible: strip.monitorVisible
|
|
375
|
+
width: parent.width
|
|
376
|
+
spacing: 4
|
|
377
|
+
topPadding: 4
|
|
378
|
+
Text {
|
|
379
|
+
width: parent.width
|
|
380
|
+
horizontalAlignment: Text.AlignHCenter
|
|
381
|
+
text: "MONITOR"
|
|
382
|
+
color: Theme.dim
|
|
383
|
+
font.family: Theme.font
|
|
384
|
+
font.pixelSize: Theme.caption
|
|
385
|
+
font.letterSpacing: 1.2
|
|
386
|
+
}
|
|
387
|
+
Toggle {
|
|
388
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
389
|
+
checked: strip.monitorChecked
|
|
390
|
+
enabled: strip.monitorEnabled
|
|
391
|
+
tip: strip.monitorTip
|
|
392
|
+
onToggled: strip.monitorToggled()
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import "."
|
|
3
|
+
|
|
4
|
+
// A labelled group of strips side by side.
|
|
5
|
+
Column {
|
|
6
|
+
id: group
|
|
7
|
+
property string title: ""
|
|
8
|
+
default property alias strips: row.data
|
|
9
|
+
spacing: 10
|
|
10
|
+
|
|
11
|
+
Text {
|
|
12
|
+
text: group.title
|
|
13
|
+
color: Theme.dim
|
|
14
|
+
font.family: Theme.font
|
|
15
|
+
font.pixelSize: Theme.caption
|
|
16
|
+
font.letterSpacing: 1.4
|
|
17
|
+
font.bold: true
|
|
18
|
+
}
|
|
19
|
+
Row {
|
|
20
|
+
id: row
|
|
21
|
+
spacing: 6
|
|
22
|
+
}
|
|
23
|
+
}
|
evo8/gui/qml/Theme.qml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
pragma Singleton
|
|
2
|
+
import QtQuick
|
|
3
|
+
|
|
4
|
+
// Colours and sizes for the whole window. Dark console look, pixel accents.
|
|
5
|
+
QtObject {
|
|
6
|
+
readonly property color background: "#12171a"
|
|
7
|
+
readonly property color surface: "#182024"
|
|
8
|
+
readonly property color foreground: "#d6dfd2"
|
|
9
|
+
readonly property color dim: "#7f8c82"
|
|
10
|
+
readonly property color accent: "#84c959"
|
|
11
|
+
readonly property color warn: "#e8b53f"
|
|
12
|
+
readonly property color urgent: "#ff6b66"
|
|
13
|
+
readonly property string font: "JetBrainsMono Nerd Font"
|
|
14
|
+
readonly property int caption: 11
|
|
15
|
+
readonly property int body: 13
|
|
16
|
+
readonly property int title: 16
|
|
17
|
+
readonly property int radius: 3
|
|
18
|
+
readonly property real stripWidth: 96
|
|
19
|
+
readonly property real faderHeight: 220
|
|
20
|
+
|
|
21
|
+
function alpha(c, a) { return Qt.rgba(c.r, c.g, c.b, a) }
|
|
22
|
+
}
|
evo8/gui/qml/Tip.qml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Controls
|
|
3
|
+
import "."
|
|
4
|
+
|
|
5
|
+
// Tooltip in the window's style.
|
|
6
|
+
ToolTip {
|
|
7
|
+
id: tip
|
|
8
|
+
delay: 400
|
|
9
|
+
contentItem: Text {
|
|
10
|
+
text: tip.text
|
|
11
|
+
color: Theme.foreground
|
|
12
|
+
font.family: Theme.font
|
|
13
|
+
font.pixelSize: Theme.caption
|
|
14
|
+
}
|
|
15
|
+
background: Rectangle {
|
|
16
|
+
color: Theme.surface
|
|
17
|
+
border.color: Theme.alpha(Theme.foreground, 0.3)
|
|
18
|
+
radius: Theme.radius
|
|
19
|
+
}
|
|
20
|
+
}
|
evo8/gui/qml/Toggle.qml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import "."
|
|
3
|
+
|
|
4
|
+
// On/off switch: a track with a square knob.
|
|
5
|
+
Item {
|
|
6
|
+
id: root
|
|
7
|
+
property bool checked: false
|
|
8
|
+
property bool busy: false
|
|
9
|
+
property string tip: ""
|
|
10
|
+
signal toggled()
|
|
11
|
+
implicitWidth: 44
|
|
12
|
+
implicitHeight: 22
|
|
13
|
+
opacity: enabled ? 1 : 0.45
|
|
14
|
+
|
|
15
|
+
Rectangle {
|
|
16
|
+
anchors.fill: parent
|
|
17
|
+
radius: Theme.radius
|
|
18
|
+
color: root.checked ? Theme.alpha(Theme.accent, 0.25) : "transparent"
|
|
19
|
+
border.width: 1
|
|
20
|
+
border.color: root.checked ? Theme.accent : Theme.alpha(Theme.foreground, mouse.containsMouse ? 0.6 : 0.3)
|
|
21
|
+
}
|
|
22
|
+
Rectangle {
|
|
23
|
+
width: parent.height - 8
|
|
24
|
+
height: width
|
|
25
|
+
y: 4
|
|
26
|
+
x: root.checked ? parent.width - width - 4 : 4
|
|
27
|
+
color: root.checked ? Theme.accent : Theme.alpha(Theme.foreground, 0.65)
|
|
28
|
+
Behavior on x { NumberAnimation { duration: 90 } }
|
|
29
|
+
}
|
|
30
|
+
MouseArea {
|
|
31
|
+
id: mouse
|
|
32
|
+
anchors.fill: parent
|
|
33
|
+
hoverEnabled: true
|
|
34
|
+
cursorShape: Qt.PointingHandCursor
|
|
35
|
+
onClicked: if (!root.busy && root.enabled) root.toggled()
|
|
36
|
+
}
|
|
37
|
+
Tip {
|
|
38
|
+
visible: mouse.containsMouse && root.tip !== ""
|
|
39
|
+
text: root.tip
|
|
40
|
+
}
|
|
41
|
+
}
|
evo8/gui/qml/VMeter.qml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import "."
|
|
3
|
+
import "format.js" as F
|
|
4
|
+
|
|
5
|
+
// Segmented vertical peak meter on a dB scale, lit from the bottom; the top
|
|
6
|
+
// segments turn amber then red near clipping.
|
|
7
|
+
Item {
|
|
8
|
+
id: meter
|
|
9
|
+
property real level: 0 // 0..1 from F.meterLevel
|
|
10
|
+
width: 5
|
|
11
|
+
readonly property real cell: 5
|
|
12
|
+
readonly property int segments: Math.max(8, Math.floor(height / cell))
|
|
13
|
+
|
|
14
|
+
Repeater {
|
|
15
|
+
model: meter.segments
|
|
16
|
+
Rectangle {
|
|
17
|
+
required property int index
|
|
18
|
+
readonly property real position: (index + 0.5) / meter.segments
|
|
19
|
+
readonly property string zone: F.meterZone(position)
|
|
20
|
+
readonly property bool lit: position <= meter.level
|
|
21
|
+
width: meter.width
|
|
22
|
+
height: meter.height / meter.segments - 1
|
|
23
|
+
y: meter.height - (index + 1) * (meter.height / meter.segments)
|
|
24
|
+
color: zone === "hot" ? Theme.urgent : zone === "loud" ? Theme.warn : Theme.foreground
|
|
25
|
+
opacity: lit ? 0.95 : 0.12
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
evo8/gui/qml/format.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.pragma library
|
|
2
|
+
// Formatting helpers for the mixer window (mirrors tests in tests/test_gui.py).
|
|
3
|
+
|
|
4
|
+
function signedDb(db) {
|
|
5
|
+
var d = Math.round(Number(db) * 10) / 10
|
|
6
|
+
if (!isFinite(d)) return "—"
|
|
7
|
+
return (d > 0 ? "+" : "") + d.toFixed(1) + " dB"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Linear gain as decibels.
|
|
11
|
+
function gainDb(gain) {
|
|
12
|
+
var g = Number(gain)
|
|
13
|
+
if (!(g > 0)) return "-∞ dB"
|
|
14
|
+
var r = Math.round(20 * Math.log(g) / Math.LN10 * 10) / 10
|
|
15
|
+
if (r === 0) return "0.0 dB"
|
|
16
|
+
return (r > 0 ? "+" : "") + r.toFixed(1) + " dB"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function percent(v) { return Math.round(Number(v || 0) * 100) + "%" }
|
|
20
|
+
|
|
21
|
+
function delayText(ms) { var v = Number(ms); return isFinite(v) ? Math.round(v) + " ms" : "—" }
|
|
22
|
+
|
|
23
|
+
// Peak 0..1 linear -> 0..1 on a -60..0 dBFS scale.
|
|
24
|
+
function meterLevel(peak) {
|
|
25
|
+
var p = Number(peak)
|
|
26
|
+
if (!(p > 0)) return 0
|
|
27
|
+
var db = 20 * Math.log(p) / Math.LN10
|
|
28
|
+
if (db <= -60) return 0
|
|
29
|
+
return Math.min(1, (db + 60) / 60)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// "hot" above -3 dBFS, "loud" from -12 dBFS.
|
|
33
|
+
function meterZone(pos) {
|
|
34
|
+
if (pos > 57 / 60) return "hot"
|
|
35
|
+
if (pos > 48 / 60) return "loud"
|
|
36
|
+
return "normal"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// At the standard value, within half a step.
|
|
40
|
+
function atDefault(value, standard, step) {
|
|
41
|
+
if (standard === undefined || standard === null || isNaN(standard)) return true
|
|
42
|
+
return Math.abs(Number(value) - Number(standard)) <= Math.max(1e-6, Math.abs(Number(step) || 0) / 2)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Hardware mix cell: -128 = off.
|
|
46
|
+
function hwDb(db) {
|
|
47
|
+
if (db === undefined || db === null) return "?"
|
|
48
|
+
if (db <= -127.5) return "off"
|
|
49
|
+
return Math.round(db) + ""
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ---- EVO internal mix: level + pan <-> the left/right cells of one output pair ----
|
|
53
|
+
// Pan law of a balance control: centred, both sides sit at the level (as the
|
|
54
|
+
// EVO's factory mix, all at 0 dB); panning attenuates the other side by
|
|
55
|
+
// 20·log10(1 - |pan|), reaching off at the edge. Levels below `floor` are off.
|
|
56
|
+
var HW_OFF = -128
|
|
57
|
+
|
|
58
|
+
function hwToLinear(db) { return db <= -127.5 ? 0 : Math.pow(10, db / 20) }
|
|
59
|
+
|
|
60
|
+
// {level, pan, muted} from a left and right cell (dB, -128 = off).
|
|
61
|
+
function hwLevelPan(l, r) {
|
|
62
|
+
if (l === null || r === null || l === undefined || r === undefined) return null
|
|
63
|
+
var gl = hwToLinear(l), gr = hwToLinear(r)
|
|
64
|
+
if (gl === 0 && gr === 0) return { level: HW_OFF, pan: 0, muted: true }
|
|
65
|
+
var level = Math.max(l, r)
|
|
66
|
+
var pan = 0
|
|
67
|
+
if (gl > gr) pan = -(1 - gr / gl)
|
|
68
|
+
else if (gr > gl) pan = 1 - gl / gr
|
|
69
|
+
return { level: level, pan: Math.round(pan * 100) / 100, muted: false }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// [left dB, right dB] for a level and pan; `floor` and below means off.
|
|
73
|
+
function hwCells(level, pan, floor) {
|
|
74
|
+
if (level <= floor) return [HW_OFF, HW_OFF]
|
|
75
|
+
var p = Math.max(-1, Math.min(1, Number(pan) || 0))
|
|
76
|
+
function side(att) {
|
|
77
|
+
var k = 1 - att
|
|
78
|
+
if (k <= 0.001) return HW_OFF
|
|
79
|
+
return Math.max(floor, level + 20 * Math.log(k) / Math.LN10)
|
|
80
|
+
}
|
|
81
|
+
return [side(Math.max(0, p)), side(Math.max(0, -p))]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function panText(p) {
|
|
85
|
+
var v = Math.round(Number(p) * 100)
|
|
86
|
+
if (v === 0) return "C"
|
|
87
|
+
return (v < 0 ? "L " : "R ") + Math.abs(v)
|
|
88
|
+
}
|
evo8/gui/qml/qmldir
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
singleton Theme 1.0 Theme.qml
|
|
2
|
+
PixelSlider 1.0 PixelSlider.qml
|
|
3
|
+
Toggle 1.0 Toggle.qml
|
|
4
|
+
GlyphButton 1.0 GlyphButton.qml
|
|
5
|
+
VMeter 1.0 VMeter.qml
|
|
6
|
+
Strip 1.0 Strip.qml
|
|
7
|
+
StripGroup 1.0 StripGroup.qml
|
|
8
|
+
Divider 1.0 Divider.qml
|
|
9
|
+
CardProfiles 1.0 CardProfiles.qml
|
|
10
|
+
ConsolePage 1.0 ConsolePage.qml
|
|
11
|
+
HardwarePage 1.0 HardwarePage.qml
|
|
12
|
+
Tip 1.0 Tip.qml
|
|
13
|
+
HwMixStrip 1.0 HwMixStrip.qml
|
|
14
|
+
AboutPage 1.0 AboutPage.qml
|