Class: Player

Player

new Player()

Creates a Player.
Source:

Methods

<private> _connect(nodeA, nodeB)

Connects audio nodes.
Parameters:
Name Type Description
nodeA Object A Web Audio node.
nodeB Object A Web Audio node.
Source:

<private> _loop()

Updates audio node properties.
Source:

configure(context)

Sets audio node configuration.
Parameters:
Name Type Description
context Object A Web Audio object.
Source:

init(opt_options=)

Configures an audio context.
Parameters:
Name Type Argument Default Description
opt_options= Object <optional>
A map of initial properties.
opt_options.perlin boolean <optional>
true When set to true, the oscillators' frequencies cycle via Perlin noise.
opt_options.reverb number <optional>
4 Reverb level.
opt_options.delayTime number <optional>
0 Delay time.
opt_options.oscAFreq number <optional>
150 Oscillator A's initial frequency.
opt_options.oscBFreq number <optional>
200 Oscillator B's initial frequency.
opt_options.oscARate number <optional>
0.001 Oscillator A's cycle rate through its frequency min/max.
opt_options.oscBRate number <optional>
-0.001 Oscillator B's cycle rate through its frequency min/max.
opt_options.freqMin number <optional>
150 The oscillators' minimum frequency.
opt_options.freqMax number <optional>
200 The oscillators' maximum frequency.
opt_options.volume number <optional>
0.25 The player's initial volume. Valid values between 0 and 1.
opt_options.volumeMin number <optional>
0.1 The player's minimum volume. Valid values between 0 and 1.
opt_options.volumeMax number <optional>
0.25 The player's maximum volume. Valid values between 0 and 1.
opt_options.beforeStep function <optional>
function() {} A function called at the beginning of each animation frame.
Source: