A web audio Javascript library

Welcome to Pizzicato's demo site.

Pizzicato aims to simplify the way you create and manipulate sounds via the Web Audio API. For documentation and more information take a look at the github repository

Create sounds from wave forms

var sineWave = new Pizzicato.Sound({ source: 'wave', options: { frequency: 440 } }); sineWave.play();

Volume 1

Load external audio files

var acousticGuitar = new Pizzicato.Sound('./audio/acoustic.wav', function() { // Sound loaded! acousticGuitar.play(); });

Volume 1

Use your microphone (make sure you have headphones!)

Oops! We didn't get your permission to access the microphone.

var voice = new Pizzicato.Sound({ source: 'input' });

Volume 1

Create your own audio function

var whiteNoise = new Pizzicato.Sound(function(e) { var output = e.outputBuffer.getChannelData(0); for (var i = 0; i < e.outputBuffer.length; i++) output[i] = Math.random(); });

Volume 1

Group sounds

Create a group

var drums = new Pz.Sound('./audio/drums.mp3'); var guitar = new Pz.Sound('./audio/guitar.mp3'); var bass = new Pz.Sound('./audio/bass.mp3'); var group = new Pizzicato.Group([drums, guitar]); group.addSound(bass); group.addEffect(reverb); group.play();

Volume 1

Add effects

Attack/Release

var sineWave = new Pizzicato.Sound({ source: 'wave' }); sineWave.attack = 0.5; sineWave.release = 1; sound.play();

Volume 1 Attack 0.5 Release 1

Delay

var delay = new Pizzicato.Effects.Delay({ feedback: 0.6, time: 0.4, mix: 0.5 }); sound.addEffect(delay); sound.play();

Volume 1 Feedback 0.6 Time 0.3 Mix 0.5

Ping-Pong Delay

var pingPongDelay = new Pizzicato.Effects.PingPongDelay({ feedback: 0.6, time: 0.4, mix: 0.5 }); sound.addEffect(pingPongDelay); sound.play();

Volume 1 Feedback 0.6 Time 0.3 Mix 0.5

Dub Delay

var dubDelay = new Pizzicato.Effects.DubDelay({ feedback: 0.6, time: 0.7, mix: 0.5, cutoff: 700 }); sound.addEffect(dubDelay); sound.play();

Volume 1 Feedback 0.6 Time 0.3 Cutoff Frequency 700 Mix 0.5

Distortion

var distortion = new Pizzicato.Effects.Distortion({ gain: 0.4 }); sound.addEffect(distortion); sound.play();

Volume 1 Gain 0.4

Quadrafuzz

var quadrafuzz = new Pizzicato.Effects.Quadrafuzz({ lowGain: 0.6, midLowGain: 0.8, midHighGain: 0.5, highGain: 0.6, mix: 1.0 }); sound.addEffect(quadrafuzz); sound.play();

Volume 1 Low gain 0.6 Mid low gain 0.8 Mid high gain 0.5 High gain 0.6

Flanger

var flanger = new Pizzicato.Effects.Flanger({ time: 0.45, speed: 0.2, depth: 0.1, feedback: 0.1, mix: 0.5 }); sound.addEffect(flanger); sound.play();

Volume 1 Time 0.45 Speed 0.2 Depth 0.1 Feedback 0.1 Mix 0.5

Reverb

var reverb = new Pizzicato.Effects.Reverb({ time: 0.01, decay: 0.01, reverse: false, mix: 0.5 }); sound.addEffect(reverb); sound.play();

Volume 1 Time 0.01 Decay 0.01 Mix 0.5

Convolver

var convolver = new Pizzicato.Effects.Convolver({ impulse: './audio/scala-milan.wav' mix: 0.5 }, function(error) { sound.addEffect(convolver); sound.play(); });

Volume 1 Mix 0.5

Tremolo

var tremolo = new Pizzicato.Effects.Tremolo({ speed: 7, depth: 0.8, mix: 0.8 }); sound.addEffect(tremolo); sound.play();

Volume 1 Speed 7 Depth 0.8 Mix 0.8

Stereo panner

var stereoPanner = new Pizzicato.Effects.StereoPanner({ pan: 0.0 }); sound.addEffect(stereoPanner); sound.play();

Volume 1 Pan 0.0

Compressor

var compressor = new Pizzicato.Effects.Compressor({ threshold: -24, ratio: 12 }); sound.addEffect(compressor); sound.play();

Volume 1 Threshold -24 Knee 30 Attack 0.003 Release 0.250 Ratio 12

Low-Pass Filter

var lowPassFilter = new Pizzicato.Effects.LowPassFilter({ frequency: 400, peak: 10 }); sound.addEffect(lowPassFilter); sound.play();

Volume 1 Frequency 400 Peak 10

High-Pass Filter

var highPassFilter = new Pizzicato.Effects.HighPassFilter({ frequency: 10, peak: 10 }); sound.addEffect(highPassFilter); sound.play();

Volume 1 Frequency 10 Peak 10

Ring Modulator

var ringModulator = new Pizzicato.Effects.RingModulator({ speed: 30, distortion: 1, mix: 0.5 }); sound.addEffect(ringModulator); sound.play();