Function waveFromSource