Reference p5.MonoSynth

p5.MonoSynth

A MonoSynth is used as a single voice for sound synthesis. This is a class to be used in conjunction with the PolySynth class. Custom synthetisers should be built inheriting from this class.

Examples

Fields

attack

Getters and Setters

Methods

play

Play tells the MonoSynth to start playing a note. This method schedules the calling of .triggerAttack and .triggerRelease.

triggerAttack

Trigger the Attack, and Decay portion of the Envelope. Similar to holding down a key on a piano, but it will hold the sustain level until you let go.

triggerRelease

Trigger the release of the Envelope. This is similar to releasing the key on a piano and letting the sound fade according to the release level and release time.

setADSR

Set values like a traditional ADSR envelope .

amp

MonoSynth amp

connect

Connect to a p5.sound / Web Audio object.

disconnect

Disconnect all outputs

dispose

Get rid of the MonoSynth and free up its resources / memory.

Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

Related References