Photonic systems provide access to extremely large bandwidths, which can approach a petahertz(1). Unfortunately, full utilization of this bandwidth is not achievable using standard electro-optical technologies, and higher (>100 GHz) performance requires all-optical processing with nonlinear-optical elements. A solution to the implementation of these elements in robust, compact and efficient systems is emerging in photonic integrated circuits, as evidenced by their recent application in various ultrahigh-bandwidth instruments(2-4). These devices enable the characterization of extremely complex signals by linking the high-speed optical domain with slower speed electronics. Here, we extend the application of these devices beyond characterization and demonstrate an instrument that generates complex and rapidly updateable ultrafast optical waveforms. We generate waveforms with 1.5-ps minimum features by compressing lower-bandwidth replicas created with a 10 GHz electro-optic modulator. In effect, our device allows for ultrahigh-speed direct 270 GHz modulation using relatively low speed devices and represents a new class of ultrafast waveform generators.