Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

int Rosegarden::Pitch::getHeightOnStaff ( const Clef clef,
const Key key 
) const

Return the height at which this pitch should display on a conventional 5-line staff. 0 is the bottom line, 1 the first space, etc., so for example middle-C in the treble clef would return -2.

Chooses the most likely accidental for this pitch in this key.

Definition at line 1677 of file NotationTypes.cpp.

References rawPitchToDisplayPitch().

Referenced by Rosegarden::Key::convertFrom(), getNoteName(), and Rosegarden::NotationGroup::height().

    int heightOnStaff;
    Accidental accidental(m_accidental);
    rawPitchToDisplayPitch(m_pitch, clef, key, heightOnStaff, accidental, UseKey);
    return heightOnStaff;

Generated by  Doxygen 1.6.0   Back to index