MDN self-hosted library · e01.org

ConstantSourceNode: offset property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
> myConstantSourceNode.offset.value = newValue;
>
js
gainNode2 = context.createGain();
gainNode3 = context.createGain();
gainNode2.gain.value = gainNode3.gain.value = 0.5;

volumeSliderControl.value = gainNode2.gain.value;

constantSource = context.createConstantSource();
constantSource.connect(gainNode2.gain);
constantSource.connect(gainNode3.gain);
js
function handleClickEvent(event) {
  constantSource.offset.value = volumeSliderControl.value;
}