public function primeFormForte() {
		if ($this->bits == 0) {
			return 0;
		}

		$rotations = $this->getIntervalsOfAllInversionsAndRotations();

		// now sort all the PCSs for leftmost density
		usort($rotations, function($a, $b){
			// biggest interval at the end,
			if ($a[count($a)-1] !== $b[count($b)-1]) {
				return $a[count($a)-1] < $b[count($b)-1];
			}
			// smaller interval at the beginning
			for ($i=0; $i<count($a); $i++) {
				if ($a[$i] !== $b[$i]) {
					return $a[$i] > $b[$i];
				}
			}
			return 0;
		});
		$primeRotation = $rotations[0];

		// turn the intervals back into tones
		$p = 0;
		$tones = array(0);
		for ($i=0; $i<count($primeRotation)-1; $i++) {
			$p += $primeRotation[$i]; // add the interval...
			$tones[] = $p;
		}

		return \ianring\BitmaskUtils::tones2Bits($tones);
	}
public function primeFormForte() {
		if ($this->bits == 0) {
			return 0;
		}

		$rotations = $this->getIntervalsOfAllInversionsAndRotations();

		// now sort all the PCSs for leftmost density
		usort($rotations, function($a, $b){
			// biggest interval at the end,
			if ($a[count($a)-1] !== $b[count($b)-1]) {
				return $a[count($a)-1] < $b[count($b)-1];
			}
			// smaller interval at the beginning
			for ($i=0; $i<count($a); $i++) {
				if ($a[$i] !== $b[$i]) {
					return $a[$i] > $b[$i];
				}
			}
			return 0;
		});
		$primeRotation = $rotations[0];

		// turn the intervals back into tones
		$p = 0;
		$tones = array(0);
		for ($i=0; $i<count($primeRotation)-1; $i++) {
			$p += $primeRotation[$i]; // add the interval...
			$tones[] = $p;
		}

		return \ianring\BitmaskUtils::tones2Bits($tones);
	}
public function primeFormForte ( ) { if ( $ this -> bits == 0 ) { return 0 ; } $ rotations = $ this -> getIntervalsOfAllInversionsAndRotations ( ) ; // now sort all the PCSs for leftmost density usort ( $ rotations , function ( $ a , $ b ) { // biggest interval at the end, if ( $ a [ count ( $ a ) - 1 ] !== $ b [ count ( $ b ) - 1 ] ) { return $ a [ count ( $ a ) - 1 ] < $ b [ count ( $ b ) - 1 ] ; } // smaller interval at the beginning for ( $ i = 0 ; $ i < count ( $ a ) ; $ i ++ ) { if ( $ a [ $ i ] !== $ b [ $ i ] ) { return $ a [ $ i ] > $ b [ $ i ] ; } } return 0 ; } ) ; $ primeRotation = $ rotations [ 0 ] ; // turn the intervals back into tones $ p = 0 ; $ tones = array ( 0 ) ; for ( $ i = 0 ; $ i < count ( $ primeRotation ) - 1 ; $ i ++ ) { $ p += $ primeRotation [ $ i ] ; // add the interval... $ tones [ ] = $ p ; } return \ ianring \ BitmaskUtils :: tones2Bits ( $ tones ) ; }
returns the prime form of this PCS according to Forte's algorithm. Inversions are excluded as duplicates!
@return int
returns the prime form of this PCS according to Forte s algorithm . Inversions are excluded as duplicates!