dsp

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: MIT Imports: 1 Imported by: 1

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

func AverageSamples added in v1.7.0

func AverageSamples(count int, current, new float64) float64

Average all the samples together

func MaxSamples added in v1.7.0

func MaxSamples(count int, current, new float64) float64

Return the maximum value of all the samples

func SumSamples added in v1.7.0

func SumSamples(count int, current, new float64) float64

Sum all the samples together

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
	BinMethod  BinMethod // method used for calculating bin value
}

type BinMethod added in v1.7.0

type BinMethod func(int, float64, float64) float64

type Smoother added in v1.6.2

type Smoother interface {
	SmoothBin(int, int, float64) float64
}

func NewSmoother added in v1.6.2

func NewSmoother(cfg SmootherConfig) Smoother

type SmootherConfig added in v1.7.0

type SmootherConfig struct {
	SampleSize      int     // number of samples per slice
	ChannelCount    int     // number of channels
	SmoothingFactor float64 // smoothing factor
}

Directories

Path Synopsis
Package window provides Window Functions for singnal analysis
Package window provides Window Functions for singnal analysis

Jump to

Keyboard shortcuts

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