Documentation ¶
Index ¶
- func Dispose()
- func FFT(samples []float64, freqArrayWidth int, n_bin int, ...) (freqArray []float64)
- func FloatSampleToByteArray(inB [][2]float64, outB []byte)
- func Freq2NBin(freq float64, sampleRate, n_bin int) int
- func LTTB(ctx context.Context, x []float64, y []float64, threshold int) ([]float64, []float64, error)
- func LTTB_Buffer(ctx context.Context, x, y, outx, outy []float64, threshold int) ([]float64, []float64, error)
- func Mel(freq float64) float64
- func MonoToStereo(in []float64) [][2]float64
- func NBin2Freq(i, sampleRate, n_bin int) float64
- func ParallelFFT(ctx context.Context, samples []float64, sampleRate int, freqArrayWidth int, ...) (freqArray []float64)
- func StereoToMono(in [][2]float64) []float64
- type Spectrogram
- func (st *Spectrogram) Coefficients(ctx context.Context, freqArrayWidth int) ([]float64, int, int)
- func (st *Spectrogram) Coefficients_NonBlock(ctx context.Context, freqArrayWidth int) ([]float64, int, int)
- func (st *Spectrogram) NumBin() int
- func (st *Spectrogram) ResetFFTData()
- func (st *Spectrogram) ResetSampleData()
- func (st *Spectrogram) SetNumBin(n_bin int)
- func (st *Spectrogram) SetSampleData(sampleArray []float64, sampleRate int)
- func (st *Spectrogram) SetWindowFunc(windowFn func([]float64) []float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatSampleToByteArray ¶
func LTTB ¶
func LTTB(ctx context.Context, x []float64, y []float64, threshold int) ([]float64, []float64, error)
LTTB down-samples the data to contain only threshold number of points that have the same visual shape as the original data
func LTTB_Buffer ¶
func LTTB_Buffer(ctx context.Context, x, y, outx, outy []float64, threshold int) ([]float64, []float64, error)
LTTB down-samples the data to contain only threshold number of points that have the same visual shape as the original data (With Output Buffer)
func MonoToStereo ¶
func ParallelFFT ¶
func StereoToMono ¶
Types ¶
type Spectrogram ¶
type Spectrogram struct {
// contains filtered or unexported fields
}
func NewSpectrogram ¶
func NewSpectrogram() *Spectrogram
func (*Spectrogram) Coefficients ¶
func (*Spectrogram) Coefficients_NonBlock ¶
func (*Spectrogram) NumBin ¶
func (st *Spectrogram) NumBin() int
func (*Spectrogram) ResetFFTData ¶
func (st *Spectrogram) ResetFFTData()
func (*Spectrogram) ResetSampleData ¶
func (st *Spectrogram) ResetSampleData()
func (*Spectrogram) SetNumBin ¶
func (st *Spectrogram) SetNumBin(n_bin int)
func (*Spectrogram) SetSampleData ¶
func (st *Spectrogram) SetSampleData(sampleArray []float64, sampleRate int)
func (*Spectrogram) SetWindowFunc ¶
func (st *Spectrogram) SetWindowFunc(windowFn func([]float64) []float64)
Click to show internal directories.
Click to hide internal directories.