draft version of dsp.xtm, but feature-complete(ish)