This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

This sketch demonstrates how to use the trigger method of an AudioSample.
AudioSamples can only be triggered, not cue'd and looped or anything else you might do with an Playable object. The advantage, however, is that an AudioSample can be retriggered while it is still playing, which will cause the sample to overlap with itself.

Use 'k' and 's' to trigger a kick drum sample and a snare sample, respectively. You will see their waveforms drawn when they are played back.

Source code: trigger

Built with Processing