how does frequency apply to periodic waves?