PitchClass class final
A set of all pitches that are a whole number of octaves apart, sharing the same chroma.
See Pitch class.
See also:
- Inheritance
-
- Object
- Scalable<
PitchClass> - PitchClass
- Implemented types
- Annotations
-
- @immutable
Constructors
- PitchClass(int semitones)
-
Creates a new PitchClass 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 number of semitones (chroma) that represent this PitchClass.
final
Methods
-
compareTo(
PitchClass other) → int -
Compares this object to another object.
override
-
difference(
PitchClass other) → int -
The difference in semitones between this PitchClass and
other
.override -
interval(
PitchClass other) → Interval -
The IntervalClass expressed as Interval between this PitchClass and
other
.override -
isEnharmonicWith(
ClassMixin< PitchClass> other) → bool -
Whether
Class
is enharmonically equivalent toother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveClosestSpelling(
[Accidental? preferredAccidental]) → Note -
The Note that matches with
preferredAccidental
from this PitchClass. -
resolveSpelling(
[Accidental? withAccidental]) → Note -
The Note that matches
withAccidental
from this PitchClass. -
spellings(
{int distance = 0}) → Set< Note> -
The different spellings at
distance
sharing the same number of semitones. -
toClass(
) → PitchClass -
Creates a new PitchClass from semitones.
inherited
-
toString(
{PitchClassNotation system = PitchClassNotation.enharmonicSpellings}) → String -
The string representation of this PitchClass based on
system
.override -
transposeBy(
Interval interval) → PitchClass -
Transposes this PitchClass by
interval
.override
Operators
-
operator *(
int factor) → PitchClass - A pitch-class multiplication modulo chromaticDivisions of this PitchClass.
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- a → const PitchClass
- Pitch class 9, which corresponds to Note.a.
- aSharp → const PitchClass
-
Pitch class 10, which corresponds to
Note.a.sharp
orNote.b.flat
. - b → const PitchClass
- Pitch class 11, which corresponds to Note.b.
- c → const PitchClass
- Pitch class 0, which corresponds to Note.c.
- cSharp → const PitchClass
-
Pitch class 1, which corresponds to
Note.c.sharp
orNote.d.flat
. - d → const PitchClass
- Pitch class 2, which corresponds to Note.d.
- dSharp → const PitchClass
-
Pitch class 3, which corresponds to
Note.d.sharp
orNote.e.flat
. - e → const PitchClass
- Pitch class 4, which corresponds to Note.e.
- f → const PitchClass
- Pitch class 5, which corresponds to Note.f.
- fSharp → const PitchClass
-
Pitch class 6, which corresponds to
Note.f.sharp
orNote.g.flat
. - g → const PitchClass
- Pitch class 7, which corresponds to Note.g.
- gSharp → const PitchClass
-
Pitch class 8, which corresponds to
Note.g.sharp
orNote.g.flat
.