From 97a8befe2dc962f40f9d5c7f58ccd62f428bff63 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 29 Oct 2018 16:09:49 +0100 Subject: [PATCH] [py] add a note about missing last timestamp to slice_source_at_stamps docs --- python/lib/aubio/slicing.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/lib/aubio/slicing.py b/python/lib/aubio/slicing.py index 63ddcb93..ef70fea5 100644 --- a/python/lib/aubio/slicing.py +++ b/python/lib/aubio/slicing.py @@ -27,7 +27,7 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, The default `samplerate` is 0, meaning the original sampling rate of `source_file` will be used. When using a sampling rate different to the one of the original files, `timestamps` and - `timestamps_end` should be expressed in re-sampled samples. + `timestamps_end` should be expressed in the re-sampled signal. The `hopsize` parameter simply tells :class:`source` to use this hopsize and does not change the output slices. @@ -61,6 +61,12 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, Create one slice, from 1 second to 2 seconds: >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100*2]) + + Notes + ----- + Slices may be overlapping. If `timestamps_end` is `1` element + shorter than `timestamps`, the last slice will end at the end of + the file. """ if timestamps is None or len(timestamps) == 0: -- 2.11.0