siggen

package
Version: v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package siggen provides basic timeseries generation wrappers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(sig ...[]float64) []float64

Add adds one or more slices of floats together returning a signal with a length equal to the longest signal passed in

func Append

func Append(in []float64, sig ...[]float64) []float64

Append adds a series of signals to the input signal extending the length

func Line

func Line(slope, offset float64, n int) []float64

Line creates a line given a slope, offset and number of data points

func Noise

func Noise(amp float64, n int) []float64

Noise creates a noise signal centered around 0

func Rect added in v0.2.0

func Rect(amp, offset, width, sampleRate, durationSec float64) []float64

Rect creates a rectangular signal with the specified width and offset from center.

func Sawtooth

func Sawtooth(amp, freq, phase, offset, sampleRate, durationSec float64) []float64

Sawtooth produces a sawtooth wave with a given amplitude, frequency, phase, sampleRate and duration in seconds

func Sin

func Sin(amp, freq, phase, offset, sampleRate, durationSec float64) []float64

Sin produces a sin wave with a given amplitude, frequency, phase, sampleRate and duration in seconds

func Square

func Square(amp, freq, phase, offset, sampleRate, durationSec float64) []float64

Square produces a square wave with a given amplitude, frequency, phase, sampleRate and duration in seconds

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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