jdxi_editor.audio.analysers.waveform_analyser ============================================= .. py:module:: jdxi_editor.audio.analysers.waveform_analyser .. autoapi-nested-parse:: Min/max decimation of a waveform onto a fixed number of columns. One sample of a click survives, because each column keeps the extremes of the samples that fall in it rather than their average. Attributes ---------- .. autoapisummary:: jdxi_editor.audio.analysers.waveform_analyser.TIMEBASE_MS Functions --------- .. autoapisummary:: jdxi_editor.audio.analysers.waveform_analyser.window_samples jdxi_editor.audio.analysers.waveform_analyser.decimate_minmax Module Contents --------------- .. py:data:: TIMEBASE_MS :value: (5, 10, 20, 50, 100) .. py:function:: window_samples(timebase_ms: int, sample_rate: int) -> int How many samples a timebase covers. :param timebase_ms: int one of :data:`TIMEBASE_MS` :param sample_rate: int Hz :return: int .. py:function:: decimate_minmax(samples: numpy.ndarray, columns: int = WAVEFORM_COLUMNS) -> numpy.ndarray Reduce one channel to ``columns`` of ``(min, max)``. :param samples: np.ndarray one channel :param columns: int :return: np.ndarray shape ``(columns, 2)``, float32