gossp: github.com/r9y9/gossp/stft Index | Files

package stft

import "github.com/r9y9/gossp/stft"

Package stft provides support for Short-Time Fourier Transform (STFT) Analysis.

Index

Package Files

stft.go

type STFT Uses

type STFT struct {
    FrameShift int
    FrameLen   int
    Window     []float64 // window funtion
}

STFT represents Short Time Fourier Transform Analysis.

func New Uses

func New(frameShift, frameLen int) *STFT

New returns a new STFT instance.

func (*STFT) DivideFrames Uses

func (s *STFT) DivideFrames(input []float64) [][]float64

DivideFrames returns overlapping divided frames for STFT.

func (*STFT) FrameAt Uses

func (s *STFT) FrameAt(input []float64, index int) []float64

FrameAt returns frame at specified index given an input signal. Note that it doesn't make copy of input.

func (*STFT) ISTFT Uses

func (s *STFT) ISTFT(spectrogram [][]complex128) []float64

ISTFT performs invere STFT signal reconstruction and returns reconstructed signal.

func (*STFT) NumFrames Uses

func (s *STFT) NumFrames(input []float64) int

NumFrames returnrs the number of frames that will be analyzed in STFT.

func (*STFT) STFT Uses

func (s *STFT) STFT(input []float64) [][]complex128

STFT returns complex spectrogram given an input signal.

Package stft imports 2 packages (graph). Updated 2016-07-19. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).