accurate dB/log patch from Carl, back-ported from 3.0