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: Optional[bytes] = None)

Bases: jacdac.bus.SensorClient

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

property frequency_bins Optional[bytes]

The computed frequency data.,

property enabled Optional[bool]

Turns on/off the micropohone.,

property fft_pow2_size Optional[int]

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

property min_decibels Optional[int]

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

property max_decibels Optional[int]

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

property smoothing_time_constant Optional[float]

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”., _: /