Spectral effects in the perception of pure and tempered intervals: Discrimination and beats