Waveform shaping and data generation