Are there any publicly available codes to sample from an initial mass function (common ones... Kroupa, Chabrier, Salpeter) to construct a cluster, then use stellar models to generate an integrated spectrum? I imagine such codes must be quite common, as they're relatively easy to write, but require access to stellar model databases or very simple stellar models.
The one population synthesis code I've used is GALAXEV, which can be found here. It allows you to choose either the Chabrier or Salpeter IMF, as well as select a star formation history from a few simple models, and it outputs the integrated spectrum. The stellar models and evolutionary tracks are all included in the code and supporting files.
I will caution, however, that this code, despite its popularity, is written in near-defunct Fortran. It took me several days to get it working, between figuring out its ancient I/O format, running preliminary scripts to convert between ASCII and binary files (yes the authors believe reading in a few kilobytes of ASCII data somehow takes a significant amount of time), and finding a compiler from the post-vacuum tube era that actually accepted the source. Yet one more example of astronomy being several decades behind when it comes to computers...