Abstract. We introduce a Fourier-based harmonic analysis for a class of discrete dynamical systems which arise from Iterated Function Systems. Our starting point is the following pair of special features of these systems. (1) We assume that a measurable space X comes with a finite-to-one endomorphism r : X → X which is onto but not one-to-one. (2) In the case of affine Iterated Function Systems (IFSs) in R d , this harmonic analysis arises naturally as a spectral duality defined from a given pair of finite subsets B, L in R d of the same cardinality which generate complex Hadamard matrices.Our harmonic analysis for these iterated function systems (IFS) (X, µ) is based on a Markov process on certain paths. The probabilities are determined by a weight function W on X. From W we define a transition operator R W acting on functions on X, and a corresponding class H of continuous R Wharmonic functions. The properties of the functions in H are analyzed, and they determine the spectral theory of L 2 (µ). For affine IFSs we establish orthogonal bases in L 2 (µ). These bases are generated by paths with infinite repetition of finite words. We use this in the last section to analyze tiles in R d .