Adopts non-standard set_waveform code