Numerical pulse engineering