Socket
Book a DemoInstallSign in
Socket

r-audio

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

r-audio

A library of React components for building Web Audio graphs.

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

r-audio

A library of React components for building Web Audio graphs.

Objectives

👉 make Web Audio graph code more readable and representative of the graph shape

👉 make it easier to create reusable graphs

👉 make state management easier with React's one-way data bindings and single source of state

👉 represent any arbitrary directed graphs in JSX

👉 support all non-deprecated audio nodes including AudioWorklet

👉 allow interspersed HTML components in audio components

Installation

npm install r-audio

Usage example

Stereo waveshaper + amplitude modulation on a WAV loop

<RAudioContext debug={true} onInit={ctx => this.audioContext = ctx}>
  <RPipeline>
    <RBufferSource buffer={this.state.buffer} loop/>
    <RSplitChannels channelCount={2}>
      <RPipeline>
        <RWaveShaper curve={this.makeDistortionCurve(200)} />
        <RConvolver buffer={this.state.buffer} />
        <RDynamicsCompressor threshold={-50} knee={40}/>
        <RGain gain={.5} />
      </RPipeline>
      <RPipeline>
        <ROscillator frequency={1} type="sine" detune={0} connectToParam="gain" />
        <RGain gain={1} />
      </RPipeline>
    </RSplitChannels>
  </RPipeline>
</RAudioContext>

Development setup

npm install
npm run dev

The demo page will be served at localhost:8080. Use a recent version of Chrome or Firefox for the best experience.

Firefox Web Audio developer tool is especially handy (bear in mind Firefox does not support AudioWorklet as of 17 April 2018).

Keywords

web-audio

FAQs

Package last updated on 11 Oct 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.