Methods and apparatus for generating an optical waveform by distributing an input optical waveform among a plurality of environmentally isolated legs wherein each leg comprises a Bragg grating and contributes to the generated optical waveform by using the Bragg grating to reflect back at least a portion of light distributed to the leg.