jdxi_editor.ui.widgets.audio.spectrum_display ============================================= .. py:module:: jdxi_editor.ui.widgets.audio.spectrum_display .. autoapi-nested-parse:: 31 lit segments, one column per spectrum band. A band at 0 dB reaches the top. A band on the floor draws nothing. Attributes ---------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.spectrum_display.SEGMENT jdxi_editor.ui.widgets.audio.spectrum_display.GAP Classes ------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.spectrum_display.SpectrumDisplay Functions --------- .. autoapisummary:: jdxi_editor.ui.widgets.audio.spectrum_display.column_rect Module Contents --------------- .. py:data:: SEGMENT :value: 4 .. py:data:: GAP :value: 2 .. py:function:: column_rect(width: float, index: int, count: int = BAND_COUNT) -> tuple[float, float] The left edge and width of one band. :param width: float widget width :param index: int band :param count: int bands :return: tuple left, width .. py:class:: SpectrumDisplay(parent: Optional[PySide6.QtWidgets.QWidget] = None) Bases: :py:obj:`PySide6.QtWidgets.QWidget` LED columns for the spectrum snapshot. .. py:attribute:: _bands .. py:method:: set_spectrum(bands: numpy.ndarray) -> None Store the band levels and repaint. :param bands: np.ndarray dB, one value per band :return: None .. py:method:: paintEvent(_event) -> None