npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

waawire

v0.1.1

Published

More flexible audio node connections and disconnections.

Downloads

3

Readme

WAAWire

More flexible audio node connections and disconnections.

var context = new AudioContext()
  , wire = new WAAWire(context)

Disconnect a single connection, providing the same possibilities as the newly specified syntax for AudioNode.disconnect.

var osc = context.createOscillator()
  , delay = context.createDelay()
  , wireDelay = new WAAWire(context), wireDry = new WAAWire(context)
wireDelay.connect(osc, delay)
wireDry.connect(osc, context.destination)
wireDry.close()

Connect / disconnect a node at a precise time in the future

wire.atTime(5).connect(source, destination)
wire.atTime(12).close()

swap a source and / or a destination

wire.atTime(5).connect(source1, destination1)
wire.atTime(12).swapSource(source2)
wire.atTime(20).swapSource(destination2)

API

##WAAWire(context)

An instance of WAAWire represents a single connection between two AudioNodes, from a single output of the source node and a single input of the destination node.

###connect(source, destination, output=0, input=0)

Connects the wire. Can be called only once.

###swapSource(source, output=0)

Swaps the current source of the wire with a new source / output.

###swapDestination(destination, input=0)

Swaps the current destination of the wire with a new destination / input.

###close()

Closes the connection.

###atTime(time)

Schedules an operation to happen at a given time. All the WAAWire methods can be chained with this and therefore scheduled in the future. If time is older than context.currentTime, the operation will be executed immediately. For example :

// Will connect the nodes at time = 5s and close the connection at time = 12s
wire.atTime(5).connect(source, destination)
wire.atTime(12).close()