closestPitches property

Set<ClosestPitch> closestPitches

The set of ClosestPitch for each Frequency element.

Example:

Note.c.inOctave(1).frequency().harmonics(upToIndex: 7).closestPitches
    .toString() == '{C1, C2, G2+2, C3, E3-14, G3+2, A♯3-31, C4}'

Implementation

Set<ClosestPitch> get closestPitches =>
    map((frequency) => frequency.closestPitch()).toSet();