/p5.sound

p5.sound brings the Processing approach to Web Audio and p5.js. Early demos:

Primary LanguageJavaScript

p5.sound

p5.sound brings the Processing approach to Web Audio as an addon for p5.js. Functionality includes audio input, playback, manipulation, effects, recording, sequencing, analysis and synthesis. The library is designed to be used in tandem with p5.js.

Examples

>> p5js.org/learn <-- interactive examples!

Docs

Here is an overview of what p5.sound offers:

  • p5.SoundFile [source / docs]: Load and play sound files, manipulate playback
  • p5.Amplitude [source / docs]: Get the current volume of a sound.
  • p5.AudioIn [source / docs]: Get sound from an input source like a computer mic.
  • p5.FFT [source] [ docs]: Analyze the frequency of sound.
  • p5.Oscillator [source / docs] / p5.Pulse [source / docs]: Waveforms for playback & modulation.
  • p5.Noise [source / docs: White, pink or brown noise generator
  • p5.Env [source / [docs]: Trigger an attack/release envelope, or modulate other parameters
  • p5.Reverb [source / docs]: Add reverb to a sound by specifying duration and decay.
  • p5.Convolver extends p5.Reverb. Simulate the sound of real physical spaces w/ convolution.
  • p5.Filter [source / docs]: Filter the frequency range of a sound.
  • p5.Delay [source / docs]: Stereo delay effect w/ feedback and a lowpass filter.
  • p5.SoundRecorder [ source ]: record sound for playback / save the .wav
  • p5.Phrase, p5.Part, p5.Score [ source ]: Sequence musical patterns (in development).

Latest Version

This version of the library is updated daily. A stable version comes with p5.js. Here's the Change Log.

Contribute

If you have contributions, feedback, bug reports, or ideas to share, get involved! Email hello@jasonsigal.cc, or join the discussion on github. There is plenty to do, check out the to do list.

Before contributing, you will need to install npm and download node modules. Edit the /src files, and then build the lib files by calling grunt from the command line. Check out the p5.js setup instructions for more details.

Dependencies

Tone.js - p5.sound imports Signal Math and Clock modules directly from this library using require.js. Check it out!

References and Inspiration