
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
XSound gives Web Developers Powerful Audio Features Easily !
In concrete, XSound is useful to implement the following features.
XSound don't depend on other libraries or frameworks (For example, jQuery, React).
In case of using as full stack (For example, use oscillator) ...
X('oscillator').setup([true, true, false, false]).ready(2, 5).start([440, 880]).stop();
or, in case of using as module base (For example, use chorus effector) ...
// The instance of `AudioContext`
const context = X.get();
// Create the instance of `Chorus` that is defined by XSound
const chorus = new X.Chorus(context);
const oscillator = context.createOscillator();
// The instance that is defined by XSound has connectors for input and output
oscillator.connect(chorus.INPUT);
chorus.OUTPUT.connect(context.destination);
// Set parameters for chorus
chorus.param({
time : 0.025,
depth: 0.5,
rate : 2.5,
mix : 0.5
});
// Activate
chorus.activate();
oscillator.start(0);
XSound enable to using the following classes (Refer to API Documentation for details).
X.Analyser(context: AudioContext);
X.Recorder(context: AudioContext);
// Effectors
X.Autopanner(context: AudioContext);
X.BitCrusher(context: AudioContext);
X.Chorus(context: AudioContext);
X.Compressor(context: AudioContext);
X.Delay(context: AudioContext);
X.Equalizer(context: AudioContext);
X.Filter(context: AudioContext);
X.Flanger(context: AudioContext);
X.Fuzz(context: AudioContext);
X.Listener(context: AudioContext);
X.NoiseGate(context: AudioContext);
X.NoiseSuppressor(context: AudioContext);
X.OverDrive(context: AudioContext);
X.Panner(context: AudioContext);
X.Phaser(context: AudioContext);
X.PitchShifter(context: AudioContext);
X.Preamp(context: AudioContext);
X.Reverb(context: AudioContext);
X.Ringmodulator(context: AudioContext);
X.Stereo(context: AudioContext);
X.Tremolo(context: AudioContext);
X.VocalCanceler(context: AudioContext);
X.Wah(context: AudioContext);
XSound.app uses this library.
Now, I'm creating website for Web Audio API. Please refer to the following site for understanding API Documentation.
$ npm install --save xsound
or,
$ pnpm install xsound
In case of using ES Modules,
import { XSound, X } from 'xsound';
If SSR (Server-Side Rendering), use dynamic imports,
async () => {
const { XSound, X } = await import('xsound');
};
In case of using CDN,
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/xsound@latest/build/xsound.min.js"></script>
$ git clone git@github.com:Korilakkuma/XSound.git
$ cd XSound
$ npm install
$ npm run build # for build WebAssembly Modules
$ npm run dev
$ open http://localhost:8080/playground/
$ git clone git@github.com:Korilakkuma/XSound.git
$ cd XSound
$ npm install
$ npm run build # for build WebAssembly Modules
$ npm run watch
$ docker compose up -d --build
$ open http://localhost:8080/playground/
Use WebAssembly Modules on v4 or later.
Therefore, it is required to set up emsdk (Refer to details).
$ git clone https://github.com/emscripten-core/emsdk.git # Use an another directory excepte XSound directory
$ cd emsdk
$ ./emsdk install latest
$ ./emsdk activate latest
$ source ./emsdk_env.sh
$ cd /${path}/XSound
# If error occurred, execute `softwareupdate --install-rosetta`, then retry (in case of using macOS)
XSound Playground (Watch by YouTube).
Please refer to API Documentation for details.
// Bad (v2 or earlier)
X('audio').module('panner').param({ coneinnerangle: 240 });
// Good (v3)
X('audio').module('panner').param({ coneInnerAngle: 240 });
// Bad (v2 or earlier)
X('oscillator').get(0).param('type', 'sawtooth');
// Good (v3)
X('oscillator').get(0).param({ type: 'sawtooth' });
if ((type === 'sine') || (type === 'square') || (type === 'sawtooth') || (type === 'triangle')) {
X('oscillator').get(0).param({ type });
}
If use bundle tool and compress class names such as webpack and terser-webpack-plugin
,
must add the following options (because of using inline AudioWorkletProcessor
).
new TerserWebpackPlugin({
// ... other options
terserOptions: {
keep_classnames: /^.*?Processor$/
}
})
XSound is a batteries-included library for everything audio. From basic management and loading through streaming, effects, ending with visualizations and recording, this libraries provides almost everything! It also has nice, semi-chainable API with solid documentation.
In this section, we discuss the effectiveness of DeView’s Web API profiling in terms of code coverage. We choose three popular PWAs: Starbucks, Telegram [112], and XSound [57] from eCommerce, social media, and productivity categories, respectively.
Released under the MIT license
FAQs
XSound gives Web Developers Powerful Audio Features Easily !
The npm package xsound receives a total of 471 weekly downloads. As such, xsound popularity was classified as not popular.
We found that xsound demonstrated a healthy version release cadence and project activity because the last version was released less than 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
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.