Versions in this module Expand all Collapse all v0 v0.1.0 Jan 18, 2025 Changes in this version + const Tau + func FlatlineFunction(angle float64) float64 + func RevSawtoothFunction(angle float64) float64 + func SawtoothFunction(angle float64) float64 + func SineFunction(angle float64) float64 + func SquareFunction(angle float64) float64 + func TriangleFunction(angle float64) float64 + type FunctionGenerator struct + Frequency float64 + func NewFunctionGenerator(sampleRate uint) *FunctionGenerator + func (fg *FunctionGenerator) GetNextSample() float64 + func (fg *FunctionGenerator) Reset() + func (fg *FunctionGenerator) SetFunction(wf WaveFunction) + func (fg *FunctionGenerator) ShiftPhase(angleDeg float64) + func (fg FunctionGenerator) GetSampleRate() uint + type Generator interface + GetNextSample func() float64 + GetSampleRate func() uint + Reset func() + type NoiseGenerator struct + func NewNoiseGenerator(sampleRate uint) *NoiseGenerator + func (ng *NoiseGenerator) Reset() + func (ng *NoiseGenerator) SetNoiseType(noiseType NoiseType) error + func (ng *NoiseGenerator) SetSeed(seed int64) + func (ng NoiseGenerator) GetNextSample() float64 + type NoiseType int + const BlueNoise + const PinkNoise + const RedNoise + const VioletNoise + const WhiteNoise + type WaveFunction func(float64) float64