From f9400d0a209858397aaf3f8dfc5d754e1a4ecf3f Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 29 Oct 2018 19:22:15 +0100 Subject: [PATCH] [py] improve slice_source_at_stamps examples --- python/lib/aubio/slicing.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ----- -- 2.11.0