shithub: aubio

Download patch

ref: f841b8165c5cecc0242e2c6e3015d8d5217ef93b
parent: 1397c6e76048e17d814e174da71cfdedeffcaa6a
author: Paul Brossier <piem@altern.org>
date: Mon Jun 13 19:09:32 EDT 2005

add Kullback Liebler onset detection function and its modified version

--- a/python/aubiocut
+++ b/python/aubiocut
@@ -21,8 +21,15 @@
                  setattr(parser.values, option.dest, specdiff)
         elif nvalue == 'energy'        :
                  setattr(parser.values, option.dest, energy)
+        elif nvalue == 'kl'            :
+                 setattr(parser.values, option.dest, kl)
+        elif nvalue == 'mkl'           :
+                 setattr(parser.values, option.dest, mkl)
         elif nvalue == 'dual'          :
                  setattr(parser.values, option.dest, 'dual')
+        else:
+                 print "unknown detection function selected\n", usage
+                 sys.exit(1)
 
 def parse_args():
         from optparse import OptionParser