Peak Controller: improve envelope calculation
Merge pull request #979 from diizy/master

Peak Controller: improve envelope calculation