public function autoTune($scale=null) {
        // todo: figure out the key and scale, based on the measure's Key property
        foreach ($this->layers as &$layer) {
            $layer->autoTune($scale);
        }

    }
public function autoTune($scale=null) {
        // todo: figure out the key and scale, based on the measure's Key property
        foreach ($this->layers as &$layer) {
            $layer->autoTune($scale);
        }

    }
public function autoTune ( $ scale = null ) { // todo: figure out the key and scale, based on the measure's Key property foreach ( $ this -> layers as & $ layer ) { $ layer -> autoTune ( $ scale ) ; } }
using the measure's own Key, will quantize all the notes to be part of a given scale.
If scale is omitted, will use the scale implied by the Key's "mode" property.

@param  $scale  a Scale object
@return null
using the measure s own Key will quantize all the notes to be part of a given scale . If scale is omitted will use the scale implied by the Key s mode property .