New code for host galaxy spectra