Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
webaudio-chnl
Advanced tools
I needed something with a LOT of audio effects integrated which can be manipulated in many different aspects. And I needed to use this in many different ways: Every native AudioNode should be able to connect to it as it would be a normal AudioNode, but also other Chnls should be able to connect to another Chnl. So I could simply and intuitively create audio graphs with a set of effects. No matter if I connect a song, mic input or even a synthesizer.
Therefore I created Chnl.
Via npm
npm i webaudio-chnl -S
It's really simple. And intuitive.
You can create a new Chnl instance by constructing the Chnl-class with your AudioContext object as the 1° parameter.
new Channel(audioCtx)
You have access to a lot of effects. Under the hood, Chnl uses the webaudio-effect-units-collection module. So you have access to a lot of effects which can be enabled and disabled.
You can access the effects with the effects property of your Chnl instance.
Example
const channel = new Chnl(audioCtx);
const {
gain,
chorus,
delay,
phaser,
overdrive,
compressor,
lowpass,
highpass,
tremolo,
wahwah,
bitcrusher,
moog,
pingPongDelay
} = channel.effects;
gain.setValue('gain', 0.55);
delay.addEffect('delay');
delay.setValue('feedback', 0.2);
You can connect any normal AudioNode to a Chnl:
const channel = new Chnl(audioCtx);
const gain = audioCtx.createGain();
gain.connect(channel);
But you can also connect a Chnl to a normal AudioNode:
const channel = new Chnl(audioCtx);
const gain = audioCtx.createGain();
channel.connect(gain);
You can even connect one Chnl to another one:
const channel1 = new Chnl(audioCtx);
const channel2 = new Chnl(audioCtx);
channel1.connect(channel2);
Have fun connecting!
Per default, no effect is connected in the interior audio graph. In previous versions, this was the case. I decided to revise the way how effects are used. Because if all effects are initially actively connected, there's way more needless audio processing (also if the effects are initially turned off). Therefore I decided to connect the effects only if they are explicitly needed.
TLDR: Before using an effect, you need to activate it. When activating an effect, the whole audiograph will be rebuilt.
Note: The 'gain'-effect is already activated by default.
Example:
const chnl = new Chnl(audioCtx);
chnl.addEffect('delay');
chnl.addEffect('chorus');
chnl.effects.delay.setValue('delayTime', 500);
Since you can activate an effect, it's no surprise that you can also disable the same effect. When you disable an effect, it will be removed from the audiograph to prevent needless processing. Example:
const chnl = new Chnl(audioCtx);
chnl.addEffect('delay');
chnl.effects.delay.setValue('delayTime', 500);
chnl.removeEffect('chorus');
This a bit more advanced example, which connects an oscillator to a Chnl and applies some effects.
const audioCtx = new AudioContext();
const chnl = new Chnl(audioCtx);
const osci = audioCtx.createOscillator();
osci.frequency.value = 300;
osci.connect(chnl);
chnl.connect(audioCtx.destination);
// Activate effects
chnl.addEffect('highpass');
chnl.addEffect('bitcrusher');
chnl.effects.gain.setValue('gain', 0.2);
chnl.effects.highpass.setValue('frequency', 500);
chnl.effects.bitcrusher.setValue('bits', 4);
osci.start();
FAQs
Chnl - one channel, all effects.
The npm package webaudio-chnl receives a total of 2 weekly downloads. As such, webaudio-chnl popularity was classified as not popular.
We found that webaudio-chnl 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.