modularize the resampler/mixer

ml modules and functors would this less headache-inducing!