psgs are controlled by writing data to dedicated registers on the chip via an external cpu; hence the name programmable sound generator. one or more basic waveforms are generated (typically a square, triangle or saw-tooth wave) and often a noise signal. the waveforms' frequency and volume (and noise's tone and volume) are typically shaped using an envelope and or mixed before being sent to the audio output stage.