synth

package
v0.0.0-...-f7f1fa4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(sampleRate int, channelCount int, bitDepthInBytes int) (*oto.Context, chan struct{}, error)

Types

type Configuration

type Configuration struct {
	SampleRate      int
	ChannelCount    int
	BitDepthInBytes int
}

type Output

type Output struct {
	Source Source
	// contains filtered or unexported fields
}

func (*Output) Read

func (out *Output) Read(buf []byte) (int, error)

func (*Output) Stop

func (out *Output) Stop()

type Signal

type Signal struct {
	// contains filtered or unexported fields
}

func NewSig

func NewSig(freq float32) *Signal

func (*Signal) Next

func (sg *Signal) Next() float32

func (*Signal) SetFreq

func (sg *Signal) SetFreq(f float32)

type Source

type Source interface {
	Next() float32
}

func Gain

func Gain(gain float32, src Source) Source

func Multiplex

func Multiplex(srcs ...Source) Source

type SourceFunc

type SourceFunc func() float32

func (SourceFunc) Next

func (sf SourceFunc) Next() float32

Jump to

Keyboard shortcuts

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