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
Classes
LED columns for the spectrum snapshot. |
Functions
|
The left edge and width of one band. |
Module Contents
- 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.QWidgetLED columns for the spectrum snapshot.
- set_spectrum(bands: numpy.ndarray) None[source]
Store the band levels and repaint.
- Parameters:
bands – np.ndarray dB, one value per band
- Returns:
None