Nonlinear periodic waves and their modulations