jdxi_editor.audio.audio_analyser
Turn the newest samples into one snapshot, off the capture callback.
The worker thread reads the ring. The window only ever reads
AudioAnalyser.latest_snapshot().
Classes
Coordinates the three measurements and publishes the latest snapshot. |
Module Contents
- class jdxi_editor.audio.audio_analyser.AudioAnalyser(ring: jdxi_editor.audio.audio_buffer.SampleRing, sample_rate: int = SAMPLE_RATE, columns: int = WAVEFORM_COLUMNS)[source]
Coordinates the three measurements and publishes the latest snapshot.
- _snapshot: jdxi_editor.audio.audio_snapshot.AudioSnapshot | None = None[source]
- _thread: threading.Thread | None = None[source]
- set_sample_rate(sample_rate: int) None[source]
The rate the input actually opened at.
Call while stopped: the timebase window and the spectrum’s frequency axis are both measured in samples.
- Parameters:
sample_rate – int Hz
- Returns:
None
- set_timebase(timebase_ms: int) None[source]
How much of the waveform the oscilloscope shows.
- Parameters:
timebase_ms – int one of the waveform timebases
- Returns:
None
- latest_snapshot() jdxi_editor.audio.audio_snapshot.AudioSnapshot | None[source]
The newest snapshot, or None before the first block.
- Returns:
Optional[AudioSnapshot]