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.
>> p5js.org/learn <-- interactive examples!
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).
This version of the library is updated daily. A stable version comes with p5.js. Here's the Change Log.
If you have contributions, feedback, bug reports, or ideas to share, get involved! Email [email protected], 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.
Tone.js - p5.sound imports Signal Math and Clock modules directly from this library using require.js. Check it out!