Socket
Socket
Sign inDemoInstall

modal-synthesis

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    modal-synthesis

This packages uses the Web Audio API to create a synthesizer for a modal sound.


Version published
Weekly downloads
9
increased by200%
Maintainers
1
Install size
31.8 kB
Created
Weekly downloads
 

Readme

Source

modal-synthesis

This packages uses the Web Audio API to create a synthesizer for a modal sound.

You can use it to synthesize your own modal sounds, but I don't have documentation for how to do that yet, sorry :(

It involves looking at a spectrogram and identifiying the most important features of the sound.

Eventually I want to make a tool to automate it. But I'm no DSP expert, so it will take me a while.

If you know what you're doing, you can probably figure out how to make your own data, but in the meantime, you can use some samples I included.

More info here: https://ccrma.stanford.edu/~bilbao/booktop/node14.html

Usage

const { makeModalSynthesis } = require("modal-synthesis");
const { glassHit } = require("modal-synthesis/samples");

const audioContext = new AudioContext();

const glass = makeModalSynthesis(glassHit, audioContext).makeModel({
  // You can use Math.random in here to vary the sound a bit
  amplitudeMultiplier: () => 1,
  frequencyMultiplier: () => 1,
  decayMultiplier: () => 1,
});

glass.outputNode.connect(audioContext.destination);

// Hit the glass
glass.excite();

License

MIT

FAQs

Last updated on 20 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc