IntervalClass class final
The shortest distance in pitch class space between two unordered PitchClasses.
The largest IntervalClass is IntervalClass.tritone (6) since any greater
interval n
may be reduced to chromaticDivisions - n
.
See Interval class.
See also:
- Implemented types
- Annotations
-
- @immutable
Constructors
- IntervalClass(int semitones)
-
Creates an IntervalClass from
semitones
.const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semitones → int
-
The distance in semitones that defines this IntervalClass.
final
Methods
-
compareTo(
IntervalClass other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveClosestSpelling(
[Quality? preferredQuality]) → Interval -
The Interval that matches with
preferredQuality
from this IntervalClass. -
spellings(
{int distance = 0}) → Set< Interval> -
The Interval spellings at
distance
sharing the same number of semitones. -
toString(
) → String -
The string representation of this IntervalClass.
override
Operators
-
operator *(
int factor) → IntervalClass -
Multiplies this IntervalClass by
factor
. -
operator +(
IntervalClass other) → IntervalClass -
Adds
other
to this IntervalClass. -
operator -(
IntervalClass other) → IntervalClass -
Subtracts
other
from this IntervalClass. -
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- M2 → const IntervalClass
- A distance of 2 semitones IntervalClass, which corresponds to Interval.M2 or Interval.m7.
- m2 → const IntervalClass
- A distance of 1 semitones IntervalClass, which corresponds to Interval.m2 or Interval.M7.
- M3 → const IntervalClass
- A distance of 4 semitones IntervalClass, which corresponds to Interval.M3 or Interval.m6.
- m3 → const IntervalClass
- A distance of 3 semitones IntervalClass, which corresponds to Interval.m3 or Interval.M6.
- P1 → const IntervalClass
- A distance of 0 semitones IntervalClass, which corresponds to Interval.P1 or Interval.P8.
- P4 → const IntervalClass
- A distance of 5 semitones IntervalClass, which corresponds to Interval.P4 or Interval.P5.
- tritone → const IntervalClass
- A distance of 6 semitones IntervalClass, which corresponds to Interval.A4 or Interval.d5.