Documentation ¶
Index ¶
Constants ¶
View Source
const ( SineB = 4.0 / math.Pi SineC = -4.0 / (math.Pi * math.Pi) Q = 0.775 SineP = 0.225 )
View Source
const SawtoothA = 1.0 / math.Pi
View Source
const TringleA = 2.0 / math.Pi
View Source
const (
TwoPi = float64(2 * math.Pi)
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Osc ¶
type Osc struct { Shape WaveType Amplitude float64 DcOffset float64 Freq float64 // SampleRate Fs int PhaseOffset float64 CurrentPhaseAngle float64 // contains filtered or unexported fields }
Osc is an oscillator
func NewOsc ¶
NewOsc returns a new oscillator, note that if you change the phase offset of the returned osc, you also need to set the CurrentPhaseAngle
func (*Osc) Fill ¶
func (o *Osc) Fill(buf *audio.FloatBuffer) error
Fill fills up the pass audio Buffer with the output of the oscillator.
func (*Osc) SetAttackInMs ¶
SetAttackInMs sets the duration for the oscillator to be at full amplitude after it starts.
Directories ¶
Path | Synopsis |
---|---|
Euclidean package implements the Euclidean Algorithm to generate traditional musical rhythms.
|
Euclidean package implements the Euclidean Algorithm to generate traditional musical rhythms. |
examples
|
|
offline
generator example
|
generator example |
offline/stereo
sterep generator example
|
sterep generator example |
realtime
demo package simulating a realtime generation and processing.
|
demo package simulating a realtime generation and processing. |
Click to show internal directories.
Click to hide internal directories.