function c = wv_cents(f, fref) % WV_CENTS The interval from fref up to f, in cents. % % A cent is a hundredth of an equal-tempered semitone, so an octave is 1200 % cents and a relative frequency error e is about 1731 e cents when e is % small. Negative means flat. c = 1200 * log2(f ./ fref); end