Power quality investigations in the laboratory often require waveform generators capable of recreating the various disturbances present in an electrical system. These sources of waveforms are generally based on arbitrary waveform generators (AWG) because of the great flexibility they offer. However, AWGs are generally not well suited for time varying waveforms because of the limited size of their memory. To circumvent this limitation, a real time waveform synthesizer is required, but their applicability is generally limited by cost. This paper presents the use of CSound, a software sound synthesizer to achieve this aim in a cost effective manner. This paper first demonstrates the suitability of CSound for this application and then describes how the various PQ disturbances are implemented. The design of a graphical user interface which permits flexible and optimal use of the waveform generator is also presented.