コード例 #1
0
ファイル: Theory.php プロジェクト: niieani/nandu
 function findClosestEquivalent($note1, $note2, $distance = 7, $scale)
 {
     if (defined('DEBUG')) $log = Nandu_Utilities_KLogger::instance(dirname(DEBUG), Nandu_Utilities_KLogger::DEBUG);
     
     if (defined('DEBUG')) $log->logDebug("finding closest equivalent for $note1 vs $note2 with distance $distance");
     if ($this->checkInterval($note1, $note2) > $distance)
     {
         return $this->oneOctaveTransposeCloser($note1, $note2, $distance, $scale);
     }
     else return $note1;
 }
コード例 #2
0
ファイル: KLogger.php プロジェクト: niieani/nandu
 /**
  * Sets the date format used by all instances of KLogger
  * 
  * @param string $dateFormat Valid format string for date()
  */
 public static function setDateFormat($dateFormat)
 {
     self::$_dateFormat = $dateFormat;
 }