gossp: github.com/r9y9/gossp/f0 Index | Files

package f0

import "github.com/r9y9/gossp/f0"

Package f0 provides support for fundamental frequency (f0) estimatnion.

Package f0 provides support for fundamental frequency estimation.

Index

Package Files

f0.go swipe.go yin.go

Constants

const (
    DefaultBufferSize = 2048
    DefaultThreshold  = 0.15
)

func SWIPE Uses

func SWIPE(audioBuffer []float64, sampleRate int, frameShift int,
    min, max float64) []float64

SWIPE: A SAWTOOTH WAVEFORM INSPIRED PITCH ESTIMATOR FOR SPEECH AND MUSIC. http://www.cise.ufl.edu/~acamacho/publications/dissertation.pdf

type YIN Uses

type YIN struct {
    Buffer     []float64 // Buffer used in the YIN analysis
    BufferSize int
    SampleRate int
    Threshold  float64 // Threshold used in the absolute thresholding step
}

YIN represents the YIN fundamental frequency estimator.

func NewYIN Uses

func NewYIN(sampleRate int) *YIN

NewYIN returns a new YIN instantce.

func (*YIN) AbsoluteThreshold Uses

func (y *YIN) AbsoluteThreshold() (int, float64)

Step 4: Absolute threshold

func (*YIN) ComputeF0 Uses

func (y *YIN) ComputeF0(audioBuffer []float64) (float64, float64)

ComputeF0 computes f0 and its confidence for a given audio buffer. If no f0 is found, it returns pair of zeros.

func (*YIN) CumulativeMeanNormalizedDifference Uses

func (y *YIN) CumulativeMeanNormalizedDifference()

Step 3: Cumulative mean normalized difference function

func (*YIN) Difference Uses

func (y *YIN) Difference(buffer []float64)

Step 2: Difference function

func (*YIN) ParabolicInterpolation Uses

func (y *YIN) ParabolicInterpolation(tauEstimate int) float64

Step 5: Parabolic Interpolation

Package f0 imports 1 packages (graph). Updated 2016-07-22. Refresh now. Tools for package owners.