function toMusicXML() {
        $out = '';
        $n   = 0;
        foreach ($this->notes as $note) {
            if (count($this->notes) > 1 && $n > 0) {
                $note->setProperty('chord', true);
            }

            $out .= $note->toMusicXML();
            $n++;
        }

        return $out;
    }
function toMusicXML() {
        $out = '';
        $n   = 0;
        foreach ($this->notes as $note) {
            if (count($this->notes) > 1 && $n > 0) {
                $note->setProperty('chord', true);
            }

            $out .= $note->toMusicXML();
            $n++;
        }

        return $out;
    }
function toMusicXML ( ) { $ out = '' ; $ n = 0 ; foreach ( $ this -> notes as $ note ) { if ( count ( $ this -> notes ) > 1 && $ n > 0 ) { $ note -> setProperty ( 'chord' , true ) ; } $ out .= $ note -> toMusicXML ( ) ; $ n ++ ; } return $ out ; }
renders this object as MusicXML.

@return string MusicXML representation of the object
renders this object as MusicXML .