public function getAllPitches($heightless=false) {
        $pitches = array();
        foreach ($this->layers as $layer) {
            $layerPitches = $layer->getAllPitches($heightless);
            $pitches      = array_merge_recursive($pitches, $layerPitches);
        }

        return $pitches;

    }
public function getAllPitches($heightless=false) {
        $pitches = array();
        foreach ($this->layers as $layer) {
            $layerPitches = $layer->getAllPitches($heightless);
            $pitches      = array_merge_recursive($pitches, $layerPitches);
        }

        return $pitches;

    }
public function getAllPitches ( $ heightless = false ) { $ pitches = array ( ) ; foreach ( $ this -> layers as $ layer ) { $ layerPitches = $ layer -> getAllPitches ( $ heightless ) ; $ pitches = array_merge_recursive ( $ pitches , $ layerPitches ) ; } return $ pitches ; }
returns an array of Pitch objects, for every pitch of every note in the measure.

@param  boolean $heightless if true, will return heightless pitches all mudul to the same octave. Useful for analysis, determining mode etc. analysis, determining mode etc.
analysis, determining mode etc.
@return array  an array of Pitch objects
returns an array of Pitch objects for every pitch of every note in the measure .