shithub: aubio

Download patch

ref: f9400d0a209858397aaf3f8dfc5d754e1a4ecf3f
parent: 97a8befe2dc962f40f9d5c7f58ccd62f428bff63
author: Paul Brossier <piem@piem.org>
date: Mon Oct 29 15:22:15 EDT 2018

[py] improve slice_source_at_stamps examples

--- a/python/lib/aubio/slicing.py
+++ b/python/lib/aubio/slicing.py
@@ -54,13 +54,16 @@
 
     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
     -----