spectrum

package
v0.0.0-...-e8f3219 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const FrequencyUpperBound = 47000

FrequencyUpperBound is the maximum frequency analyzed. All frequencies beyond this will be discarded

Variables

This section is empty.

Functions

func PCMFromWav

func PCMFromWav(wavReader io.ReadSeeker) ([]int, int, error)

PCMFromWav reads the PCM as Buffer and the sample rate

Types

type FrequenciesAnalysis

type FrequenciesAnalysis struct {
	Spectrum []float64
	MaxFreq  int
	MinFreq  int
	MaxPower FrequencyPower
}

FrequenciesAnalysis modes an analysis of frequencies for an audio file

func FrequenciesSpectrumAnalysis

func FrequenciesSpectrumAnalysis(samples []int, sampleRate int) (FrequenciesAnalysis, error)

FrequenciesSpectrumAnalysis calculates the frequencies spectrum from a PCM sample buffer

type FrequencyPower

type FrequencyPower struct {
	Freq  int
	Value float64
}

FrequencyPower is the representation of a frequency power

Jump to

Keyboard shortcuts

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