A complete duty-cycle modulator, including the triangle wave generator, can be fabricated with a quad comparator. The remaining two comparators can be used for preamplification and signal inversion in driving a class D amplifier. This circuit oscillates by virtue of positive feedback to the noninverting input. The comparator output switches at the midpoints of the slopes, and generates a symmetrical square wave. By varying the switching points (or levels), the modulating signal produces the duty-cycle modulated wave.