Add mode switchling for linear and logarithmic envelope modes.