Added a waveAdd function, which adds the amplitudes of a variable number of waves at corresponding times