From: Paul Brossier Date: Mon, 29 Oct 2018 18:22:15 +0000 (+0100) Subject: [py] improve slice_source_at_stamps examples X-Git-Tag: 0.4.8~90^2~17 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=f9400d0a209858397aaf3f8dfc5d754e1a4ecf3f;p=aubio.git [py] improve slice_source_at_stamps examples --- diff --git a/python/lib/aubio/slicing.py b/python/lib/aubio/slicing.py index ef70fea5..e85ac034 100644 --- a/python/lib/aubio/slicing.py +++ b/python/lib/aubio/slicing.py @@ -54,13 +54,16 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, Examples -------- - Create two slices, the first second of a file and the rest of it: + Create two slices: the first slice starts at the beginning of the + input file `loop.wav` and lasts exactly one second, starting at + sample `0` and ending at sample `44099`; the second slice starts + at sample `44100` and lasts until the end of the input file: >>> aubio.slice_source_at_stamps('loop.wav', [0, 44100]) Create one slice, from 1 second to 2 seconds: - >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100*2]) + >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100 * 2 - 1]) Notes -----