A simple wave simulation I made with the pen tool and some mathematical equations. Press Q to change from sine to square, and from square to sine. Press spacebar to open the variable menu, where you can change the amplitude and frequency of the wave. Alternatively, press W and S to increase and decrease amplitude, and press A and D to increase and decrease frequency.
The lower the frequency is, the quicker it goes from peak to valley (or crest to trough). Crest-trough distance is increased uniformly the higher the amplitude.