internal

package
v0.0.0-...-4470139 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 3 Imported by: 0

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

func PrepareSpectrum(frame []float64) []float64

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

type WeightingCurve [CurveSize]float32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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