not sure if it is of any help, but a very old copy of Cakewalk i had (version3, about 10-12 years ago) had a CAL (kind of automated script within Cakewalk) which could do exacly that.
You played some accompaniment and after running the script it sorted out the midi messages according to channel.
perhaps there is a similar utiity in the net.