pitchClass property

int get pitchClass

Returns the pitch class as an integer 0–11, as per the MEI v5 pclass attribute. C=0, C#=1, D=2, ..., B=11.

Implementation

int get pitchClass {
  return ((_stepSemitone + effectiveAlter.round()) % 12 + 12) % 12;
}