Documentation ¶
Index ¶
- type PulseSignal
- func (g *PulseSignal) Generate(count int) (samples []float64)
- func (g *PulseSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
- func (g *PulseSignal) WithBitDepth(d int) *signal
- func (g *PulseSignal) WithDutyCycle(v float64) *PulseSignal
- func (g *PulseSignal) WithSampleRate(rate int) *signal
- type SawtoothSignal
- func (g *SawtoothSignal) Generate(count int) (samples []float64)
- func (g *SawtoothSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
- func (g *SawtoothSignal) WithBitDepth(d int) *signal
- func (g *SawtoothSignal) WithDutyCycle(v float64) *SawtoothSignal
- func (g *SawtoothSignal) WithSampleRate(rate int) *signal
- type SignalGenerator
- type SineSignal
- type SquareSignal
- type TriangleSignal
- type WhiteNoiseSignal
- func (g *WhiteNoiseSignal) Generate(count int) (samples []float64)
- func (g *WhiteNoiseSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
- func (g *WhiteNoiseSignal) WithBitDepth(d int) *signal
- func (g *WhiteNoiseSignal) WithSampleRate(rate int) *signal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PulseSignal ¶
type PulseSignal struct {
// contains filtered or unexported fields
}
func NewPulseSignal ¶
func NewPulseSignal(freq float64) *PulseSignal
func (*PulseSignal) Generate ¶
func (g *PulseSignal) Generate(count int) (samples []float64)
func (*PulseSignal) GenerateAudioSegment ¶
func (g *PulseSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*PulseSignal) WithBitDepth ¶
func (g *PulseSignal) WithBitDepth(d int) *signal
func (*PulseSignal) WithDutyCycle ¶
func (g *PulseSignal) WithDutyCycle(v float64) *PulseSignal
func (*PulseSignal) WithSampleRate ¶
func (g *PulseSignal) WithSampleRate(rate int) *signal
type SawtoothSignal ¶
type SawtoothSignal struct {
// contains filtered or unexported fields
}
func NewSawtoothSignal ¶
func NewSawtoothSignal(freq float64) *SawtoothSignal
func (*SawtoothSignal) Generate ¶
func (g *SawtoothSignal) Generate(count int) (samples []float64)
func (*SawtoothSignal) GenerateAudioSegment ¶
func (g *SawtoothSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*SawtoothSignal) WithBitDepth ¶
func (g *SawtoothSignal) WithBitDepth(d int) *signal
func (*SawtoothSignal) WithDutyCycle ¶
func (g *SawtoothSignal) WithDutyCycle(v float64) *SawtoothSignal
func (*SawtoothSignal) WithSampleRate ¶
func (g *SawtoothSignal) WithSampleRate(rate int) *signal
type SignalGenerator ¶
type SineSignal ¶
type SineSignal struct {
// contains filtered or unexported fields
}
func NewSineSignal ¶
func NewSineSignal(frequency float64) *SineSignal
func (*SineSignal) Generate ¶
func (g *SineSignal) Generate(count int) (samples []float64)
func (*SineSignal) GenerateAudioSegment ¶
func (g *SineSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*SineSignal) WithBitDepth ¶
func (g *SineSignal) WithBitDepth(d int) *signal
func (*SineSignal) WithSampleRate ¶
func (g *SineSignal) WithSampleRate(rate int) *signal
type SquareSignal ¶
type SquareSignal struct {
PulseSignal
}
func NewSquareSignal ¶
func NewSquareSignal(freq float64) *SquareSignal
func (*SquareSignal) GenerateAudioSegment ¶
func (g *SquareSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*SquareSignal) WithBitDepth ¶
func (g *SquareSignal) WithBitDepth(d int) *signal
func (*SquareSignal) WithSampleRate ¶
func (g *SquareSignal) WithSampleRate(rate int) *signal
type TriangleSignal ¶
type TriangleSignal struct {
SawtoothSignal
}
func NewTriangleSignal ¶
func NewTriangleSignal(freq float64) *TriangleSignal
func (*TriangleSignal) GenerateAudioSegment ¶
func (g *TriangleSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*TriangleSignal) WithBitDepth ¶
func (g *TriangleSignal) WithBitDepth(d int) *signal
func (*TriangleSignal) WithSampleRate ¶
func (g *TriangleSignal) WithSampleRate(rate int) *signal
type WhiteNoiseSignal ¶
type WhiteNoiseSignal struct {
// contains filtered or unexported fields
}
func NewWhiteNoiseSignal ¶
func NewWhiteNoiseSignal() *WhiteNoiseSignal
func (*WhiteNoiseSignal) Generate ¶
func (g *WhiteNoiseSignal) Generate(count int) (samples []float64)
func (*WhiteNoiseSignal) GenerateAudioSegment ¶
func (g *WhiteNoiseSignal) GenerateAudioSegment(duration time.Duration, volume godub.Volume) (*godub.AudioSegment, error)
Generate generates an audio segment with given duration and volume.
func (*WhiteNoiseSignal) WithBitDepth ¶
func (g *WhiteNoiseSignal) WithBitDepth(d int) *signal
func (*WhiteNoiseSignal) WithSampleRate ¶
func (g *WhiteNoiseSignal) WithSampleRate(rate int) *signal
Click to show internal directories.
Click to hide internal directories.