module

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delay added in v0.4.0

type Delay struct {
	Module
	Time float64 `yaml:"time"`
	Gain float64 `yaml:"gain"`
	In   string  `yaml:"in"`
	CV   string  `yaml:"cv"`
	Mod  string  `yaml:"mod"`
	Fade float64 `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Delay) Step added in v0.4.0

func (d *Delay) Step(modules *ModuleMap)

func (*Delay) Update added in v0.4.0

func (d *Delay) Update(new *Delay)

type DelayMap added in v0.4.0

type DelayMap map[string]*Delay

func (DelayMap) Initialize added in v0.4.0

func (m DelayMap) Initialize(sampleRate float64)

type Envelope

type Envelope struct {
	Module
	Attack  float64 `yaml:"attack"`
	Decay   float64 `yaml:"decay"`
	Release float64 `yaml:"release"`
	Peak    float64 `yaml:"peak"`
	Level   float64 `yaml:"level"`
	Gate    string  `yaml:"gate"`
	Fade    float64 `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Envelope) Step

func (e *Envelope) Step(t float64, modules *ModuleMap)

func (*Envelope) Update added in v0.4.0

func (e *Envelope) Update(new *Envelope)

type EnvelopeMap

type EnvelopeMap map[string]*Envelope

func (EnvelopeMap) Initialize

func (m EnvelopeMap) Initialize(sampleRate float64)

type Filter

type Filter struct {
	Module
	Type  filterType `yaml:"type"`
	Freq  float64    `yaml:"freq"`
	Width float64    `yaml:"width"`
	CV    string     `yaml:"cv"`
	Mod   string     `yaml:"mod"`
	In    string     `yaml:"in"`
	Fade  float64    `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Filter) Step

func (f *Filter) Step(modules *ModuleMap)

func (*Filter) Update added in v0.4.0

func (f *Filter) Update(new *Filter)

type FilterMap

type FilterMap map[string]*Filter

func (FilterMap) Initialize

func (m FilterMap) Initialize(sampleRate float64) error

type Gate

type Gate struct {
	Module
	BPM    float64   `yaml:"bpm"`
	CV     string    `yaml:"cv"`
	Mod    string    `yaml:"mod"`
	Signal []float64 `yaml:"signal"`
	Index  int       `yaml:"index"`
	Fade   float64   `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Gate) Step

func (g *Gate) Step(modules *ModuleMap)

func (*Gate) Update added in v0.4.0

func (g *Gate) Update(new *Gate)

type GateMap

type GateMap map[string]*Gate

func (GateMap) Initialize added in v0.4.0

func (m GateMap) Initialize(sampleRate float64)

type IModule

type IModule interface {
	Current() Output
}

type Mixer

type Mixer struct {
	Module
	Gain float64            `yaml:"gain"`
	CV   string             `yaml:"cv"`
	Mod  string             `yaml:"mod"`
	In   map[string]float64 `yaml:"in"`
	Fade float64            `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Mixer) Step

func (m *Mixer) Step(modules *ModuleMap)

func (*Mixer) Update added in v0.4.0

func (m *Mixer) Update(new *Mixer)

type MixerMap

type MixerMap map[string]*Mixer

func (MixerMap) Initialize

func (m MixerMap) Initialize(sampleRate float64) error

type Module

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

func (*Module) Current

func (m *Module) Current() Output

type ModuleMap

type ModuleMap = concurrency.SyncMap[string, IModule]

func NewModuleMap added in v0.4.0

func NewModuleMap(m map[string]IModule) *ModuleMap

type Noise

type Noise struct {
	Module
}

func (*Noise) Step

func (n *Noise) Step()

type NoiseMap

type NoiseMap map[string]*Noise

type Oscillator

type Oscillator struct {
	Module
	Type  oscillatorType `yaml:"type"`
	Freq  float64        `yaml:"freq"`
	CV    string         `yaml:"cv"`
	Mod   string         `yaml:"mod"`
	Phase float64        `yaml:"phase"`
	Fade  float64        `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Oscillator) Step

func (o *Oscillator) Step(modules *ModuleMap)

func (*Oscillator) Update added in v0.4.0

func (o *Oscillator) Update(new *Oscillator)

type OscillatorMap

type OscillatorMap map[string]*Oscillator

func (OscillatorMap) Initialize

func (m OscillatorMap) Initialize(sampleRate float64) error

type Output

type Output struct {
	Mono, Left, Right float64
}

type Pan

type Pan struct {
	Module
	Pan  float64 `yaml:"pan"`
	Mod  string  `yaml:"mod"`
	In   string  `yaml:"in"`
	Fade float64 `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Pan) Step

func (p *Pan) Step(modules *ModuleMap)

func (*Pan) Update added in v0.4.0

func (p *Pan) Update(new *Pan)

type PanMap

type PanMap map[string]*Pan

func (PanMap) Initialize

func (m PanMap) Initialize(sampleRate float64)

type Sampler

type Sampler struct {
	Module
	In      string `yaml:"in"`
	Trigger string `yaml:"trigger"`
	// contains filtered or unexported fields
}

func (*Sampler) Step

func (s *Sampler) Step(modules *ModuleMap)

func (*Sampler) Update added in v0.4.0

func (s *Sampler) Update(new *Sampler)

type SamplerMap

type SamplerMap map[string]*Sampler

type Sequencer

type Sequencer struct {
	Module
	Sequence  []string `yaml:"sequence"`
	Trigger   string   `yaml:"trigger"`
	Pitch     float64  `yaml:"pitch"`
	Transpose float64  `yaml:"transpose"`
	Randomize bool     `yaml:"randomize"`
	Index     int      `yaml:"index"`
	// contains filtered or unexported fields
}

func (*Sequencer) Step

func (s *Sequencer) Step(modules *ModuleMap)

func (*Sequencer) Update added in v0.4.0

func (s *Sequencer) Update(new *Sequencer)

type SequencerMap

type SequencerMap map[string]*Sequencer

func (SequencerMap) Initialize

func (m SequencerMap) Initialize() error

type SignalFunc

type SignalFunc func(x float64) float64

func NoSignalFunc

func NoSignalFunc() SignalFunc

func ReverseSawtoothSignalFunc

func ReverseSawtoothSignalFunc() SignalFunc

func SawtoothSignalFunc

func SawtoothSignalFunc() SignalFunc

func SineSignalFunc

func SineSignalFunc() SignalFunc

func SquareSignalFunc

func SquareSignalFunc() SignalFunc

func TriangleSignalFunc

func TriangleSignalFunc() SignalFunc

type Wavetable

type Wavetable struct {
	Module
	Freq   float64   `yaml:"freq"`
	CV     string    `yaml:"cv"`
	Mod    string    `yaml:"mod"`
	Signal []float64 `yaml:"signal"`
	Fade   float64   `yaml:"fade"`
	// contains filtered or unexported fields
}

func (*Wavetable) Step

func (w *Wavetable) Step(modules *ModuleMap)

func (*Wavetable) Update added in v0.4.0

func (w *Wavetable) Update(new *Wavetable)

type WavetableMap

type WavetableMap map[string]*Wavetable

func (WavetableMap) Initialize

func (m WavetableMap) Initialize(sampleRate float64)

Jump to

Keyboard shortcuts

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