From 5c3626292b70a6cbdd52740a74441a63005af181 Mon Sep 17 00:00:00 2001 From: defrost256 Date: Wed, 5 Sep 2018 16:44:31 +0200 Subject: [PATCH] Fix the attack value of Env Set the attack amplitude of the Envelope to the amplitude of the input SoundObject. Fixing Issue #3 --- src/processing/sound/Env.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processing/sound/Env.java b/src/processing/sound/Env.java index 9e3f913..e19e66a 100644 --- a/src/processing/sound/Env.java +++ b/src/processing/sound/Env.java @@ -28,7 +28,7 @@ public Env(PApplet parent) { **/ public void play(SoundObject input, float attackTime, float sustainTime, float sustainLevel, float releaseTime) { SegmentedEnvelope env = new SegmentedEnvelope(new double[] { - attackTime, 1.0, // attack + attackTime, input.amp, // attack // gradual decay towards sustain level across entire sustain period sustainTime, sustainLevel, // sustain releaseTime, 0.0 });