Flexible Transposing a whole score

This code shows how to transpose a whole score by changing one single piece of code.

In the code the Scheme function MyTranspose is defined. If you use it in every Voice, you can transpose the whole score just by setting the arguments to the \transpose call within the function definition. As you see in the example this works with transposed voices as well (in the example I've written the Bb-Trumpet pitches as they sound, so they have to be additionaly transposed by \transpose bes c' {...}).

To see the original pitches, you may disable the MyTranspose function by redefining MyTranspose = {}, as shown in the lower part of the snippet.