public function getAllPitches($heightless=false) {
        $pitches = array();

        foreach ($this->notes as $note) {
            $pitch = $note->properties['pitch'];
            if ($heightless) {
                $pitch->setProperty('octave', null);
            }

            $pitchStringKey = $pitch->toString();
            if (!is_array($pitches[$pitchStringKey])) {
                $pitches[$pitchStringKey] = array();
            }

            $pitches[$pitchStringKey][] = $pitch;
        }

        // dedupe + count
        return $pitches;

    }