Reference+
Class Name
Env
Description
This is an ASR (Attack Sustain Release) Envelope Generator.
Examples
import processing.sound.*; TriOsc triOsc; Env env; float attackTime = 0.001; float sustainTime = 0.004; float sustainLevel = 0.3; float releaseTime = 0.4; void setup() { size(640, 360); background(255); // Create triangle wave triOsc = new TriOsc(this); // Create the envelope env = new Env(this); } void draw() { } void mousePressed() { triOsc.play(); env.play(triOsc, attackTime, sustainTime, sustainLevel, releaseTime); }
Constructors
Env(parent)
Methods
play()
Triggers the envelope.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.