Broadband spectral generation with refractive index control