|
maiacore 1.10.1
Music analisys library
|
Represents a musical interval between two notes, supporting tonal, diatonic, and chromatic analysis. More...
#include <interval.h>
Public Member Functions | |
| Interval (const std::string &pitch_A="C4", const std::string &pitch_B="C4") | |
| Constructs an Interval from two pitch strings. More... | |
| Interval (const Note ¬e_A, const Note ¬e_B) | |
| Constructs an Interval from two Note objects. More... | |
| void | setNotes (const std::string &pitch_A, const std::string &pitch_B) |
| Sets the notes of the interval using pitch strings. More... | |
| void | setNotes (const Note ¬e_A, const Note ¬e_B) |
| Sets the notes of the interval using Note objects. More... | |
| std::string | getName () const |
| Returns the interval name (e.g., "M3", "P5", "m2"). More... | |
| int | getNumSemitones (const bool absoluteValue=false) const |
| Returns the number of semitones between the notes. More... | |
| int | getNumOctaves (const bool absoluteValue=false) const |
| Returns the number of octaves between the notes. More... | |
| int | getDiatonicInterval (const bool useSingleOctave=true, const bool absoluteValue=false) const |
| Returns the diatonic interval number (e.g., 3 for a third). More... | |
| int | getDiatonicSteps (const bool useSingleOctave=true, const bool absoluteValue=false) const |
| Returns the number of diatonic steps between the notes. More... | |
| int | getPitchStepInterval () const |
| Returns the pitch step interval (e.g., 1 for unison, 2 for second). More... | |
| std::vector< Note > | getNotes () const |
| Returns the two notes defining the interval. More... | |
| bool | isAscendant () const |
| Returns true if the interval is ascending. More... | |
| bool | isDescendant () const |
| Returns true if the interval is descending. More... | |
| std::string | getDirection () const |
| Returns the direction of the interval as a string ("asc", "desc", or empty for unison). More... | |
| bool | isSimple () const |
| Returns true if the interval is simple (within an octave). More... | |
| bool | isCompound () const |
| Returns true if the interval is compound (greater than an octave). More... | |
| bool | isTonal () const |
| Returns true if the interval is tonal (major, minor, perfect, etc.). More... | |
| bool | isMajor (const bool useEnharmony=false) const |
| Returns true if the interval is major. More... | |
| bool | isMinor (const bool useEnharmony=false) const |
| Returns true if the interval is minor. More... | |
| bool | isPerfect (const bool useEnharmony=false) const |
| Returns true if the interval is perfect. More... | |
| bool | isDiminished (const bool useEnharmony=false) const |
| Returns true if the interval is diminished. More... | |
| bool | isAugmented (const bool useEnharmony=false) const |
| Returns true if the interval is augmented. More... | |
| bool | isDiminishedUnisson (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished unison. More... | |
| bool | isPerfectUnisson (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect unison. More... | |
| bool | isAugmentedUnisson (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented unison. More... | |
| bool | isMinorSecond (const bool useEnharmony=false) const |
| Returns true if the interval is a minor second. More... | |
| bool | isMajorSecond (const bool useEnharmony=false) const |
| Returns true if the interval is a major second. More... | |
| bool | isMinorThird (const bool useEnharmony=false) const |
| Returns true if the interval is a minor third. More... | |
| bool | isMajorThird (const bool useEnharmony=false) const |
| Returns true if the interval is a major third. More... | |
| bool | isPerfectFourth (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect fourth. More... | |
| bool | isAugmentedFourth (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented fourth (tritone). More... | |
| bool | isDiminishedFifth (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished fifth (tritone). More... | |
| bool | isPerfectFifth (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect fifth. More... | |
| bool | isAugmentedFifth (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented fifth. More... | |
| bool | isMinorSixth (const bool useEnharmony=false) const |
| Returns true if the interval is a minor sixth. More... | |
| bool | isMajorSixth (const bool useEnharmony=false) const |
| Returns true if the interval is a major sixth. More... | |
| bool | isDiminishedSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished seventh. More... | |
| bool | isMinorSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a minor seventh. More... | |
| bool | isMajorSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a major seventh. More... | |
| bool | isDiminishedOctave (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished octave. More... | |
| bool | isPerfectOctave (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect octave. More... | |
| bool | isAugmentedOctave (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented octave. More... | |
| bool | isMinorNinth (const bool useEnharmony=false) const |
| Returns true if the interval is a minor ninth. More... | |
| bool | isMajorNinth (const bool useEnharmony=false) const |
| Returns true if the interval is a major ninth. More... | |
| bool | isPerfectEleventh (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect eleventh. More... | |
| bool | isSharpEleventh (const bool useEnharmony=false) const |
| Returns true if the interval is a sharp eleventh. More... | |
| bool | isMinorThirdteenth (const bool useEnharmony=false) const |
| Returns true if the interval is a minor thirteenth. More... | |
| bool | isMajorThirdteenth (const bool useEnharmony=false) const |
| Returns true if the interval is a major thirteenth. More... | |
| bool | isSecond (const bool useEnharmony=false) const |
| Returns true if the interval is a generic second (major or minor). More... | |
| bool | isThird (const bool useEnharmony=false) const |
| Returns true if the interval is a generic third (major or minor). More... | |
| bool | isFourth (const bool useEnharmony=false) const |
| Returns true if the interval is a generic fourth (perfect, augmented, or diminished). More... | |
| bool | isFifth (const bool useEnharmony=false) const |
| Returns true if the interval is a generic fifth (perfect, augmented, or diminished). More... | |
| bool | isSixth (const bool useEnharmony=false) const |
| Returns true if the interval is a generic sixth (major or minor). More... | |
| bool | isSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a generic seventh (major, minor, or diminished). More... | |
| bool | isOctave (const bool useEnharmony=false) const |
| Returns true if the interval is an octave (perfect, augmented, or diminished). More... | |
| bool | isNinth (const bool useEnharmony=false) const |
| Returns true if the interval is a ninth (major or minor). More... | |
| bool | isEleventh (const bool useEnharmony=false) const |
| Returns true if the interval is an eleventh (perfect or sharp). More... | |
| bool | isThirdteenth (const bool useEnharmony=false) const |
| Returns true if the interval is a thirteenth (major or minor). More... | |
| bool | isAnyOctaveMinorSecond (const bool useEnharmony=false) const |
| Returns true if the interval is a minor second in any octave. More... | |
| bool | isAnyOctaveMajorSecond (const bool useEnharmony=false) const |
| Returns true if the interval is a major second in any octave. More... | |
| bool | isAnyOctaveMinorThird (const bool useEnharmony=false) const |
| Returns true if the interval is a minor third in any octave. More... | |
| bool | isAnyOctaveMajorThird (const bool useEnharmony=false) const |
| Returns true if the interval is a major third in any octave. More... | |
| bool | isAnyOctavePerfectFourth (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect fourth in any octave. More... | |
| bool | isAnyOctaveAugmentedFourth (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented fourth in any octave. More... | |
| bool | isAnyOctaveDiminishedFifth (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished fifth in any octave. More... | |
| bool | isAnyOctavePerfectFifth (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect fifth in any octave. More... | |
| bool | isAnyOctaveAugmentedFifth (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented fifth in any octave. More... | |
| bool | isAnyOctaveMinorSixth (const bool useEnharmony=false) const |
| Returns true if the interval is a minor sixth in any octave. More... | |
| bool | isAnyOctaveMajorSixth (const bool useEnharmony=false) const |
| Returns true if the interval is a major sixth in any octave. More... | |
| bool | isAnyOctaveDiminishedSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished seventh in any octave. More... | |
| bool | isAnyOctaveMinorSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a minor seventh in any octave. More... | |
| bool | isAnyOctaveMajorSeventh (const bool useEnharmony=false) const |
| Returns true if the interval is a major seventh in any octave. More... | |
| bool | isAnyOctaveDiminishedOctave (const bool useEnharmony=false) const |
| Returns true if the interval is a diminished octave in any octave. More... | |
| bool | isAnyOctavePerfectOctave (const bool useEnharmony=false) const |
| Returns true if the interval is a perfect octave in any octave. More... | |
| bool | isAnyOctaveAugmentedOctave (const bool useEnharmony=false) const |
| Returns true if the interval is an augmented octave in any octave. More... | |
| bool | isAnyOctaveSecond () const |
| Returns true if the interval is a generic second (any octave). More... | |
| bool | isAnyOctaveThird () const |
| Returns true if the interval is a generic third (any octave). More... | |
| bool | isAnyOctaveFourth () const |
| Returns true if the interval is a generic fourth (any octave). More... | |
| bool | isAnyOctaveFifth () const |
| Returns true if the interval is a generic fifth (any octave). More... | |
| bool | isAnyOctaveSixth () const |
| Returns true if the interval is a generic sixth (any octave). More... | |
| bool | isAnyOctaveSeventh () const |
| Returns true if the interval is a generic seventh (any octave). More... | |
| bool | isAnyOctaveOctave () const |
| Returns true if the interval is a generic octave (any octave). More... | |
| int | toCents (const float freqA4=440.0f) const |
| Returns the interval size in cents (for microtonal/tuning analysis). More... | |
| bool | operator< (const Interval &otherInterval) const |
| Less-than operator for comparing intervals by number of semitones. More... | |
Represents a musical interval between two notes, supporting tonal, diatonic, and chromatic analysis.
The Interval class provides methods for constructing, analyzing, and classifying musical intervals. It supports both pitch string and Note object input, and offers detailed intervallic queries for music analysis and computational musicology.
| Interval::Interval | ( | const std::string & | pitch_A = "C4", |
| const std::string & | pitch_B = "C4" |
||
| ) |
Constructs an Interval from two pitch strings.
| pitch_A | First pitch string (default: "C4"). |
| pitch_B | Second pitch string (default: "C4"). |
| int Interval::getDiatonicInterval | ( | const bool | useSingleOctave = true, |
| const bool | absoluteValue = false |
||
| ) | const |
Returns the diatonic interval number (e.g., 3 for a third).
| useSingleOctave | If true, computes within a single octave. |
| absoluteValue | If true, returns absolute value. |
| int Interval::getDiatonicSteps | ( | const bool | useSingleOctave = true, |
| const bool | absoluteValue = false |
||
| ) | const |
Returns the number of diatonic steps between the notes.
| useSingleOctave | If true, computes within a single octave. |
| absoluteValue | If true, returns absolute value. |
| std::string Interval::getDirection | ( | ) | const |
Returns the direction of the interval as a string ("asc", "desc", or empty for unison).
| std::string Interval::getName | ( | ) | const |
Returns the interval name (e.g., "M3", "P5", "m2").
| std::vector< Note > Interval::getNotes | ( | ) | const |
Returns the two notes defining the interval.
| int Interval::getNumOctaves | ( | const bool | absoluteValue = false | ) | const |
Returns the number of octaves between the notes.
| absoluteValue | If true, returns absolute value. |
| int Interval::getNumSemitones | ( | const bool | absoluteValue = false | ) | const |
Returns the number of semitones between the notes.
| absoluteValue | If true, returns absolute value. |
| int Interval::getPitchStepInterval | ( | ) | const |
Returns the pitch step interval (e.g., 1 for unison, 2 for second).
| bool Interval::isAnyOctaveAugmentedFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented fifth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveAugmentedFourth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented fourth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveAugmentedOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented octave in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveDiminishedFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished fifth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveDiminishedOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished octave in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveDiminishedSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished seventh in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveFifth | ( | ) | const |
Returns true if the interval is a generic fifth (any octave).
| bool Interval::isAnyOctaveFourth | ( | ) | const |
Returns true if the interval is a generic fourth (any octave).
| bool Interval::isAnyOctaveMajorSecond | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major second in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMajorSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major seventh in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMajorSixth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major sixth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMajorThird | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major third in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMinorSecond | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor second in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMinorSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor seventh in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMinorSixth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor sixth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveMinorThird | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor third in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveOctave | ( | ) | const |
Returns true if the interval is a generic octave (any octave).
| bool Interval::isAnyOctavePerfectFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect fifth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctavePerfectFourth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect fourth in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctavePerfectOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect octave in any octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAnyOctaveSecond | ( | ) | const |
Returns true if the interval is a generic second (any octave).
| bool Interval::isAnyOctaveSeventh | ( | ) | const |
Returns true if the interval is a generic seventh (any octave).
| bool Interval::isAnyOctaveSixth | ( | ) | const |
Returns true if the interval is a generic sixth (any octave).
| bool Interval::isAnyOctaveThird | ( | ) | const |
Returns true if the interval is a generic third (any octave).
| bool Interval::isAscendant | ( | ) | const |
Returns true if the interval is ascending.
| bool Interval::isAugmented | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is augmented.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAugmentedFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented fifth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAugmentedFourth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented fourth (tritone).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAugmentedOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isAugmentedUnisson | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an augmented unison.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isCompound | ( | ) | const |
Returns true if the interval is compound (greater than an octave).
| bool Interval::isDescendant | ( | ) | const |
Returns true if the interval is descending.
| bool Interval::isDiminished | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is diminished.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isDiminishedFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished fifth (tritone).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isDiminishedOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isDiminishedSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished seventh.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isDiminishedUnisson | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a diminished unison.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isEleventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an eleventh (perfect or sharp).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic fifth (perfect, augmented, or diminished).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isFourth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic fourth (perfect, augmented, or diminished).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajor | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is major.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorNinth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major ninth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorSecond | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major second.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major seventh.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorSixth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major sixth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorThird | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major third.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMajorThirdteenth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a major thirteenth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinor | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is minor.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorNinth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor ninth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorSecond | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor second.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor seventh.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorSixth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor sixth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorThird | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor third.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isMinorThirdteenth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a minor thirteenth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isNinth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a ninth (major or minor).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is an octave (perfect, augmented, or diminished).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfect | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is perfect.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfectEleventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect eleventh.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfectFifth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect fifth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfectFourth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect fourth.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfectOctave | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect octave.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isPerfectUnisson | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a perfect unison.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isSecond | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic second (major or minor).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isSeventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic seventh (major, minor, or diminished).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isSharpEleventh | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a sharp eleventh.
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isSimple | ( | ) | const |
Returns true if the interval is simple (within an octave).
| bool Interval::isSixth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic sixth (major or minor).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isThird | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a generic third (major or minor).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isThirdteenth | ( | const bool | useEnharmony = false | ) | const |
Returns true if the interval is a thirteenth (major or minor).
| useEnharmony | If true, considers enharmonic equivalence. |
| bool Interval::isTonal | ( | ) | const |
Returns true if the interval is tonal (major, minor, perfect, etc.).
|
inline |
Less-than operator for comparing intervals by number of semitones.
| otherInterval | Interval to compare. |
| void Interval::setNotes | ( | const std::string & | pitch_A, |
| const std::string & | pitch_B | ||
| ) |
Sets the notes of the interval using pitch strings.
| pitch_A | First pitch string. |
| pitch_B | Second pitch string. |
| int Interval::toCents | ( | const float | freqA4 = 440.0f | ) | const |
Returns the interval size in cents (for microtonal/tuning analysis).
| freqA4 | Reference frequency for A4 (default: 440.0 Hz). |