Update effect_envelope.cpp

Fix envelope so it actually works.