Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oscilloscope

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oscilloscope

Waveform audio visualizer using html5 canvas.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

audio-oscilloscope

Waveform audio visualizer using html5 canvas.

Require the module with browserify, or simply include oscilloscope.min.js

Methods

  • addSignal(source:AudioNode, color)
  • start()
  • stop()

Example

oscilloscope = require('..')

var context = new window.AudioContext()

// setup canvas
var canvas = document.querySelector('.visualizer')
canvas.width = window.innerWidth
canvas.height = window.innerHeight

var options = {
  stroke: 3,		// size of the wave
  glow: 0.1,		// glowing effect
  buffer: 1024  // buffer size ranging from 32 to 2048
}

// attach oscilloscope
var scope = new Oscilloscope(canvas, options)

// get user microphone
var constraints = { video: false, audio: true };
navigator.getUserMedia(constraints, function(stream) {
  var source = context.createMediaStreamSource(stream)
  scope.addSignal(source, '#00ffff')
}, function (error) {
  console.error("getUserMedia error:", error);
});

Keywords

FAQs

Package last updated on 17 Mar 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc