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.


Package Files


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 2017-09-20. Refresh now. Tools for package owners.