internal

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleRate = 22050
	Channels   = 4
)

Variables

This section is empty.

Functions

func Noise

func Noise() func(pos float64) float64

func Organ

func Organ(pos float64) float64

Organ is triangle / 2

func Phaser

func Phaser(pos float64) float64

func Pulse

func Pulse(pos float64) float64

func Saw

func Saw(pos float64) float64

func Square

func Square(pos float64) float64

func TiltedSaw

func TiltedSaw(pos float64) float64

func Triangle

func Triangle(pos float64) float64

Types

type Oscillator

type Oscillator struct {
	Func   func(pos float64) float64
	FreqHz float64
	Pos    float64
}

func (*Oscillator) NextSample

func (o *Oscillator) NextSample() (v float64)

type SampleChannels

type SampleChannels [Channels]float64

func (SampleChannels) Sum

func (s SampleChannels) Sum() float64

Jump to

Keyboard shortcuts

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