  For substitution systems and translation flows, a new cocycle, which we call
{\em spectral cocycle}, is introduced, whose Lyapunov exponents govern the
local dimension of the spectral measure for higher-level cylindrical functions.
The construction relies on the symbolic representation of translation flows and
the formalism of matrix Riesz products.
