changeset 143:79b050ca2fc2

Docs
author Chris Cannam
date Wed, 08 Jul 2015 15:02:53 +0100
parents ee085cf5832d
children c64295f1cc33
files vamp/collect.py vamp/load.py vamp/process.py
diffstat 3 files changed, 37 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/vamp/collect.py	Wed Jul 08 13:32:14 2015 +0100
+++ b/vamp/collect.py	Wed Jul 08 15:02:53 2015 +0100
@@ -132,30 +132,35 @@
     output:
 
     * If the plugin output emits single-valued features at a fixed
-      sample-rate, then the "vector" element will be used. It will
-      contain a tuple of step time (the time in seconds between
-      consecutive feature values) and a one-dimensional NumPy array of
-      feature values. An example of such a feature might be a loudness
-      curve against time.
+    sample-rate, then the "vector" element will be used. It will
+    contain a tuple of step time (the time in seconds between
+    consecutive feature values) and a one-dimensional NumPy array of
+    feature values. An example of such a feature might be a loudness
+    curve against time.
 
     * If the plugin output emits multiple-valued features, with an
-      equal number of bins per feature, at a fixed sample-rate, then
-      the "matrix" element will be used. It will contain a tuple of
-      step time (the time in seconds between consecutive feature
-      values) and a two-dimensional NumPy array of feature values. An
-      example of such a feature might be a spectrogram.
+    equal number of bins per feature, at a fixed sample-rate, then
+    the "matrix" element will be used. It will contain a tuple of
+    step time (the time in seconds between consecutive feature
+    values) and a two-dimensional NumPy array of feature values. An
+    example of such a feature might be a spectrogram.
 
     * Otherwise, the "list" element will be used, and will contain a
-      list of features, where each feature is represented as a
-      dictionary containing a timestamp (always) and a duration
-      (optionally), a label (string), and a 1-dimensional array of
-      float values.
+    list of features, where each feature is represented as a
+    dictionary containing a timestamp (always) and a duration
+    (optionally), a label (string), and a 1-dimensional array of
+    float values.
+
+    If you wish to override the processing step size, block size, or
+    process timestamp method, you may supply them as keyword arguments
+    with the keywords step_size (int), block_size (int), and
+    process_timestamp_method (choose from vamp.vampyhost.SHIFT_DATA,
+    vamp.vampyhost.SHIFT_TIMESTAMP, or vamp.vampyhost.NO_SHIFT).
 
     If you would prefer to obtain features as they are calculated
     (where the plugin supports this) and with the format in which the
     plugin returns them, via an asynchronous generator function, use
     vamp.process() instead.
-
     """
 
     plugin, step_size, block_size = vamp.load.load_and_configure(data, sample_rate, plugin_key, parameters, **kwargs)
--- a/vamp/load.py	Wed Jul 08 13:32:14 2015 +0100
+++ b/vamp/load.py	Wed Jul 08 15:02:53 2015 +0100
@@ -71,9 +71,11 @@
     block size (or others as specified, see below). The channel count is
     taken from the shape of the data array provided.
 
-    Optionally the step size, block size, and process timestamp method
-    may be provided through step_size, block_size, and
-    process_timestamp_method keyword arguments.
+    If you wish to override the step size, block size, or process
+    timestamp method to be used, you may supply them as keyword
+    arguments with keywords step_size (int), block_size (int), and
+    process_timestamp_method (choose from vamp.vampyhost.SHIFT_DATA,
+    vamp.vampyhost.SHIFT_TIMESTAMP, or vamp.vampyhost.NO_SHIFT).
     """
 
     plug = vampyhost.load_plugin(plugin_key, sample_rate,
--- a/vamp/process.py	Wed Jul 08 13:32:14 2015 +0100
+++ b/vamp/process.py	Wed Jul 08 15:02:53 2015 +0100
@@ -82,6 +82,12 @@
     (RealTime objects), label (string), and a 1-dimensional array of
     float values.
 
+    If you wish to override the step size, block size, or process
+    timestamp method to be used, you may supply them as keyword
+    arguments with keywords step_size (int), block_size (int), and
+    process_timestamp_method (choose from vamp.vampyhost.SHIFT_DATA,
+    vamp.vampyhost.SHIFT_TIMESTAMP, or vamp.vampyhost.NO_SHIFT).
+
     If you would prefer to obtain all features in a single output
     structure, consider using vamp.collect() instead.
     """
@@ -191,6 +197,12 @@
     represented as a dictionary containing, optionally, timestamp and
     duration (RealTime objects), label (string), and a 1-dimensional
     array of float values.
+
+    If you wish to override the step size, block size, or process
+    timestamp method to be used, you may supply them as keyword
+    arguments with keywords step_size (int), block_size (int), and
+    process_timestamp_method (choose from vamp.vampyhost.SHIFT_DATA,
+    vamp.vampyhost.SHIFT_TIMESTAMP, or vamp.vampyhost.NO_SHIFT).
     """
 
     plugin, step_size, block_size = vamp.load.load_and_configure(data, sample_rate, plugin_key, parameters, **kwargs)