Inclusive single-particle distributions in π±p reactions at 8 and 16 GeV/c