jacdac.sound_spectrum

Submodules

Package Contents

Classes

SoundSpectrumClient

A microphone that analyzes the sound specturm

class jacdac.sound_spectrum.SoundSpectrumClient(bus: jacdac.bus.Bus, role: str, *, missing_frequency_bins_value: bytes | None = None)

Bases: jacdac.bus.SensorClient

A microphone that analyzes the sound specturm Implements a client for the Sound Spectrum service.

property frequency_bins: bytes | None

The computed frequency data.,

property enabled: bool | None

Turns on/off the micropohone.,

property fft_pow2_size: int | None

The power of 2 used as the size of the FFT to be used to determine the frequency domain.,

property min_decibels: int | None

The minimum power value in the scaling range for the FFT analysis data, _: dB

property max_decibels: int | None

The maximum power value in the scaling range for the FFT analysis data, _: dB

property smoothing_time_constant: float | None

The averaging constant with the last analysis frame. If 0 is set, there is no averaging done, whereas a value of 1 means “overlap the previous and current buffer quite a lot while computing the value”., _: /