Documentation
¶
Index ¶
- type Mixer
- type Oscillator
- func (O *Oscillator) Amplitude() float64
- func (O *Oscillator) Duty() float64
- func (O *Oscillator) Frequency() float64
- func (O *Oscillator) Pan() float64
- func (O *Oscillator) Phase() float64
- func (O *Oscillator) Read(buf []byte) (int, error)
- func (O *Oscillator) SetAmplitude(amplitude float64)
- func (O *Oscillator) SetDuty(duty float64)
- func (O *Oscillator) SetFrequency(frequency float64)
- func (O *Oscillator) SetPan(pan float64)
- func (O *Oscillator) SetPhase(phase float64)
- func (O *Oscillator) SetShape(shape string)
- func (O *Oscillator) SetSkew(skew float64)
- func (O *Oscillator) Shape() string
- func (O *Oscillator) Skew() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mixer ¶
type Mixer struct {
// contains filtered or unexported fields
}
func (*Mixer) DeleteOscillator ¶
func (*Mixer) NewOscillator ¶
func (m *Mixer) NewOscillator() *Oscillator
func (*Mixer) Oscillators ¶
func (m *Mixer) Oscillators() []*Oscillator
type Oscillator ¶
type Oscillator struct {
// contains filtered or unexported fields
}
func NewOscillator ¶
func NewOscillator(context *oto.Context, sampleRate int) *Oscillator
func (*Oscillator) Amplitude ¶
func (O *Oscillator) Amplitude() float64
func (*Oscillator) Duty ¶
func (O *Oscillator) Duty() float64
func (*Oscillator) Frequency ¶
func (O *Oscillator) Frequency() float64
func (*Oscillator) Pan ¶
func (O *Oscillator) Pan() float64
func (*Oscillator) Phase ¶
func (O *Oscillator) Phase() float64
func (*Oscillator) SetAmplitude ¶
func (O *Oscillator) SetAmplitude(amplitude float64)
Sets the amplitude of the signal. Accepts a real number from [0, 1].
func (*Oscillator) SetDuty ¶
func (O *Oscillator) SetDuty(duty float64)
Sets the duty cycle of rectangular wave. Accepts a real number from [0, 1].
func (*Oscillator) SetFrequency ¶
func (O *Oscillator) SetFrequency(frequency float64)
Sets the duty frequency of periodic signals. Accepts a real number from [10, 20000].
func (*Oscillator) SetPan ¶
func (O *Oscillator) SetPan(pan float64)
Sets the pan of the signal. Accepts a real number from [-1, 1], -1 meaning total left, and 1 total right pan.
func (*Oscillator) SetPhase ¶
func (O *Oscillator) SetPhase(phase float64)
func (*Oscillator) SetShape ¶
func (O *Oscillator) SetShape(shape string)
func (*Oscillator) SetSkew ¶
func (O *Oscillator) SetSkew(skew float64)
Sets the skewness of the triangular wave. Accepts a real number from [0, 1].
func (*Oscillator) Shape ¶
func (O *Oscillator) Shape() string
func (*Oscillator) Skew ¶
func (O *Oscillator) Skew() float64
Click to show internal directories.
Click to hide internal directories.