jdxi_editor.audio.audio_snapshot

The latest analysis, handed to the window as one immutable value.

Attributes

DB_FLOOR

DB_CEIL

REFRESH_HZ

FFT_SIZE

BAND_COUNT

WAVEFORM_COLUMNS

SAMPLE_RATE

BLOCK_SIZE

Classes

AudioSnapshot

One published frame of analysis.

Functions

clip_db(value) → float

Clamp a level onto the meter scale.

Module Contents

jdxi_editor.audio.audio_snapshot.DB_FLOOR = -60.0[source]
jdxi_editor.audio.audio_snapshot.DB_CEIL = 0.0[source]
jdxi_editor.audio.audio_snapshot.REFRESH_HZ = 30[source]
jdxi_editor.audio.audio_snapshot.FFT_SIZE = 4096[source]
jdxi_editor.audio.audio_snapshot.BAND_COUNT = 31[source]
jdxi_editor.audio.audio_snapshot.WAVEFORM_COLUMNS = 480[source]
jdxi_editor.audio.audio_snapshot.SAMPLE_RATE = 48000[source]
jdxi_editor.audio.audio_snapshot.BLOCK_SIZE = 1024[source]
jdxi_editor.audio.audio_snapshot.clip_db(value: float) → float[source]

Clamp a level onto the meter scale.

Parameters:

value – float decibels

Returns:

float in DB_FLOOR..DB_CEIL

class jdxi_editor.audio.audio_snapshot.AudioSnapshot[source]

One published frame of analysis.

Levels are decibels on the meter scale. spectrum has BAND_COUNT bands. Each waveform is (columns, 2) of min and max per column, so a transient is not averaged away.

Parameters:
  • rms_left – float block RMS, left, dB

  • rms_right – float block RMS, right, dB

  • peak_left – float peak meter, left, dB

  • peak_right – float peak meter, right, dB

  • peak_hold_left – float held peak, left, dB

  • peak_hold_right – float held peak, right, dB

  • vu_left – float VU, left, dB

  • vu_right – float VU, right, dB

  • spectrum – np.ndarray band levels, dB

  • waveform_left – np.ndarray decimated min/max

  • waveform_right – np.ndarray decimated min/max

  • sample_rate – int Hz

  • timebase_ms – int oscilloscope window

rms_left: float[source]
rms_right: float[source]
peak_left: float[source]
peak_right: float[source]
peak_hold_left: float[source]
peak_hold_right: float[source]
vu_left: float[source]
vu_right: float[source]
spectrum: numpy.ndarray[source]
waveform_left: numpy.ndarray[source]
waveform_right: numpy.ndarray[source]
sample_rate: int[source]
timebase_ms: int[source]