public function toFrequency($tuning = 'equal', $a = 440, $precision = 2) {
        $ap = new Pitch('A', 0, 4);
        $n = $ap->interval($this); // get the interval between our note and A
        $s = pow(2, (1/12)); // the twelfth root of 2
        $p = pow($s, $n); // raised to the power of the interval in semitones
        $f = $p * $a; // multiplied by the frequency of "A"
        $f = round($f, $precision, PHP_ROUND_HALF_UP);
        return $f;
    }
public function toFrequency($tuning = 'equal', $a = 440, $precision = 2) {
        $ap = new Pitch('A', 0, 4);
        $n = $ap->interval($this); // get the interval between our note and A
        $s = pow(2, (1/12)); // the twelfth root of 2
        $p = pow($s, $n); // raised to the power of the interval in semitones
        $f = $p * $a; // multiplied by the frequency of "A"
        $f = round($f, $precision, PHP_ROUND_HALF_UP);
        return $f;
    }
public function toFrequency ( $ tuning = 'equal' , $ a = 440 , $ precision = 2 ) { $ ap = new Pitch ( 'A' , 0 , 4 ) ; $ n = $ ap -> interval ( $ this ) ; // get the interval between our note and A $ s = pow ( 2 , ( 1 / 12 ) ) ; // the twelfth root of 2 $ p = pow ( $ s , $ n ) ; // raised to the power of the interval in semitones $ f = $ p * $ a ; // multiplied by the frequency of "A" $ f = round ( $ f , $ precision , PHP_ROUND_HALF_UP ) ; return $ f ; }
returns the frequency of a pitch in Hz

@param  string  $tuning presumably we would want to be able to do this for more than just Equal Temperament
@param  integer $a      the frequency of "A", in case someone wants to use something other than the standard 440Hz
@return number           the frequency in Hz
returns the frequency of a pitch in Hz