The space between stars in galaxies is filled with interstellar gas. When close to hot young stars, this gas gets excited, producing emission lines that can be detected in a galaxy’s spectrum. The first step of this project involves combining a sophisticated model for the gas emission, MAPPINGS, with a model of galaxy continuum emission that is widely used by extragalactic astronomers, MAGPHYS. The result will be a complete and physically consistent characterisation of the emission by stars, ionised gas, and dust in galaxies. The second step will be a thorough investigation of the effects of different assumptions on stellar populations (for example, the effect of stellar binaries and the initial mass function) and dust on the emitted spectrum. Finally, the new code will be applied to characterize the physical properties of galaxies in existing spectroscopic surveys such as SAMI and DEVILS, and used to make predictions for surveys of distant galaxies with the upcoming James Webb Space Telescope.