Waves of two different frequencies crossing a diffraction grating