generators

package
v0.0.0-...-cde226e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator(sr beep.SampleRate, freq int, oscFunc GeneratorFunction) (*generator, error)

Types

type ChainGenerator

type ChainGenerator struct {
	GeneratorFuncs []GeneratorFunction
}

func (*ChainGenerator) ChainFunc

func (g *ChainGenerator) ChainFunc(stat float64, delta float64) float64

type GeneratorFunction

type GeneratorFunction func(stat float64, delta float64) float64

type OscStream

type OscStream struct {
	Stat    float64 // progress from 0 to 1
	Delta   float64 // space between two calculation
	OscFunc GeneratorFunction
}

create stream which will produce infinite osciator tone 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 (*OscStream) Err

func (c *OscStream) Err() error

func (*OscStream) Stream

func (c *OscStream) Stream(buf [][2]float64) (int, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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