40-GHz photonic waveform generator by linear shaping of four spectral sidebands.