Logo Search packages:      
Sourcecode: rosegarden version File versions

int Rosegarden::Pitch::getPerformancePitchFromRG21Pitch ( int  heightOnStaff,
const Accidental accidental,
const Clef clef,
const Key key 
) [static]

Calculate and return the performance (MIDI) pitch corresponding to the stored height and accidental, interpreting them as Rosegarden-2.1-style values (for backward compatibility use), in the given clef and key

Definition at line 1764 of file NotationTypes.cpp.

    // Rosegarden 2.1 pitches are a bit weird; see
    // docs/data_struct/units.txt

    // We pass the accidental and clef, a faked key of C major, and a
    // flag telling displayPitchToRawPitch to ignore the clef offset
    // and take only its octave into account

    int p = 0;
    displayPitchToRawPitch(heightOnStaff, accidental, clef, Key(), p, true);
    return p;

Generated by  Doxygen 1.6.0   Back to index