Skip to content

linoleum-js/equalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

10-way equalizer

An article about how it works (rus)
List of supported formats.
Can i use - support of Web Audio API

Try it online

Usage:

* Add script to your html: ```html <script src="path/to/equalizer.min.js"></script> <script> // your code goes here * </script> ``` or _require_ it ```javascript require([ 'path/to/equalizer' ], function (equalizer) { // or here * }); ``` * Use it: ```javascript var equalizer = new Equalizer({ // css selector of your audio element or element itself (existing) audio: '.my-audio-element', // css selector of input elements or NodeList itself, if they already exist inputs: '.my-inputs', // otherwise, you can specify container element (existing). // input elements will be created and append to this container. // css selector of container element or element itself container: '.my-container' }); // You have to specify inputs (if they're already created) OR container, // if you want to create inputs dynamically // (jQuery objects are also allowed)

// then you can turn off it equalizer.disconnect(); // and turn on equalizer.connect();


Also there's couple of events:
```javascript
new Equalizer({
  /* param */
}).on('error', function (data) {
  // do some error stuff. i.e. hide controls
  console.log(data.message);
}).on('change', function (data) {
  console.log('input no.' + data.index + ' changed. new value is ' + data.value);
});

Full list of events available for now: error, change, disconnect, connect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published