shithub: aubio

Download patch

ref: 13340a68093f6c0fb0b3887be9a0085b74874e71
parent: 8e8bc5040bb3f200defe193075d9346ccd8c6970
author: Paul Brossier <piem@altern.org>
date: Thu Jun 2 21:00:12 EDT 2005

added silence detection option to aubiocut

--- a/python/aubiocut
+++ b/python/aubiocut
@@ -64,7 +64,11 @@
         parser.add_option("-d","--derivate",
                           action="store_true", dest="derivate", default=False, 
                           help="derivate onset detection function")
+        parser.add_option("-S","--silencecut",
+                          action="store_true", dest="silencecut", default=False,
+                          help="outputs silence locations")
         # to be implemented
+        
         parser.add_option("-z","--zerocross",
                           action="store_true", dest="zerocross", default=False, 
                           help="NOT IMPLEMENTED zero crossing matching")
@@ -107,6 +111,8 @@
 if options.beat:
         #onsets = getbeats(filename,threshold,silence,mode=options.mode)
         exit("not implemented yet")
+elif options.silencecut:
+        onsets = getsilences(filename,hopsize=hopsize,silence=silence)
 elif options.plot:
         onsets, ofunc = getonsets(filename,threshold,silence,
                 mode=options.mode,localmin=options.localmin,