An apparatus and method for synthesizing waveforms with arbitrary amplitude, frequency, and phase modulation. Pulses from a broadband (supercontinuum) optical source are filtered into a plurality of wavelength channels, and the intensity of each wavelength channel is adjusted to an appropriate level depending on the desired shape of the envelope of the output pulse. The envelope of the sampling wavelength channels can be stretched, compressed, or inverted in the time domain later using a dispersive medium. After time domain manipulation, the optical pulse train is observed with a combination of high-speed photodetectors and a radio frequency low-pass filter, a low-speed photodetector.