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

node-audio

v0.0.10

Published

<p align="center"> <img width="342" src="https://raw.githubusercontent.com/ramirezd42/node-audio/master/logo.png"> </p>

Downloads

439

Readme

npm version

What Is It?

node-audio is a graph-based audio processing library for Node.Js. It's very similar to the web-audio api. In fact in its current iteration it is little more than a binding for LabSound with some sugar on top!

The eventual goal of this project is to expand upon the possibilites offered by the Web Audio API for Node.js based platforms by making it easier to develop custom AudioNode types to suit your specific needs.

WARNING!!!:

This library is in an extremely experimental state. Large portions of functionally have yet to be implemented and it is currently only buildable for MacOSX. However, since everything is built with cross-platform libraries (namely Boost, LabSound and JUCE, supporting other operating systems shouldn't be too difficult if there's interest. That said...

How can I help?

If you find node-audio helpful or want to help get it to a point where you think it COULD be helpful, there's a couple of ways you can contribute:

Submit a PR:

Missing something you need to make this a viable tool for your use case? Submit a PR!

Create an issue

Need something, but don't have to time to contribute or aren't sure how? Open up an issue, I'd love to talk about it!

What do we have so far?

Graph API

Currently only a small subset of the web-audio-api is available. In lieue of api documentation for the time being you can check out the src/module.cc file to see what bindings are being made available.

PluginNode

The only custom node type available right now is a "PluginNode". This can be used to instantiate an audio plugin and connect it to the graph as you would any other node. It currently supports only VST3 plugins, but the host process is built with JUCE so adding support for other formats like VST and AudioUnit shouldn't be too much work.

What's Next

The next things I plan to tackle are:

Get closer to feature compatability with current web-audio-api

I think now that the foundation is laid this is more or less busy work. One of those things that's hard to justify until you need to use a certain piece of the api that's not available. PRs especially welcome here!

Develop some means of support for developing and packaging custom nodes as npm packages.

I would really like to get to the point where developers can create custom node types that are npm installed as a dependency in a project using node-audio. I really want to get the plugin node out into a separate repo as well since it has some pretty heavy dependencies that ideally wouldn't be required by node-audio project itself


Installation

Installation can be done via npm. Warning: this currently takes a LONG time to build!

> npm install --save node-audio

Usage Examples

The example below will play back an audio file, and manipulate the audio via a VST3 plugin a pan node and a gain node:

const { NodeAudio, StereoPannerNode, GainNode, SoundBuffer, PluginNode } = require('node-audio')

const ctx = NodeAudio.makeAudioContext()

const panNode = new StereoPannerNode(ctx.sampleRate())
panNode.pan().setValue(0)

const gainNode = new GainNode(ctx.sampleRate())
gainNode.gain().setValue(0.5)

const pluginNode = new PluginNode('/Path/to/plugin.vst3', ctx.sampleRate())

gainNode.connect(ctx, panNode, 0, 0)
panNode.connect(ctx, pluginNode, 0, 0)
pluginNode.connect(ctx, ctx.destination(), 0, 0)

const buffer = new SoundBuffer('/Path/to/audiofile.wav', ctx.sampleRate())
buffer.playOnNode(ctx, gainNode, 0)

while(true){}