Environmental differences influence the evolutionary divergence of mating signals through selection acting either directly on signal transmission (“sensory drive”) or because morphological adaptation to different foraging niches causes divergence in “magic traits” associated with signal production, thus indirectly driving signal evolution. Sensory drive and magic traits both contribute to variation in signal structure, yet we have limited understanding of the relative role of these direct and indirect processes during signal evolution. Using phylogenetic analyses across 276 species of ovenbirds (Aves: Furnariidae), we compared the extent to which song evolution was related to the direct influence of habitat characteristics and the indirect effect of body size and beak size, two potential magic traits in birds. We find that indirect ecological selection, via diversification in putative magic traits, explains variation in temporal, spectral, and performance features of song. Body size influences song frequency, whereas beak size limits temporal and performance components of song. In comparison, direct ecological selection has weaker and more limited effects on song structure. Our results illustrate the importance of considering multiple deterministic processes in the evolution of mating signals.