Skip to content

Spectrum Analyzer

project-owner edited this page Apr 17, 2021 · 3 revisions

Here is the example of the plugin configuration for Spectrum Analyzer functionality:

pcm_scope.peppyalsa {
        type peppyalsa
        spectrum "/home/pi/myfifosa"
        spectrum_max 100
        spectrum_size 30
        logarithmic_frequency 0
        logarithmic_amplitude 1
        smoothing_factor 20
        window 3
}
  • type - this parameter defines the name of the ALSA plugin. This is required parameter and it should always be peppyalsa
  • spectrum - this is optional parameter which can be used to define the name of the named pipe. If this parameter was not defined then the plugin will use the default name /home/pi/myfifosa. If the named pipe with such name doesn't exist then the plugin will create one. If VU Meter and Spectrum Analyzer are used together then the names of the named pipes should be different.
Name Min Max Default (if not defined) Description
spectrum_max 1 65535 100 Maximum value of the amplitude signal for each frequency band
spectrum_size 2 256 30 Number of frequency bands
logarithmic_frequency 0 1 1 1 - frequency axis is logarithmic spaced, 0 - linear spaced
logarithmic_amplitude 0 1 1 1 - amplitude axis is logarithmic spaced, 0 - linear spaced
smoothing_factor 0 100 50 Smooth signal amplitude, 0 - no historic data (no smoothing), 100 - only historic data
window 0 3 3 Window function for FFT: 0 - none, 1 - Hann, 2 - Hamming, 3 - Blackman

The following image explains the meaning of such parameters as spectrum_max and spectrum_size:

sa

<<Previous | Next>>