Documentation
¶
Overview ¶
Package dsp provides audio analysis
Some notes:
https://dlbeer.co.nz/articles/fftvis.html https://www.cg.tuwien.ac.at/courses/WissArbeiten/WS2010/processing.pdf https://github.com/hvianna/audioMotion-analyzer/blob/master/src/audioMotion-analyzer.js#L1053 https://dsp.stackexchange.com/questions/6499/help-calculating-understanding-the-mfccs-mel-frequency-cepstrum-coefficients https://stackoverflow.com/questions/3694918/how-to-extract-frequency-associated-with-fft-values-in-python
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶ added in v1.5.0
type Analyzer interface {
BinCount() int
ProcessBin(int, []complex128) float64
Recalculate(int) int
}
func NewAnalyzer ¶ added in v1.5.0
func NewAnalyzer(cfg AnalyzerConfig) Analyzer
type AnalyzerConfig ¶ added in v1.7.0
type AnalyzerConfig struct {
SampleRate float64 // audio sample rate
SampleSize int // number of samples per slice
SquashLow bool // squash the low end the spectrum
SquashLowOld bool // squash the low end using the old method
DontNormalize bool // dont run math.Log on output
BinMethod BinMethod // method used for calculating bin value
}
type BinMethod ¶ added in v1.7.0
func AverageSamples ¶ added in v1.7.0
func AverageSamples() BinMethod
Average all the samples together.
func MaxSampleValue ¶ added in v1.8.0
func MaxSampleValue() BinMethod
Return the maximum value of all the samples.
func MinNonZeroSampleValue ¶ added in v1.8.0
func MinNonZeroSampleValue() BinMethod
Return the minimum value of all the samples that is not zero.
type Smoother ¶ added in v1.6.2
type Smoother interface {
SmoothBuffers([][]float64)
SmoothBin(int, int, float64) float64
GetMethod() SmoothingMethod
SetMethod(SmoothingMethod)
}
func NewSmoother ¶ added in v1.6.2
func NewSmoother(cfg SmootherConfig) Smoother
type SmootherConfig ¶ added in v1.7.0
type SmoothingMethod ¶ added in v1.8.0
type SmoothingMethod int
const ( SmoothMin SmoothingMethod = iota // 0 SmoothSimple // 1 SmoothAverage // 2 SmoothSimpleAverage // 3 SmoothNew // 4 SmoothNewAverage // 5 SmoothNone // 6 SmoothMax // 7 SmoothDefault = SmoothSimpleAverage )
Click to show internal directories.
Click to hide internal directories.