On the generation of long waves