UNPKG

gibberish-dsp

Version:

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

37 lines (30 loc) 1.54 kB
module.exports = function( Gibberish ) { const instruments = { Kick : require( './kick.js' )( Gibberish ), Clave : require( './conga.js' )( Gibberish )[0], // clave is same as conga with different defaults, see below Hat : require( './hat.js' )( Gibberish ), Snare : require( './snare.js' )( Gibberish ), Cowbell : require( './cowbell.js' )( Gibberish ), Tom : require( './tom.js' )( Gibberish ), Clap : require( './clap.dsp.js' )( Gibberish ), Multisampler: require( './multisampler.dsp.js' )( Gibberish ), Soundfont : require( './soundfont.js' )( Gibberish ) } instruments.Clave.defaults.frequency = 2500 instruments.Clave.defaults.decay = .5; [ instruments.Synth, instruments.PolySynth ] = require( './synth.dsp.js' )( Gibberish ); [ instruments.Complex, instruments.PolyComplex] = require( './complex.dsp.js' )( Gibberish ); [ instruments.Monosynth, instruments.PolyMono ] = require( './monosynth.dsp.js' )( Gibberish ); [ instruments.FM, instruments.PolyFM ] = require( './fm.dsp.js' )( Gibberish ); [ instruments.Sampler, instruments.PolySampler ] = require( './sampler.js' )( Gibberish ); [ instruments.Karplus, instruments.PolyKarplus ] = require( './karplusstrong.js' )( Gibberish ); [ instruments.Conga, instruments.PolyConga ] = require( './conga.js' )( Gibberish ) instruments.export = target => { for( let key in instruments ) { if( key !== 'export' ) { target[ key ] = instruments[ key ] } } } return instruments }