function addNote($note) {
        if (!count($this->layers)) {
            $layer = new Layer();
            $this->addLayer($layer);
        } else {
            $layer = $this->layers[0];
        }

        $layer->addNote($note);

    }
function addNote($note) {
        if (!count($this->layers)) {
            $layer = new Layer();
            $this->addLayer($layer);
        } else {
            $layer = $this->layers[0];
        }

        $layer->addNote($note);

    }
function addNote ( $ note ) { if ( ! count ( $ this -> layers ) ) { $ layer = new Layer ( ) ; $ this -> addLayer ( $ layer ) ; } else { $ layer = $ this -> layers [ 0 ] ; } $ layer -> addNote ( $ note ) ; }
adds a note to a measure. Assumes that it should be added to the first layer, and if there are no layers in
the measure one should be created. The note is enclosed in its own Chord object.

@param Note $note the note to add
adds a note to a measure . Assumes that it should be added to the first layer and if there are no layers in the measure one should be created . The note is enclosed in its own Chord object .