
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
retro-sound
Advanced tools
retro-sound.js is Lea's new Web Audio Library for 8-bit style retro sounds, based on Web Audio API. It's an npm install away:
npm install retro-sound
Let's have a look how it works. As it is based on Web Audio API, first thing to do is to create a new AudioContext.
I also create a gain node to reduce the overall loudness a bit.
const AC = new AudioContext();
const masterVolume = AC.createGain();
masterVolume.gain.setValueAtTime(0.25, 0);
masterVolume.connect(AC.destination);
My library exports a Sound class which uses the Builder pattern to create sounds based on the four basic oscillators available in Web Audio API (triangle, singe, square and sawtooth). There are builder methods to add a couple of effects to the sound, like a modulator or a lowpass filter.
AC.resume();
const FM = new Sound(AC, 'triangle')
.withModulator('square', 6, 600, 'detune')
.withModulator('square', 12, 300, 'detune')
.withFilter('lowpass', 1000)
.toDestination(masterVolume);
FM.play('A5')
.rampToVolumeAtTime(0, 1)
.waitDispose();
There is also a WhiteNoise class. Combining it with a low-pass filter and changing it over time can create interesting effects like swooshes or percussions.
AC.resume();
const noise = new WhiteNoise(AC)
.withFilter('lowpass', 10000)
.toDestination(masterVolume);
noise.play()
.rampFilterFreqAtTime(1000, .25)
.rampToVolumeAtTime(0, .5).waitDispose();
FAQs
An 8-bit style Sound Library based on Web Audio API
The npm package retro-sound receives a total of 18 weekly downloads. As such, retro-sound popularity was classified as not popular.
We found that retro-sound 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.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.