generators

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SawtoothTone

func SawtoothTone(sr beep.SampleRate, freq float64) (beep.Streamer, error)

Creates a streamer which will procude an infinite sawtooth wave with the given frequency. use other wrappers of this package to change amplitude or add time limit. sampleRate must be at least two times grater then frequency, otherwise this function will return an error.

func SawtoothToneReversed

func SawtoothToneReversed(sr beep.SampleRate, freq float64) (beep.Streamer, error)

Creates a streamer which will procude an infinite sawtooth tone with the given frequency. sawtooth is reversed so the slope is negative. use other wrappers of this package to change amplitude or add time limit. sampleRate must be at least two times grater then frequency, otherwise this function will return an error.

func Silence added in v1.3.0

func Silence(num int) beep.Streamer

Silence returns a Streamer which streams num samples of silence. If num is negative, silence is streamed forever.

func SineTone

func SineTone(sr beep.SampleRate, freq float64) (beep.Streamer, error)

Creates a streamer which will procude an infinite sine wave with the given frequency. use other wrappers of this package to change amplitude or add time limit. sampleRate must be at least two times grater then frequency, otherwise this function will return an error.

func SquareTone

func SquareTone(sr beep.SampleRate, freq float64) (beep.Streamer, error)

Creates a streamer which will procude an infinite square wave with the given frequency. use other wrappers of this package to change amplitude or add time limit. sampleRate must be at least two times grater then frequency, otherwise this function will return an error.

func TriangleTone

func TriangleTone(sr beep.SampleRate, freq float64) (beep.Streamer, error)

Creates a streamer which will procude an infinite triangle wave with the given frequency. use other wrappers of this package to change amplitude or add time limit. sampleRate must be at least two times grater then frequency, otherwise this function will return an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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