Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/processing/sound/Env.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public Env(PApplet parent) {
* @param input Input sound source
* @param attackTime Attack time value as a float.
* @param sustainTime Sustain time value as a float.
* @param sustain Sustain level value as a float.
* @param sustain Sustain level value as a float. (as fraction of the input amplitude)
* @param releaseTime Release time value as a float.
**/
public void play(SoundObject input, float attackTime, float sustainTime, float sustainLevel, float releaseTime) {
SegmentedEnvelope env = new SegmentedEnvelope(new double[] {
attackTime, input.amp, // attack
// gradual decay towards sustain level across entire sustain period
sustainTime, sustainLevel, // sustain
sustainTime, sustainLevel * input.amp, // sustain
releaseTime, 0.0 });

// TODO re-use player from fixed or dynamic pool
Expand Down