
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
altnode.alt-audio-node
Advanced tools
Base class for customized AudioNode
npm install -S altnode.alt-audio-node
constructor(audioContext: AudioContext)
context: AudioContext
These methods are noop that should be overridden by a subclass.
connect(...args): void
disconnect(...args): void
dispose(): void
These methods are optional for customized AudioNode.
__connectFrom(source: global.AudioNode, output = 0, input = 0): void
__disconnectFrom(source: global.AudioNode, output = 0): void
import AltAudioNode from "altnode.alt-audio-node";
export default class FeedbackDelayNode extends AltAudioNode {
constructor(audioContext, maxDelayTime = 1) {
super(audioContext);
this._delay = audioContext.createDelay(maxDelayTime);
this._feedback = audioContext.createGain();
this._delay.connect(this._feedback);
this._feedback.connect(this._delay);
}
get delayTime() {
return this._delay.delayTime;
}
get feedback() {
return this._feedback.gain;
}
connect(...args) {
this._delay.connect(...args);
}
disconnect(...args) {
this._delay.disconnect(...args);
}
dispose() {
this._delay.disconnect();
this._feedback.disconnect();
this._delay = null;
this._feedback = null;
}
__connectFrom(source, ...args) {
source.connect(this._delay, ...args);
}
__disconnectFrom(source, ...args) {
source.disconnect(this._delay, ...args);
}
}
import FeedbackDelayNode from "./FeedbackDelayNode";
let audioContext = new AudioContext();
let bufSrc = audioContext.createBufferSource();
let delay = new FeedbackDelayNode(audioContext);
bufSrc.buffer = RhythmLoop;
bufSrc.loop = true;
bufSrc.start();
bufSrc.connect(delay); // call delay.__connectFrom with [ bufSrc ]
delay.delayTime.value = 0.75;
delay.feedback.value = 0.9;
delay.connect(audioContext.destination);
MIT
FAQs
Base class for customized AudioNode
We found that altnode.alt-audio-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.