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
54 54
55 Examples55 Examples
56 --------56 --------
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:
58 61
59 >>> aubio.slice_source_at_stamps('loop.wav', [0, 44100])62 >>> aubio.slice_source_at_stamps('loop.wav', [0, 44100])
60 63
61 Create one slice, from 1 second to 2 seconds:64 Create one slice, from 1 second to 2 seconds:
62 65
63 >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100*2])66 >>> aubio.slice_source_at_stamps('loop.wav', [44100], [44100 * 2 - 1])
64 67
65 Notes68 Notes
66 -----69 -----

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