Pitch class final

A note in the octave range.


See also:

Inheritance
Implemented types
Mixed-in types
Annotations
  • @immutable

Constructors

Pitch(Note note, {required int octave})
Creates a new Pitch from note and octave.
const
Pitch.fromMidi(int midiNumber)
Create a Pitch from a MIDI number.
factory
Pitch.parse(String source, {List<StringParser<Pitch>> chain = parsers})
Parse source as a Pitch and return its value.
factory

Properties

augmentedTriad Chord<Pitch>
The ChordPattern.augmentedTriad on this Pitch.
no setter
diminishedTriad Chord<Pitch>
The ChordPattern.diminishedTriad on this Pitch.
no setter
hashCode int
The hash code for this object.
no setteroverride
majorTriad Chord<Pitch>
The ChordPattern.majorTriad on this Pitch.
no setter
midiNumber int?
The MIDI number (an integer from 0 to 127) of this Pitch, or null for pitches out of the MIDI range.
no setter
minorTriad Chord<Pitch>
The ChordPattern.minorTriad on this Pitch.
no setter
note Note
The note inside the octave.
final
octave int
The octave where the note is positioned.
final
respelledDownwards Pitch
This Pitch respelled downwards while keeping the same number of semitones.
no setteroverride
respelledSimple Pitch
This Pitch with the simplest Accidental spelling while keeping the same number of semitones.
no setteroverride
respelledUpwards Pitch
This Pitch respelled upwards while keeping the same number of semitones.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semitones int
The number of semitones of this Pitch from C0 (root).
no setteroverride

Methods

at(Frequency frequency) TuningFork
Returns the TuningFork from this Pitch at a given frequency.
compareTo(Pitch other) int
Compares this object to another object.
override
difference(Pitch other) int
The difference in semitones between this Pitch and other.
override
format([StringFormatter<Pitch> formatter = ScientificPitchNotation.english]) String
The string representation of this Pitch based on formatter.
override
frequency({TuningSystem tuningSystem = const EqualTemperament.edo12(), Celsius temperature = .reference, Celsius referenceTemperature = .reference}) Frequency
The Frequency of this Pitch from tuningSystem and temperature.
harmonics({bool undertone = false, TuningSystem tuningSystem = const EqualTemperament.edo12(), Celsius temperature = .reference, Celsius referenceTemperature = .reference}) Iterable<ClosestPitch>
The ClosestPitch set of harmonics series from this Pitch from tuningSystem, temperature, and whether undertone.
inOctave(int octave) Pitch
Changes the octave of this Pitch.
interval(Pitch other) Interval
The interval between this Pitch and other.
override
isEnharmonicWith(Enharmonic<PitchClass> other) bool
Whether C is enharmonically equivalent to other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
respellByAccidental(Accidental accidental) Pitch
This Pitch respelled by accidental while keeping the same number of semitones.
override
respellByNoteName(NoteName noteName) Pitch
This Pitch respelled by noteName while keeping the same number of semitones.
override
respellByOrdinalDistance(int distance) Pitch
This Pitch respelled by NoteName.ordinal distance while keeping the same number of semitones.
override
toClass() PitchClass
Returns the PitchClass from semitones.
inherited
toString() String
A string representation of this object.
override
transposeBy(Interval interval) Pitch
Transposes this Pitch by interval.
override

Operators

operator +(Cent cents) ClosestPitch
Returns the ClosestPitch with cents added to this Pitch.
operator -(Cent cents) ClosestPitch
Returns the ClosestPitch with cents subtracted from this Pitch.
operator <(Pitch other) bool
Whether this T is numerically smaller than other.
inherited
operator <=(Pitch other) bool
Whether this T is numerically smaller than or equal to other.
inherited
operator ==(Object other) bool
The equality operator.
override
operator >(Pitch other) bool
Whether this T is numerically greater than other.
inherited
operator >=(Pitch other) bool
Whether this T is numerically greater than or equal to other.
inherited

Static Methods

octaveFromSemitones(int semitones) int
The octave that corresponds to the semitones from root height.

Constants

parsers → const List<StringNotationSystem<Pitch>>
The chain of StringParsers used to parse a Pitch.
reference → const Pitch
The reference Pitch.
referenceOctave → const int
The reference octave.