npm.io
2.1.6 • Published 8 years ago

sono

Licence
MIT
Version
2.1.6
Deps
2
Size
780 kB
Vulns
0
Weekly
0
Stars
169

sono

NPM version Build Status

A simple yet powerful JavaScript library for working with Web Audio

http://stinkstudios.github.io/sono/

Features

  • Full audio management including loading, playback, effects and processing
  • Abstracts differences across browsers such as file types and Web Audio support
  • Web Audio effects such as 3d positioning, reverb and frequency analysis
  • Handles inputs from audio files, media elements, microphone, oscillators and scripts
  • Falls back to HTMLAudioElement where Web Audio is not supported (e.g. IE 11 and less)
  • Pauses and resumes audio playback on page visibility changes
  • Handles initial touch to unlock media playback on mobile devices

Installation

npm i -S sono

Usage

import sono from 'sono';
import 'sono/effects';
import 'sono/utils';

const sound = sono.create('boom.mp3');
sound.effects = [sono.echo(), sono.reverb()];
sound.play();

Documentation

Getting started
Sounds
Effects
Controls
Loading
Utils

Dev setup

Install dependencies
npm i
Run tests
npm i -g karma-cli
npm test
Run examples
npm run examples
Build bundles
npm run build
Watch and test
npm start