The fabrication is reported of an integrated-optic frequency spectrum synthesiser which is capable of shaping and encoding modelocked optical pulse waveforms by controlling the amplitude and phase of each line spectral component. The synthesiser consists of an arrayed-waveguide grating (AWG) pair for demultiplexing and multiplexing the spectral components and thermo-optic switches and phase shifters for arbitrarily patterning them. The dynamic range of the synthesiser is similar to 30dB and the amplitude and phase resolutions are 0.1-0.2dB and pi/100, respectively.