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

Rosegarden::Pitch Class Reference

#include <NotationTypes.h>

List of all members.

Detailed Description

Pitch stores a note's pitch and provides information about it in various different ways, notably in terms of the position of the note on the staff and its associated accidental.

(See docs/discussion/units.txt for explanation of pitch units.)

This completely replaces the older NotationDisplayPitch class.

Definition at line 753 of file NotationTypes.h.

Public Member Functions

Accidental getAccidental (const Key &key) const
Accidental getAccidental (bool useSharps) const
EventgetAsNoteEvent (timeT absoluteTime, timeT duration) const
std::string getAsString (bool useSharps, bool inclOctave=true, int octaveBase=-2) const
Accidental getDisplayAccidental (const Key &key, Accidentals::NoAccidentalStrategy) const
Accidental getDisplayAccidental (const Key &key) const
int getHeightOnStaff (const Clef &clef, bool useSharps) const
int getHeightOnStaff (const Clef &clef, const Key &key) const
int getNoteInScale (const Key &key) const
char getNoteName (const Key &key) const
int getOctave (int octaveBase=-2) const
int getPerformancePitch () const
int getPitchInOctave () const
bool isDiatonicInKey (const Key &key) const
Pitchoperator= (const Pitch &)
 Pitch (const Pitch &)
 Pitch (int heightOnStaff, const Clef &clef, const Key &key, const Accidental &explicitAccidental=Accidentals::NoAccidental)
 Pitch (char noteName, int octave, const Key &key, const Accidental &explicitAccidental=Accidentals::NoAccidental, int octaveBase=-2)
 Pitch (int noteInCMajor, int octave, int pitch, int octaveBase=-2)
 Pitch (int noteInScale, int octave, const Key &key, const Accidental &explicitAccidental=Accidentals::NoAccidental, int octaveBase=-2)
 Pitch (int pitchInOctave, int octave, const Accidental &explicitAccidental=Accidentals::NoAccidental, int octaveBase=-2)
 Pitch (int performancePitch, const Accidental &explicitAccidental=Accidentals::NoAccidental)
 Pitch (const Event &e)
Pitch transpose (const Key &key, int pitchDelta, int heightDelta)
bool validAccidental () const

Static Public Member Functions

static int getIndexForNote (char noteName)
static char getNoteForIndex (int index)
static int getPerformancePitchFromRG21Pitch (int heightOnStaff, const Accidental &accidental, const Clef &clef, const Key &key)

Static Private Member Functions

static void displayPitchToRawPitch (int, Accidental, const Clef &, const Key &, int &, bool ignoreOffset=false)
static void rawPitchToDisplayPitch (int, const Clef &, const Key &, int &, Accidental &, Accidentals::NoAccidentalStrategy)

Private Attributes

Accidental m_accidental
int m_pitch

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index