dsp

package
v0.0.0-...-41dbb3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmplitudeMulti

func AmplitudeMulti(spectrum []complex128) float64

Calculate the sum of amplitudes for all elements in the spectrum.

func AmplitudeSingle

func AmplitudeSingle(fft complex128) float64

Return the amplitude of a single element in the FFT spectrum.

func ApplyWeightFilter

func ApplyWeightFilter(fftSignal []complex128, sampleRate float64)

ApplyWeightFilter применяет весовой фильтр к сигналу FFT

func FrequencyRangeIndexes

func FrequencyRangeIndexes(fft []complex128, sampleRate ears.SampleRate, fromHz, toHz uint16) (int, int)

Types

type ExpFilter

type ExpFilter struct {
	Value, AlphaDecay, AlphaRise float64
}

func NewExpFilter

func NewExpFilter(value, alphaDecay, alphaRise float64) *ExpFilter

func (*ExpFilter) Update

func (e *ExpFilter) Update(newValue float64) float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL