Note class final

A musical note.


See also:

Inheritance
Implemented types
Annotations
  • @immutable

Constructors

Note(BaseNote baseNote, [Accidental accidental = Accidental.natural])
Creates a new Note from baseNote and accidental.
const
Note.parse(String source)
Parse source as a Note and return its value.
factory

Properties

accidental Accidental
The accidental that modifies the baseNote.
final
augmentedTriad Chord<Note>
The ChordPattern.augmentedTriad on this Note.
no setter
baseNote BaseNote
The base note that defines this Note.
final
circleOfFifthsDistance int
The distance in relation to the circle of fifths.
no setter
diminishedTriad Chord<Note>
The ChordPattern.diminishedTriad on this Note.
no setter
flat Note
This Note flattened by 1 semitone.
no setter
hashCode int
The hash code for this object.
no setteroverride
major Key
The TonalMode.major Key from this Note.
no setter
majorTriad Chord<Note>
The ChordPattern.majorTriad on this Note.
no setter
minor Key
The TonalMode.minor Key from this Note.
no setter
minorTriad Chord<Note>
The ChordPattern.minorTriad on this Note.
no setter
natural Note
This Note without an accidental (natural).
no setter
respelledDownwards Note
This Note respelled downwards while keeping the same number of semitones.
no setter
respelledSimple Note
This Note with the simplest Accidental spelling while keeping the same number of semitones.
no setter
respelledUpwards Note
This Note respelled upwards while keeping the same number of semitones.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semitones int
The semitones distance of this Note relative to Note.c.
no setter
sharp Note
This Note sharpened by 1 semitone.
no setter

Methods

circleOfFifths({int distance = chromaticDivisions ~/ 2}) → ({List<Note> flats, List<Note> sharps})
The circle of fifths starting from this Note up to distance.
compareTo(Note other) int
Compares this object to another object.
override
difference(Note other) int
The difference in semitones between this Note and other.
override
fifthsDistanceWith(Note other) int
The fifths distance between this Note and other.
flatCircleOfFifths({int distance = chromaticDivisions ~/ 2}) List<Note>
The flattened version of circleOfFifths from this Note up to distance.
inOctave(int octave) Pitch
This Note positioned in the given octave as a Pitch.
interval(Note other) Interval
The Interval between this Note and other.
override
isEnharmonicWith(ClassMixin<PitchClass> other) bool
Whether Class is enharmonically equivalent to other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
respellByAccidental(Accidental accidental) Note?
This Note respelled by accidental while keeping the same number of semitones.
respellByBaseNote(BaseNote baseNote) Note
This Note respelled by baseNote while keeping the same number of semitones.
respellByBaseNoteDistance(int distance) Note
This Note respelled by BaseNote.ordinal distance while keeping the same number of semitones.
toClass() PitchClass
Creates a new PitchClass from semitones.
inherited
toPitchClass() PitchClass
Creates a new PitchClass from semitones.
toString({NoteNotation system = NoteNotation.english}) String
The string representation of this Note based on system.
override
transposeBy(Interval interval) Note
Transposes this Note by interval.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

compareByClosestDistance(Note a, Note b) int
Comparator for Notes by closest distance.
compareByFifthsDistance(Note a, Note b) int
Comparator for Notes by fifths distance.

Constants

a → const Note
Note A.
b → const Note
Note B.
c → const Note
Note C.
d → const Note
Note D.
e → const Note
Note E.
f → const Note
Note F.
g → const Note
Note G.