# HG changeset patch # User Chris Cannam # Date 1436364173 -3600 # Node ID 79b050ca2fc2dd3facc9e28ceb75062c7b0566fd # Parent ee085cf5832d64f6546481450449553c5eb105ac Docs diff -r ee085cf5832d -r 79b050ca2fc2 vamp/collect.py --- 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) diff -r ee085cf5832d -r 79b050ca2fc2 vamp/load.py --- 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, diff -r ee085cf5832d -r 79b050ca2fc2 vamp/process.py --- 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)