public function countMaxConsecutiveOffBits($scale = null) {
		$max = 0;
		if (is_null($scale)) {
			$scale = $this->scale;
		}
		$c = 0;
		for ($i=0; $i<12; $i++) {
			if (!($scale & (1 << ($i)))) {
				$c++;
				if ($c >= $max) {
					$max = $c;
				}
			} else {
				$c = 0;
			}
		}
		return $max;
	}
public function countMaxConsecutiveOffBits($scale = null) {
		$max = 0;
		if (is_null($scale)) {
			$scale = $this->scale;
		}
		$c = 0;
		for ($i=0; $i<12; $i++) {
			if (!($scale & (1 << ($i)))) {
				$c++;
				if ($c >= $max) {
					$max = $c;
				}
			} else {
				$c = 0;
			}
		}
		return $max;
	}
public function countMaxConsecutiveOffBits ( $ scale = null ) { $ max = 0 ; if ( is_null ( $ scale ) ) { $ scale = $ this -> scale ; } $ c = 0 ; for ( $ i = 0 ; $ i < 12 ; $ i ++ ) { if ( ! ( $ scale & ( 1 << ( $ i ) ) ) ) { $ c ++ ; if ( $ c >= $ max ) { $ max = $ c ; } } else { $ c = 0 ; } } return $ max ; }
one flaw in this function is that it doesn't sense consecutive off bits that span across the root, ie for rootless scales
@param  [type]  $scale [description]
@param  integer $max   [description]
@return [type]         [description]
one flaw in this function is that it doesn t sense consecutive off bits that span across the root ie for rootless scales