Beispiel #1
0
func prepareWindowFunctions(frameLen int) [][]float64 {
	windowFunctions := make([][]float64, 4)
	windowFunctions[0] = window.CreateHanning(frameLen)
	windowFunctions[1] = window.CreateHamming(frameLen)
	windowFunctions[2] = window.CreateBlackman(frameLen)
	windowFunctions[3] = window.CreateGaussian(frameLen, 0.4)
	return windowFunctions
}
Beispiel #2
0
// New returns a new STFT instance.
func New(frameShift, frameLen int) *STFT {
	s := &STFT{
		FrameShift: frameShift,
		FrameLen:   frameLen,
		Window:     window.CreateHanning(frameLen),
	}

	return s
}