Documentation
¶
Index ¶
Constants ¶
View Source
const CurveSize = 34
Variables ¶
This section is empty.
Functions ¶
func CartesianToPolar ¶
func CartesianToPolar(complex []complex128) (magnitude []float64, phase []float64)
CartesianToPolar converts a slice of complex numbers to polar coordinates, returning the magnitude and phase as separate slices.
func ComputeSpectrumWeights ¶
func ComputeSpectrumWeights(frameSize int, sampleRate float64, curve WeightingCurve) []float64
ComputeSpectrumWeights calculates the frequency weighting for a given frame size and sample rate based on the specified weighting curve.
func PrepareSpectrum ¶
PrepareSpectrum applies a Hann window to the input frame and computes the FFT, making the result suitable for pitch detection with the YIN algorithm.
Types ¶
type WeightingCurve ¶
Click to show internal directories.
Click to hide internal directories.