|
Canorus
0.7
|
Musical note pitch. More...
#include <diatonicpitch.h>
Public Types | |
| enum | CANoteName { Undefined = -1, C = 0, D = 1, E = 2, F = 3, G = 4, A = 5, B = 6 } |
Public Member Functions | |
| CADiatonicPitch () | |
| CADiatonicPitch (const QString &pitch) | |
| CADiatonicPitch (const int ¬eName, const int &accs=0) | |
| bool | operator== (CADiatonicPitch) |
| bool | operator!= (CADiatonicPitch p) |
| bool | operator== (int noteName) |
| bool | operator!= (int p) |
| CADiatonicPitch | operator+ (CAInterval) |
| CADiatonicPitch | operator- (CAInterval i) |
| const int | noteName () |
| const int | accs () |
| void | setNoteName (const int noteName) |
| void | setAccs (const int accs) |
Static Public Member Functions | |
| static const QString | diatonicPitchToString (CADiatonicPitch p) |
| static CADiatonicPitch | diatonicPitchFromString (const QString s) |
Private Attributes | |
| int | _noteName |
| int | _accs |
Musical note pitch.
Copyright (c) 2008, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
Copyright (c) 2008, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
This is a typical music presentation of the note pitch.
It consists of two properties:
Note name begins with sub-contra C.
Diatonic pitches can be compared with each other or only note names and summed with intervals.
| CADiatonicPitch::CADiatonicPitch | ( | ) |
References setAccs(), setNoteName(), and Undefined.
Referenced by diatonicPitchFromString().


| CADiatonicPitch::CADiatonicPitch | ( | const QString & | pitch | ) |
|
inline |
References _accs.
Referenced by CAInterval::CAInterval(), CALilyPondExport::diatonicPitchToLilyPond(), CAMidiDevice::diatonicPitchToMidiPitch(), diatonicPitchToString(), CACanorusMLExport::exportDiatonicPitch(), CAKeybdInput::matchPitchToKey(), CAMidiDevice::midiPitchToDiatonicPitch(), CADiatonicKey::numberOfAccs(), operator+(), operator==(), and setAccs().

|
static |
Creates a new diatonic pitch from the given string.
References CADiatonicPitch().
Referenced by CAMusicXmlImport::readNote().


|
static |
Converts the music pitch to string.
References accs(), and noteName().

|
inline |
References _noteName.
Referenced by CAVoice::addNoteToChord(), CADiatonicPitch(), CAInterval::CAInterval(), CADrawableStaff::calculateCenterYCoord(), CALilyPondExport::diatonicPitchToLilyPond(), CAMidiDevice::diatonicPitchToMidiPitch(), diatonicPitchToString(), CACanorusMLExport::exportDiatonicPitch(), CAKeybdInput::matchPitchToKey(), CAMidiDevice::midiPitchToDiatonicPitch(), CANote::notePosition(), CADiatonicKey::numberOfAccs(), operator+(), CADiatonicKey::operator+(), operator==(), CAMusicXmlImport::readNote(), CALilyPondImport::relativePitchFromLilyPond(), CAMidiImport::relativePitchFromLilyPond(), CALilyPondExport::relativePitchToString(), CAMainWin::scoreViewPortKeyPress(), setNoteName(), CATranspose::transposeByKeySig(), and CALilyPondExport::writeRelativeIntro().

|
inline |
|
inline |
| CADiatonicPitch CADiatonicPitch::operator+ | ( | CAInterval | i | ) |
Calculates the new pitch using the old pitch + interval.
References accs(), CAInterval::Fifth, CAInterval::Fourth, noteName(), CAInterval::Prime, CAInterval::quality(), CAInterval::quantity(), CAInterval::Second, setAccs(), setNoteName(), CAInterval::Seventh, CAInterval::Sixth, and CAInterval::Third.
Referenced by operator-().


|
inline |
References operator+(), CAInterval::quality(), and CAInterval::quantity().

| bool CADiatonicPitch::operator== | ( | CADiatonicPitch | p | ) |
References accs(), and noteName().
Referenced by operator!=().


| bool CADiatonicPitch::operator== | ( | int | noteName | ) |
|
inline |
Referenced by CADiatonicPitch(), CAMidiDevice::midiPitchToDiatonicPitch(), operator+(), and CAMusicXmlImport::readNote().


|
inline |
References _noteName, and noteName().
Referenced by CADiatonicPitch(), CAMidiDevice::midiPitchToDiatonicPitch(), operator+(), CADiatonicKey::operator+(), CAMusicXmlImport::readNote(), and CALilyPondExport::writeRelativeIntro().


|
private |
Referenced by noteName(), and setNoteName().
1.8.3