Scanning tunneling spectroscopy of Ag films: The effect of periodic versus quasiperiodic modulation