discrete

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Downsample

func Downsample(
	input []float64,
	srate float64,
	downsampleFactor, filterOrder int,
) ([]float64, error)

Downsample performs discrete downsampling using FIR lowpass filter followed by skip sampling. The input size must be >= 4 The downsample factor must be > 1. The sample rate must be positive. Returns non-nil error in case of failure.

func Resample

func Resample(
	input []float64,
	srate float64,
	upsampleFactor, downsampleFactor, filterOrder int,
) ([]float64, error)

Resample performs discrete upsampling followed by discrete downsampling. The input size must be >= 4 The upsample factor must be >= 2. The downsample factor must be >= 2. The sample rate must be positive. Returns non-nil error in case of failure.

func Upsample

func Upsample(
	input []float64,
	srate float64,
	upsampleFactor, filterOrder int,
) ([]float64, error)

Upsample upsamples by an integer upsampling factor. Returns non-nil error in case of failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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