jdxi_editor.ui.widgets.audio.vu_meter ===================================== .. py:module:: jdxi_editor.ui.widgets.audio.vu_meter .. autoapi-nested-parse:: Stereo meters. The skin's ``meter`` style chooses the drawing: two horizontal bars on one dB scale (MeterStyle.BARS, the default), circular dials (NEEDLES), or a pair of backlit analogue VU meters (VINTAGE_VU, see analog_vu). Attributes ---------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.vu_meter.NEEDLE_START jdxi_editor.ui.widgets.audio.vu_meter.NEEDLE_SWEEP jdxi_editor.ui.widgets.audio.vu_meter.OVERLOAD_DB jdxi_editor.ui.widgets.audio.vu_meter.NEEDLE_RADIUS jdxi_editor.ui.widgets.audio.vu_meter.ARC_RADIUS jdxi_editor.ui.widgets.audio.vu_meter.SCALE_DB jdxi_editor.ui.widgets.audio.vu_meter.MID_DB jdxi_editor.ui.widgets.audio.vu_meter.BAR_HEIGHT jdxi_editor.ui.widgets.audio.vu_meter._LABEL_W jdxi_editor.ui.widgets.audio.vu_meter._READOUT_W jdxi_editor.ui.widgets.audio.vu_meter._SCALE_H jdxi_editor.ui.widgets.audio.vu_meter._CLIP Classes ------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.vu_meter.VUMeter Functions --------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.vu_meter.needle_angle jdxi_editor.ui.widgets.audio.vu_meter.needle_tip jdxi_editor.ui.widgets.audio.vu_meter.dial_rects jdxi_editor.ui.widgets.audio.vu_meter.track_rect jdxi_editor.ui.widgets.audio.vu_meter.bar_x jdxi_editor.ui.widgets.audio.vu_meter.row_bar jdxi_editor.ui.widgets.audio.vu_meter._meter_style jdxi_editor.ui.widgets.audio.vu_meter._needles jdxi_editor.ui.widgets.audio.vu_meter._vintage Module Contents --------------- .. py:data:: NEEDLE_START :value: 160.0 .. py:data:: NEEDLE_SWEEP :value: 140.0 .. py:data:: OVERLOAD_DB :value: -3.0 .. py:data:: NEEDLE_RADIUS :value: 0.72 .. py:data:: ARC_RADIUS :value: 0.96 .. py:data:: SCALE_DB .. py:data:: MID_DB :value: -12.0 .. py:data:: BAR_HEIGHT :value: 96 .. py:data:: _LABEL_W :value: 28.0 .. py:data:: _READOUT_W :value: 68.0 .. py:data:: _SCALE_H :value: 16.0 .. py:data:: _CLIP .. py:function:: needle_angle(db: float) -> float Degrees, standard position, for a meter reading. :param db: float :return: float .. py:function:: needle_tip(origin_x: float, origin_y: float, radius: float, db: float) -> tuple[float, float] Where the needle ends. :param origin_x: float pivot :param origin_y: float pivot :param radius: float length :param db: float :return: tuple x, y in widget coordinates .. py:function:: dial_rects(width: float, height: float) -> tuple[PySide6.QtCore.QRectF, PySide6.QtCore.QRectF] The left and right dials. :param width: float :param height: float :return: tuple of QRectF .. py:function:: track_rect(width: float, height: float) -> PySide6.QtCore.QRectF The rectangle both bars and the scale share. :param width: float :param height: float :return: QRectF .. py:function:: bar_x(rect: PySide6.QtCore.QRectF, db: float) -> float The x of a level on the shared scale. :param rect: QRectF the track :param db: float :return: float .. py:function:: row_bar(track: PySide6.QtCore.QRectF, index: int) -> PySide6.QtCore.QRectF One channel's bar inside the track. :param track: QRectF :param index: int 0 is left, 1 is right :return: QRectF .. py:class:: VUMeter(parent: Optional[PySide6.QtWidgets.QWidget] = None) Bases: :py:obj:`PySide6.QtWidgets.QWidget` Stereo levels: bars by default, needles when the skin asks. .. py:attribute:: _peak .. py:attribute:: _hold .. py:attribute:: _vu .. py:method:: sizeHint() -> PySide6.QtCore.QSize .. py:method:: set_levels(peak_left: float, peak_right: float, vu_left: float, vu_right: float, hold_left: float, hold_right: float) -> None Store the six meter readings and repaint. :return: None .. py:method:: paintEvent(_event) -> None .. py:method:: _fit_height() -> None .. py:method:: _draw_bars(painter, readings, lcd) -> None .. py:method:: _draw_scale(painter, track, lcd) -> None .. py:method:: _draw_bar(painter, bar, peak, vu, hold, name, lcd) -> None .. py:method:: _fill_bar(painter, bar, vu, dim, mid, clip) -> None .. py:method:: _mark(painter, bar, db, color, short: bool) -> None .. py:method:: _draw_dial(painter, rect, peak, vu, hold, lcd) -> None .. py:method:: _draw_arc(painter, origin, radius, start_db, end_db, color) -> None .. py:method:: _draw_needle(painter, origin, radius, db, color, width) -> None .. py:function:: _meter_style() -> jdxi_editor.ui.style.rack_skin.MeterStyle .. py:function:: _needles() -> bool .. py:function:: _vintage() -> bool