  We consider self-similar measures $\mu $ with support in the interval $0\leq
x\leq 1$ which have the analytic functions $\left\{e^{i2\pi nx}:n=0,1,2,...
\right\} $ span a dense subspace in $L^{2}(\mu) $. Depending on the fractal
dimension of $\mu $, we identify subsets $P\subset \mathbb{N}_{0}=\{0,1,2,...
\} $ such that the functions $\{e_{n}:n\in P\} $ form an orthonormal basis for
$L^{2}(\mu) $. We also give a higher-dimensional affine construction leading to
self-similar measures $\mu $ with support in $\mathbb{R}^{\nu}$. It is obtained
from a given expansive $\nu $-by-$\nu $ matrix and a finite set of translation
vectors, and we show that the corresponding $L^{2}(\mu) $ has an orthonormal
basis of exponentials $e^{i2\pi \lambda \cdot x}$, indexed by vectors $\lambda
$ in $\mathbb{R}^{\nu}$, provided certain geometric conditions (involving the
Ruelle transfer operator) hold for the affine system.
