jdxi_editor.ui.widgets.audio.spectrum_display

31 lit segments, one column per spectrum band.

A band at 0 dB reaches the top. A band on the floor draws nothing.

Attributes

SEGMENT

GAP

Classes

SpectrumDisplay

LED columns for the spectrum snapshot.

Functions

column_rect(width, index[, count]) → tuple[float, float]

The left edge and width of one band.

Module Contents

jdxi_editor.ui.widgets.audio.spectrum_display.SEGMENT = 4[source]
jdxi_editor.ui.widgets.audio.spectrum_display.GAP = 2[source]
jdxi_editor.ui.widgets.audio.spectrum_display.column_rect(width: float, index: int, count: int = BAND_COUNT) → tuple[float, float][source]

The left edge and width of one band.

Parameters:
  • width – float widget width

  • index – int band

  • count – int bands

Returns:

tuple left, width

class jdxi_editor.ui.widgets.audio.spectrum_display.SpectrumDisplay(parent: PySide6.QtWidgets.QWidget | None = None)[source]

Bases: PySide6.QtWidgets.QWidget

LED columns for the spectrum snapshot.

_bands[source]
set_spectrum(bands: numpy.ndarray) → None[source]

Store the band levels and repaint.

Parameters:

bands – np.ndarray dB, one value per band

Returns:

None

paintEvent(_event) → None[source]