Socket
Socket
Sign inDemoInstall

equalizer.js

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    equalizer.js

An audio analysis tool for real-time and choreographed visualizations.


Version published
Weekly downloads
7
decreased by-46.15%
Maintainers
1
Install size
94.0 kB
Created
Weekly downloads
 

Readme

Source

equalizer.js

:ear: An audio analysis tool for real-time and choreographed visualizations.

  1. Accepts all valid Web Audio nodes
  2. Accepts multiple nodes at once for complex scenes
  3. Configurable resolution and frame rate
  4. Dependency free
  5. Export/import analyzed data for precise playback
  6. Added classes for easy loading of audio files

Visit the hosted project page to try it out and to export or import JSON data for use with Equalizer.

Usage

npm install --save equalizer.js

Import in ES6 environment

import { Equalizer } from 'equalizer.js';

Load Script in HTML file:

This example creates an audio oscillator and visualizes it with an instance of Equalizer.

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <script src="https://cdn.jsdelivr.net/npm/equalizer.js/build/equalizer.js"></script>
    <script>

    var playing = false;
    var context = new AudioContext(); // From Web Audio API
    var equalizer = new Equalizer(context).appendTo(document.body);

    // Create audible sound with the Web Audio API
    var osc = context.createOscillator();

    osc.type = 'square';
    osc.frequency.setValueAtTime(440, context.currentTime);
    osc.connect(context.destination);
    osc.start();

    // Add the oscillator to the equalizer
    equalizer.add(osc);

    equalizer.domElement.addEventListener('click', resume, false);
    update();

    function resume() {
      if (!(/running/.test(context.state))) {
        context.resume();
      }
    }

    function update() {
      equalizer.update();
      requestAnimationFrame(update);
    }

    </script>
  </body>
</html>

:warning: Due to the reliance on the Web Audio API, this project is not built for node.js use.

A free and open source tool by Jono Brandel

Keywords

FAQs

Last updated on 02 Jun 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc