OpenSheetMusicDisplay
    Preparing search index...

    Class IntervalTransposeCalculator

    Transposes notes and chord symbols by interval, so that their spelling stays consistent with the key signature.

    The default TransposeCalculator only counts halftones and chooses each note's enharmonic spelling (sharp or flat) by the transposed key signature. Notes that aren't in the key then change their function: in C major, transposing the leading tone A# (to B) down a whole tone to Bb major gives Ab instead of G#, because Bb major prefers flats. The result sounds the same, but it isn't what an engraver (or MuseScore, Sibelius, Finale...) would write.

    This calculator moves every note by the same interval instead: a number of letter steps (MusicXML's ) plus the number of halftones (), like MuseScore's "transpose chromatically". The letter steps follow from the original and transposed key signatures, e.g. C major -> Bb major is one letter down, so A# -> G#, D# -> C#, and C -> Bb.

    Key signatures are still transposed by the default TransposeCalculator (keyMapping), so the choice of Db vs C# etc. is unchanged. If the interval would need more than a double sharp/flat, or the pitch has a microtonal accidental, the default calculator is used for that note.

    Opt-in, like the default calculator: osmd.TransposeCalculator = new IntervalTransposeCalculator(); osmd.Sheet.Transpose = -2;

    Implements

    Index

    Constructors

    Methods