shithub: aubio

Download patch

ref: aef9691a3e80548d2326a7b81e36845e5951f9cc
parent: c2f7db8416f143c1f09dda351c0c63643683ed2d
parent: 980a4f421f51f6f78f47ad69f40e8947254a1d8c
author: Paul Brossier <piem@piem.org>
date: Tue Sep 20 21:49:22 EDT 2016

Merge branch 'master' into pitchshift

--- a/doc/aubiomfcc.txt
+++ b/doc/aubiomfcc.txt
@@ -6,6 +6,7 @@
   aubiomfcc source
   aubiomfcc [[-i] source]
             [-r rate] [-B win] [-H hop]
+            [-T time-format]
             [-v] [-h]
 
 DESCRIPTION
@@ -36,6 +37,9 @@
 
   -H, --hopsize hop  The number of samples between two consecutive analysis.
   Defaults to 256.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -h, --help  Print a short help message and exit.
 
--- a/doc/aubionotes.txt
+++ b/doc/aubionotes.txt
@@ -8,6 +8,7 @@
              [-r rate] [-B win] [-H hop]
              [-O method] [-t thres]
              [-p method] [-u unit] [-l thres]
+             [-T time-format]
              [-s sil]
              [-j] [-v] [-h]
 
@@ -63,6 +64,9 @@
   -s, --silence sil  Set the silence threshold, in dB, under which the pitch
   will not be detected. A value of -20.0 would eliminate most onsets but the
   loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -j, --jack  Use Jack input/output. You will need a Jack connection
   controller to feed aubio some signal and listen to its output.
--- a/doc/aubioonset.txt
+++ b/doc/aubioonset.txt
@@ -7,6 +7,7 @@
   aubioonset [[-i] source] [-o sink]
              [-r rate] [-B win] [-H hop]
              [-O method] [-t thres]
+             [-T time-format]
              [-s sil] [-m] [-f]
              [-j] [-v] [-h]
 
@@ -54,6 +55,9 @@
   -s, --silence sil  Set the silence threshold, in dB, under which the pitch
   will not be detected. A value of -20.0 would eliminate most onsets but the
   loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -m, --mix-input  Mix source signal to the output signal before writing to
   sink.
--- a/doc/aubiopitch.txt
+++ b/doc/aubiopitch.txt
@@ -7,6 +7,7 @@
   aubiopitch [[-i] source] [-o sink]
              [-r rate] [-B win] [-H hop]
              [-p method] [-u unit] [-l thres]
+             [-T time-format]
              [-s sil] [-f]
              [-v] [-h] [-j]
 
@@ -58,6 +59,9 @@
   -s, --silence sil  Set the silence threshold, in dB, under which the onset
   will not be detected. A value of -20.0 would eliminate most onsets but the
   loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -m, --mix-input  Mix source signal to the output signal before writing to
   sink.
--- a/doc/aubioquiet.txt
+++ b/doc/aubioquiet.txt
@@ -6,6 +6,7 @@
   aubioquiet source
   aubioquiet [[-i] source]
              [-r rate] [-B win] [-H hop]
+             [-T time-format]
              [-s sil]
              [-v] [-h]
 
@@ -37,6 +38,9 @@
 
   -s, --silence sil  Set the silence threshold, in dB, under which the pitch
   will not be detected. Defaults to -90.0.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -h, --help  Print a short help message and exit.
 
--- a/doc/aubiotrack.txt
+++ b/doc/aubiotrack.txt
@@ -6,6 +6,7 @@
   aubiotrack source
   aubiotrack [[-i] source] [-o sink]
              [-r rate] [-B win] [-H hop]
+             [-T time-format]
              [-s sil] [-m]
              [-j] [-v] [-h]
 
@@ -52,6 +53,9 @@
 
   -j, --jack  Use Jack input/output. You will need a Jack connection
   controller to feed aubio some signal and listen to its output.
+
+  -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
+  seconds.
 
   -h, --help  Print a short help message and exit.
 
--- a/python/tests/test_source.py
+++ b/python/tests/test_source.py
@@ -27,20 +27,20 @@
 
 class aubio_source_test_case(aubio_source_test_case_base):
 
-    def test_close_file(self):
+    @params(*list_of_sounds)
+    def test_close_file(self, filename):
         samplerate = 0 # use native samplerate
         hop_size = 256
-        for p in list_of_sounds:
-            f = source(p, samplerate, hop_size)
-            f.close()
+        f = source(filename, samplerate, hop_size)
+        f.close()
 
-    def test_close_file_twice(self):
+    @params(*list_of_sounds)
+    def test_close_file_twice(self, filename):
         samplerate = 0 # use native samplerate
         hop_size = 256
-        for p in list_of_sounds:
-            f = source(p, samplerate, hop_size)
-            f.close()
-            f.close()
+        f = source(filename, samplerate, hop_size)
+        f.close()
+        f.close()
 
 class aubio_source_read_test_case(aubio_source_test_case_base):
 
--