Thanks John.
I'm sorry to report that since our discusion I think I have found another problem. It does not appear to handle accidentals correctly.
Incidentally, I have put my attempt at a front end together with my hack to get all strings on mandolin and guitar here.
Jon