Discrete nonlinear-spectrum editing with a Fourier-domain transfer function