f0

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2014 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

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

Package f0 provides support for fundamental frequency estimation.

Index

Constants

View Source
const (
	DefaultBufferSize = 2048
	DefaultThreshold  = 0.15
)

Variables

This section is empty.

Functions

func SWIPE

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

Types

type YIN

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

func NewYIN(sampleRate int) *YIN

NewYIN returns a new YIN instantce.

func (*YIN) AbsoluteThreshold

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

Step 4: Absolute threshold

func (*YIN) ComputeF0

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

func (y *YIN) CumulativeMeanNormalizedDifference()

Step 3: Cumulative mean normalized difference function

func (*YIN) Difference

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

Step 2: Difference function

func (*YIN) ParabolicInterpolation

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

Step 5: Parabolic Interpolation

Jump to

Keyboard shortcuts

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