jdxi_editor.ui.widgets.audio.analog_vu

Vintage VU meters: a pair of backlit cream faces in a dark housing, each with a needle on a classic VU scale, a red zone above 0 VU and a peak LED.

The scale is a VU scale, not a digital one. The level it shows is the average (RMS) level in dBFS from the analyser, read against a reference: 0 VU is VU_REFERENCE_DBFS (-18 dBFS, the usual digital studio alignment). That is printed on the face, and the digital peak is shown on its own, as a number in dBFS and as the LED, so the two are not confused.

As on a real VU meter the scale is linear in voltage, so -20 to -10 VU is squeezed into the left end and 0 VU sits about two thirds of the way across.

Attributes

VU_REFERENCE_DBFS

VU_MIN

VU_MAX

VU_MARKS

PERCENT_MARKS

PEAK_LED_DBFS

REFERENCE_NOTE

EXPLANATION

MAX_HALF_SWEEP

FACE_LIGHT

FACE_EDGE

INK

RED

LED_OFF

LED_ON

HOUSING_TOP

HOUSING_BOTTOM

Classes

FaceGeometry

The pivot, arc and sweep of one face.

Functions

vu_from_dbfs(dbfs) → float

The VU reading of an RMS level in dBFS (not clamped).

scale_fraction(vu) → float

Where vu sits across the scale, 0 at -20 VU's end to 1 at +3 VU, linear

face_rects(width, height) → tuple[PySide6.QtCore.QRectF, PySide6.QtCore.QRectF, PySide6.QtCore.QRectF]

The housing and the left and right faces inside it.

paint_vintage_meters(painter, width, height, readings) → None

Paint the housing and both faces.

_paint_housing(painter, rect) → None

_font(painter, px[, bold]) → PySide6.QtGui.QFont

_paint_face(painter, face, name, peak, vu, hold) → None

_paint_scale(painter, geo) → None

_mark_label_rect(geo, vu) → PySide6.QtCore.QRectF

Where a scale number is printed.

_arc(painter, geo, start, end, radius_scale) → None

_paint_needle(painter, geo, vu) → None

_paint_led(painter, face, lit) → None

led_centre(face) → PySide6.QtCore.QPointF

Where the peak LED sits on a face (for tests).

Module Contents

jdxi_editor.ui.widgets.audio.analog_vu.VU_REFERENCE_DBFS = -18.0[source]
jdxi_editor.ui.widgets.audio.analog_vu.VU_MIN = -20.0[source]
jdxi_editor.ui.widgets.audio.analog_vu.VU_MAX = 3.0[source]
jdxi_editor.ui.widgets.audio.analog_vu.VU_MARKS[source]
jdxi_editor.ui.widgets.audio.analog_vu.PERCENT_MARKS = (20, 40, 60, 80, 100)[source]
jdxi_editor.ui.widgets.audio.analog_vu.PEAK_LED_DBFS = -1.0[source]
jdxi_editor.ui.widgets.audio.analog_vu.REFERENCE_NOTE = '0 VU = -18 dBFS'[source]
jdxi_editor.ui.widgets.audio.analog_vu.EXPLANATION = Multiline-String[source]
Show Value
"""VU meters: the needle is the average (RMS) level, 0 VU = -18 dBFS.
PEAK is the digital peak level in dBFS; the LED lights when it reaches -1 dBFS."""
jdxi_editor.ui.widgets.audio.analog_vu.MAX_HALF_SWEEP = 48.0[source]
jdxi_editor.ui.widgets.audio.analog_vu.FACE_LIGHT[source]
jdxi_editor.ui.widgets.audio.analog_vu.FACE_EDGE[source]
jdxi_editor.ui.widgets.audio.analog_vu.INK[source]
jdxi_editor.ui.widgets.audio.analog_vu.RED[source]
jdxi_editor.ui.widgets.audio.analog_vu.LED_OFF[source]
jdxi_editor.ui.widgets.audio.analog_vu.LED_ON[source]
jdxi_editor.ui.widgets.audio.analog_vu.HOUSING_TOP[source]
jdxi_editor.ui.widgets.audio.analog_vu.HOUSING_BOTTOM[source]
jdxi_editor.ui.widgets.audio.analog_vu.vu_from_dbfs(dbfs: float) → float[source]

The VU reading of an RMS level in dBFS (not clamped).

jdxi_editor.ui.widgets.audio.analog_vu.scale_fraction(vu: float) → float[source]

Where vu sits across the scale, 0 at -20 VU’s end to 1 at +3 VU, linear in voltage as a VU meter is. Readings off the scale rest on its pins.

jdxi_editor.ui.widgets.audio.analog_vu.face_rects(width: float, height: float) → tuple[PySide6.QtCore.QRectF, PySide6.QtCore.QRectF, PySide6.QtCore.QRectF][source]

The housing and the left and right faces inside it.

Returns:

(housing, left face, right face)

class jdxi_editor.ui.widgets.audio.analog_vu.FaceGeometry(face: PySide6.QtCore.QRectF)[source]

The pivot, arc and sweep of one face.

face[source]
pivot[source]
radius[source]
half_sweep[source]
angle(vu: float) → float[source]

Degrees from upright, positive to the right.

point(vu: float, radius_scale: float = 1.0) → PySide6.QtCore.QPointF[source]
jdxi_editor.ui.widgets.audio.analog_vu.paint_vintage_meters(painter: PySide6.QtGui.QPainter, width: float, height: float, readings) → None[source]

Paint the housing and both faces.

Parameters:

readings – two (peak dBFS, vu dBFS, held peak dBFS) tuples, left then right

jdxi_editor.ui.widgets.audio.analog_vu._paint_housing(painter: PySide6.QtGui.QPainter, rect: PySide6.QtCore.QRectF) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu._font(painter: PySide6.QtGui.QPainter, px: float, bold: bool = False) → PySide6.QtGui.QFont[source]
jdxi_editor.ui.widgets.audio.analog_vu._paint_face(painter: PySide6.QtGui.QPainter, face: PySide6.QtCore.QRectF, name: str, peak: float, vu: float, hold: float) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu._paint_scale(painter: PySide6.QtGui.QPainter, geo: FaceGeometry) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu._mark_label_rect(geo: FaceGeometry, vu: float) → PySide6.QtCore.QRectF[source]

Where a scale number is printed.

jdxi_editor.ui.widgets.audio.analog_vu._arc(painter: PySide6.QtGui.QPainter, geo: FaceGeometry, start: float, end: float, radius_scale: float) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu._paint_needle(painter: PySide6.QtGui.QPainter, geo: FaceGeometry, vu: float) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu._paint_led(painter: PySide6.QtGui.QPainter, face: PySide6.QtCore.QRectF, lit: bool) → None[source]
jdxi_editor.ui.widgets.audio.analog_vu.led_centre(face: PySide6.QtCore.QRectF) → PySide6.QtCore.QPointF[source]

Where the peak LED sits on a face (for tests).