stft

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2014 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type STFT

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

STFT represents Short Time Fourier Transform Analysis.

func New

func New(frameShift, frameLen int) *STFT

New returns a new STFT instance.

func (*STFT) DivideFrames

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

DivideFrames returns overlapping divided frames for STFT.

func (*STFT) FrameAt

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

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

ISTFT performs invere STFT signal reconstruction and returns reconstructed signal.

func (*STFT) NumFrames

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

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

func (*STFT) STFT

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

STFT returns complex spectrogram given an input signal.

Jump to

Keyboard shortcuts

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