jdxi_editor.audio.audio_snapshot ================================ .. py:module:: jdxi_editor.audio.audio_snapshot .. autoapi-nested-parse:: The latest analysis, handed to the window as one immutable value. Attributes ---------- .. autoapisummary:: jdxi_editor.audio.audio_snapshot.DB_FLOOR jdxi_editor.audio.audio_snapshot.DB_CEIL jdxi_editor.audio.audio_snapshot.REFRESH_HZ jdxi_editor.audio.audio_snapshot.FFT_SIZE jdxi_editor.audio.audio_snapshot.BAND_COUNT jdxi_editor.audio.audio_snapshot.WAVEFORM_COLUMNS jdxi_editor.audio.audio_snapshot.SAMPLE_RATE jdxi_editor.audio.audio_snapshot.BLOCK_SIZE Classes ------- .. autoapisummary:: jdxi_editor.audio.audio_snapshot.AudioSnapshot Functions --------- .. autoapisummary:: jdxi_editor.audio.audio_snapshot.clip_db Module Contents --------------- .. py:data:: DB_FLOOR :value: -60.0 .. py:data:: DB_CEIL :value: 0.0 .. py:data:: REFRESH_HZ :value: 30 .. py:data:: FFT_SIZE :value: 4096 .. py:data:: BAND_COUNT :value: 31 .. py:data:: WAVEFORM_COLUMNS :value: 480 .. py:data:: SAMPLE_RATE :value: 48000 .. py:data:: BLOCK_SIZE :value: 1024 .. py:function:: clip_db(value: float) -> float Clamp a level onto the meter scale. :param value: float decibels :return: float in DB_FLOOR..DB_CEIL .. py:class:: AudioSnapshot One published frame of analysis. Levels are decibels on the meter scale. ``spectrum`` has :data:`BAND_COUNT` bands. Each waveform is ``(columns, 2)`` of min and max per column, so a transient is not averaged away. :param rms_left: float block RMS, left, dB :param rms_right: float block RMS, right, dB :param peak_left: float peak meter, left, dB :param peak_right: float peak meter, right, dB :param peak_hold_left: float held peak, left, dB :param peak_hold_right: float held peak, right, dB :param vu_left: float VU, left, dB :param vu_right: float VU, right, dB :param spectrum: np.ndarray band levels, dB :param waveform_left: np.ndarray decimated min/max :param waveform_right: np.ndarray decimated min/max :param sample_rate: int Hz :param timebase_ms: int oscilloscope window .. py:attribute:: rms_left :type: float .. py:attribute:: rms_right :type: float .. py:attribute:: peak_left :type: float .. py:attribute:: peak_right :type: float .. py:attribute:: peak_hold_left :type: float .. py:attribute:: peak_hold_right :type: float .. py:attribute:: vu_left :type: float .. py:attribute:: vu_right :type: float .. py:attribute:: spectrum :type: numpy.ndarray .. py:attribute:: waveform_left :type: numpy.ndarray .. py:attribute:: waveform_right :type: numpy.ndarray .. py:attribute:: sample_rate :type: int .. py:attribute:: timebase_ms :type: int