Aims. We study the massive stars in OB associations and their surrounding interstellar medium environment, using a population synthesis code. Methods. We developed a new population synthesis code for groups of massive stars, where we model the emission of different forms of energy and matter from the stars of the association. In particular, the ejection of the two radioactive isotopes 26 Al and 60 Fe is followed, as well as the emission of hydrogen ionizing photons, and the kinetic energy of the stellar winds and supernova explosions. We investigate various alternative astrophysical inputs and the resulting output sensitivities, especially effects due to the inclusion of rotation in stellar models. As the aim of the code is the application to relatively small populations of massive stars, special care is taken to address their statistical properties. Our code incorporates both analytical statistical methods applicable to small populations, as well as extensive Monte Carlo simulations. Results. We find that the inclusion of rotation in the stellar models has a large impact on the interactions between OB associations and their surrounding interstellar medium. The emission of 26 Al in the stellar winds is strongly enhanced, compared to non-rotating models with the same mass-loss prescription. This compensates the recent reductions in the estimates of mass-loss rates of massive stars due to the effects of clumping. Despite the lower mass-loss rates, the power of the winds is actually enhanced for rotating stellar models. The supernova power (kinetic energy of their ejecta) is decreased due to longer lifetimes of rotating stars, and therefore the wind power dominates over supernova power for the first 6 Myr after a burst of star-formation. For populations typical of nearby star-forming regions, the statistical uncertainties are large and clearly non-Gaussian.