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

gibberish-dsp

v3.4.0

Published

Gibberish is designed to be an optimized API for audio synthesis using per-sample techniques.

Downloads

154

Readme

Gibberish

Gibberish is designed to be a fast audio API for the browser. It takes the low-level building blocks provided by genish.js and uses them to create higher-level synthesizers, effects, and sequencers. Gibberish proceses each sample of each synthesis block one sample at a time, enabling a variety of effects not typically possible in JavaScript synthesis systems, most importantly single-sample feedback loops and audio-rate modulation of scheduling.

Note that this branch is for version 3 of the library. See the master branch for the pre-June 2017 version that is currently used in Gibber. There is also a tagged release of the older version (2.0.0).

Live Code Playground

https://www.charlie-roberts.com/gibberish/playground

Example Code

kik = Kick().connect() // connects to master output by default

// sequence calls to 'trigger' method of kick drum every 1/2 second
// with alternating loudness levels.
seq  = Sequencer.make( [.25,.5], [22050], kik, 'trigger' ] ).start()

chr = Chorus().connect()
syn = PolySynth({ maxVoices:4, attack:44, decay:22050, gain:.1 })

// connect to chorus and master output
syn.connect( chr ).connect()

syn.chord( [220,330,440,550] )

HTML + Initialization

<!doctype html>

<html lang='en'>
  <head>
    <script src='dist/gibberish.js'></script>
  </head>

  <body></body>
  
  <script>
  window.onload = function() {
    Gibberish.workletPath = 'dist/gibberish_worklet.js'

    Gibberish.init().then( ()=> {
      Gibberish.export( window )
      
      Sine().connect() 
    })
  }
  </script>
</html>

Development dependencies

  • node 6 or better
  • npm
  • gulp

Building

You need to have node.js and gulp installed. Then:

  1. Run npm install in the top level directory
  2. Run gulp in the top level directory
  3. Run gulp minify if you'd like to create minified and gzipped versions of the library.

The library will then be found in the dist folder.

Ugens

Gibberish includes a long list of oscillators, fx, and synthesis algorithms.

Oscillators

  • Sine
  • Triangle
  • Saw (wavetable & anti-aliased)
  • PWM (algorithmic & anti-aliased)
  • Square (wavetable & anti-aliased)
  • Noise( white, pink, brown )
  • Sampler - read audiofiles and playback at various speeds

Synthetic Percussion (TR-808 emulation)

  • Kick
  • Snare
  • Clave
  • Tom
  • Cowbell
  • Hat
  • Conga

Synths

All synths also have polyphonic versions.

  • Synth - oscillator + optional filter + envelope
  • Monosynth - three oscillators + optional filter + envelope
  • FM - two op FM synthesis + optional filter + envelope
  • Karplus-Strong - Physical model of a plucked string
  • Complex - oscillator + wavefolder + filter + envelope

Effects

  • BitCrusher - bit depth and sample rate reduction
  • Buffer Shuffler
  • Chorus (arp solina model)
  • Delay
  • Distortion
  • Flanger
  • Ring Modulation
  • Reverb (freeverb and dattorro plate reverb models)
  • Vibrato

Filters

  • State Variable Filter (12 db resonant)
  • Biquad Filter (12 db resonant)
  • Ladder Filter ("Moog-style" 24db resonant)
  • "Virtual Analog" (aka implicit) Ladder Filter ("Moog-style" 24db resonant)
  • "Virtual Analog" (aka implicit) ZDF filter (a la TB-303)

Analysis

  • Envelope Follower

Sequencing

  • Seq - sample-accurate scheduling
  • Seq2 - provides audio-rate modulation of timing

License

Gibberish is licensed under the MIT license.