Interval class
An Interval is the signed distance between two notes. Intervals that represent the same semitone span and accidental are interned. Thus, two instance of M3 are ===, but sharp P4 and flat P5 are distinct from each other and from TT.
Constructors
- Interval({required int number, String? qualityName})
-
factory
- Interval.fromSemitones(dynamic semitones, {int? number})
-
factory
Properties
- augmented → Interval
-
no setter
- diatonicSemitones → int
-
no setter
- diminished → Interval
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inspect → String
-
no setter
- number → int
-
final
- qualityName → String
-
final
- qualitySemitones → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semitones → int
-
no setter
Methods
-
inversion(
) → Interval -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Interval other) → Interval -
operator -(
Interval other) → Interval -
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- A1 → Interval
-
The augmented unison interval
final
- A2 → Interval
-
The augmented 2nd interval
final
- A3 → Interval
-
The augmented 3rd interval
final
- A4 → Interval
-
The augmented 4th interval
final
- A5 → Interval
-
The augmented 5th interval
final
- A6 → Interval
-
The augmented 6th interval
final
- A7 → Interval
-
The augmented 7th interval
final
- d2 → Interval
-
The diminished 2nd interval
final
- d3 → Interval
-
The diminished 3rd interval
final
- d4 → Interval
-
The diminished 4th interval
final
- d5 → Interval
-
The diminished 5th interval
final
- d6 → Interval
-
The diminished 6th interval
final
- d7 → Interval
-
The diminished 7th interval
final
- d8 → Interval
-
The diminished octave interval
final
- m2 → Interval
-
The minor 2nd interval
final
- M2 → Interval
-
The major 2nd interval
final
- m3 → Interval
-
The minor 3rd interval
final
- M3 → Interval
-
The major 3rd interval
final
- m6 → Interval
-
The minor 6th interval
final
- M6 → Interval
-
The major 6th interval
final
- m7 → Interval
-
The minor 7th interval
final
- M7 → Interval
-
The major 7th interval
final
- P1 → Interval
-
The perfect unison interval
final
- P4 → Interval
-
The perfect 4th interval
final
- P5 → Interval
-
The perfect 4th interval
final
- P8 → Interval
-
The perfect octave interval
final
- TT → Interval
-
The tritone interval
final