generators

package
v0.0.0-...-d40d5fc Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constant

type Constant struct {
	Value float32
	// contains filtered or unexported fields
}

func NewConstant

func NewConstant(samplerate uint32, v float32) *Constant

func (*Constant) Read

func (c *Constant) Read(samples *snd.Samples)

func (*Constant) ReadStateless

func (c *Constant) ReadStateless(samples *snd.Samples, freq float32, _ *snd.NoteState)

func (*Constant) SetOutput

func (c *Constant) SetOutput(f snd.Writable)

type FreqModable

type FreqModable interface {
	SetFreqMod(v float32)
}

type Generator

type Generator interface {
	snd.Readable
	snd.WritableProvider
}

type Rect

type Rect struct {
	snd.BasicWritableProvider
	// contains filtered or unexported fields
}

func NewRect

func NewRect(samplerate uint32, freq float32) *Rect

func (*Rect) Read

func (r *Rect) Read(samples *snd.Samples)

func (*Rect) ReadStateless

func (r *Rect) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)

func (*Rect) SetFreqMod

func (r *Rect) SetFreqMod(v float32)

type Sample

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

func NewSample

func NewSample(samples *snd.Samples) *Sample

func (*Sample) NoteEnded

func (s *Sample) NoteEnded() bool

func (*Sample) Read

func (s *Sample) Read(samples *snd.Samples)

func (*Sample) ReadStateless

func (s *Sample) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)

func (*Sample) SetPlayFull

func (s *Sample) SetPlayFull(playFull bool)

type Sin

type Sin struct {
	snd.BasicWritableProvider

	FreqModFactor float32
	// contains filtered or unexported fields
}

func NewSin

func NewSin(freq float32) *Sin

func (*Sin) Read

func (s *Sin) Read(samples *snd.Samples)

func (*Sin) ReadStateless

func (s *Sin) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)

func (*Sin) SetFreqMod

func (s *Sin) SetFreqMod(v float32)

Jump to

Keyboard shortcuts

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