Mid-infrared pulses are shaped during the difference frequency mixing.
Engineered quasi-periodic poled media with nonlinearity and dispersion are modeled.
Shaped pulse generation is numerically demonstrated with high conversion efficiencies.
Proposed method has advantages of compactness and stability.