Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class DelayNode

  1. Object
  2. AudioNode
  3. DelayNode

Delays its input by getDelayTime(), the Web Audio DelayNode. Fractional delays are linearly interpolated.

A delay is the only node that may close a cycle, as in a feedback echo:

OfflineAudioContext audio = new OfflineAudioContext(2, 44100, 44100);
OscillatorNode source = audio.createOscillator();
DelayNode echo = audio.createDelay(1);
echo.getDelayTime().setValue(0.3f);
GainNode feedback = audio.createGain();
feedback.getGain().setValue(0.4f);
source.connect(echo).connect(feedback).connect(echo);
echo.connect(audio.getDestination());

Inside a cycle the delay cannot be shorter than one render quantum (128 frames), as the specification requires.

Methods

public AudioParam getDelayTime()The delay in seconds, 0 by default, up to the maximum; an audio rate parameter.
public double getMaxDelayTime()The longest delay this node supports.

Inherited methods

Method details

getDelayTime

public AudioParam getDelayTime()
The delay in seconds, 0 by default, up to the maximum; an audio rate parameter.

Returns

the parameter

getMaxDelayTime

public double getMaxDelayTime()
The longest delay this node supports.

Returns

seconds