Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pixijs/sound
WebAudio API playback library, with filters. Modern audio playback for modern browsers.
https://github.com/pixijs/sound
javascript-library pixi pixijs webaudio webaudio-api webaudio-api-playback
Last synced: 3 days ago
JSON representation
WebAudio API playback library, with filters. Modern audio playback for modern browsers.
- Host: GitHub
- URL: https://github.com/pixijs/sound
- Owner: pixijs
- License: mit
- Created: 2017-02-03T17:41:48.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T05:27:34.000Z (3 months ago)
- Last Synced: 2024-10-29T21:06:14.122Z (about 1 month ago)
- Topics: javascript-library, pixi, pixijs, webaudio, webaudio-api, webaudio-api-playback
- Language: TypeScript
- Homepage: https://pixijs.io/sound/examples/
- Size: 5.15 MB
- Stars: 406
- Watchers: 15
- Forks: 68
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-game-engine-dev - PixiJS Sound - Audio library with filters, built on _PixiJS_. [[Examples](https://pixijs.io/sound/examples/)] (Libraries / JavaScript)
- awesome-list - sound
README
# PixiJS Sound
WebAudio API playback library, with filters. Modern audio playback for modern browsers.
[![Node.js CI](https://github.com/pixijs/sound/workflows/Node.js%20CI/badge.svg)](https://github.com/pixijs/sound/actions?query=workflow%3A%22Node.js+CI%22) [![npm version](https://badge.fury.io/js/%40pixi%2Fsound.svg)](https://badge.fury.io/js/%40pixi%2Fsound)
**Features**
* Pausing and resuming
* Independent volume control
* Support blocking or layered sounds (multiple instances)
* Support for `PIXI.Assets` system
* Dynamic filters:
* ReverbFilter
* DistortionFilter
* EqualizerFilter
* StereoFilter
* TelephoneFilter**Known Compatibility**
* Chrome 58+
* Firefox 52+
* Safari 11+
* iOS 11+## Usage
Installation is available by [NPM](https://npmjs.org):
```bash
npm i @pixi/sound --save
```To import into your project, for instance, when using [Webpack](https://webpack.js.org/), [Parcel](https://parceljs.org/), [Rollup](https://rollupjs.org/), or another bundler:
```typescript
import { sound } from '@pixi/sound';sound.add('my-sound', 'path/to/file.mp3');
sound.play('my-sound');
```### Browser Usage
If you're using a `` element to import `@pixi/sound` into your project, then the SoundLibrary object is `PIXI.sound` global.
```html
<!-- PixiJS must be imported before @pixi/sound -->
<script src="https://unpkg.com/pixi.js/dist/browser/pixi.min.js">PIXI.sound.add('my-sound', 'path/to/file.mp3');
PIXI.sound.play('my-sound');```
### Versions Compatibility
| PixiJS | PixiJS Sound |
|---|---|
| v5.x - v6.x | v4.x |
| v7.x | v5.x |
| v8.x | v6.x |### Resources
* [Releases](https://github.com/pixijs/sound/releases)
* [Basics](https://pixijs.io/sound/examples/index.html)
* [Sprites](https://pixijs.io/sound/examples/sprites.html)
* [Filters](https://pixijs.io/sound/examples/filters.html)
* [Demo](https://pixijs.io/sound/examples/demo.html)
* [API Documentation](https://pixijs.io/sound/docs/index.html)## License
MIT License.