From: Paul Brossier Date: Mon, 29 Oct 2018 15:09:49 +0000 (+0100) Subject: [py] add a note about missing last timestamp to slice_source_at_stamps docs X-Git-Tag: 0.4.8~90^2~18 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=97a8befe2dc962f40f9d5c7f58ccd62f428bff63;p=aubio.git [py] add a note about missing last timestamp to slice_source_at_stamps docs --- 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: