1.0.1 • Published 6 years ago

portable-synthesizer v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

portable-synthesizer Build Status

Making sounds with JavaScript! 🎹🎼🎶

npm.io npm.io

portable-synthesizer is a wrapper around the Web Audio API aimed at making it easy to use the browser as a synthesizer. Currently, it has a fairly minimal API that allows users to define a set of oscillators and noises, play notes, and define custom sounds based on a mix of oscillators and noises.

Installation

portable-synthesizer is available on npm:

npm install portable-synthesizer --save

Usage Example

This library works in all browsers that support the Web Audio API.

import Synthesizer from 'portable-synthesizer'

const synth = Synthesizer(window.AudioContext || window.webkitAudioContext)

synth.setTone({
  oscillators: [{ waveform: 'triangle' }]
})

synth.play('C4') // middle C

setTimeout(() => {
  synth.stop('C4')
}, 500)
1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago