A web audio Javascript library

Welcome to Pizzicato's kitchen sink 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();
                
1

Load external audio files


var acousticGuitar = new Pizzicato.Sound('./audio/acoustic.wav', function() {
    // Sound loaded!
    acousticGuitar.play();
});
                
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' });
                
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();
});
                
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();
                
1

Add effects

Attack/Release


var sineWave = new Pizzicato.Sound({ 
    source: 'wave'
});

sineWave.attack = 0.5;
sineWave.release = 1;
sound.play();
                
1
0.5
1

Delay


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

sound.addEffect(delay);
sound.play();
                
1
0.6
0.3
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();
                
1
0.6
0.3
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();
                
1
0.6
0.3
700
0.5

Distortion


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

sound.addEffect(distortion);
sound.play();
                
1
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();
                
1
0.6
0.8
0.5
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();
                
1
0.45
0.2
0.1
0.1
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();
                
1
0.01
0.01
0.5

Convolver


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

Tremolo


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

sound.addEffect(tremolo);
sound.play();
            
1
7
0.8
0.8

Stereo panner


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

sound.addEffect(stereoPanner);
sound.play();
                
1
0.0

Compressor


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

sound.addEffect(compressor);
sound.play();
                
1
-24
30
0.003
0.250
12

Low-Pass Filter


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

sound.addEffect(lowPassFilter);
sound.play();
                
1
400
10

High-Pass Filter


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

sound.addEffect(highPassFilter);
sound.play();
                
1
10
10

Ring Modulator


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

sound.addEffect(ringModulator);
sound.play();
                
1
30
1
0.5