Bayesian Filtering of Myoelectric Signals - Terence D. Sanger
Download sample code here.