Alasdair,
Though it may not match your use, Frescobaldi, the LilyPond Editor, can do this using one of its built-in features. In essence you specify the interval to transpose when selecting the feature, e.g., "c d" would transpose up a major 2nd.
Many on this list use other editors, but personally I cannot imagine writing Lilypond without Frescobaldi given its features. For your purpose, it might be worth an install simply to use the transpose feature?
If there are other ways of doing this in other editors, I'm sure list subscribers will chime in.
Regards
--
“Happiness is the meaning and the purpose of life, the whole aim and end of human existence.”
― Aristotle