History

[py] improve slice_source_at_stamps examples

Paul Brossier committed 8 years ago

Commit f9400d01 parent 97a8bef1 file · +5 −2Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/aubio/slicing.py+5−2
@@ -54,13 +54,16 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, · 53 unmodified lines
5454
5555 Examples
5656 --------
57− Create two slices, the first second of a file and the rest of it:
57+ Create two slices: the first slice starts at the beginning of the
58+ input file `loop.wav` and lasts exactly one second, starting at
59+ sample `0` and ending at sample `44099`; the second slice starts
60+ at sample `44100` and lasts until the end of the input file:
5861
5962 >>> aubio.slice_source_at_stamps('loop.wav', [0, 44100])
6063
6164 Create one slice, from 1 second to 2 seconds:
6265
63− >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100*2])
66+ >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100 * 2 - 1])
6467
6568 Notes
6669 -----

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t