how canyou measure the frequency of a wave?