History

[doc] rewrite python/README.md demo section

Paul Brossier committed 7 years ago

Commit d90d5bb1 parent 007c0a11 file · +38 −12Browse files

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

Unified · Split

python/README.md+38−12
@@ -57,21 +57,47 @@ Documentation · 56 unmodified lines
5757 [homepage]: https://aubio.org
5858 [NumPy]: https://www.numpy.org
5959
60−Finding some inspiration
61−------------------------
60+Demos scripts
61+-------------
62+
63+Some examples are available in the [`python/demos`][demos_dir] folder. These
64+scripts are small programs written in python and using python-aubio.
65+
66+**Notes**: installing additional modules is required to run some of the demos.
67+
68+### Analysis
69+
70+- `demo_source.py` uses aubio to read audio samples from media files
71+- `demo_onset_plot.py` detects attacks in a sound file and plots the results
72+ using [matplotlib]
73+- `demo_pitch.py` looks for fundamental frequency in a sound file and plots the
74+ results using [matplotlib]
75+- `demo_spectrogram.py`, `demo_specdesc.py`, `demo_mfcc.py` for spectral
76+ analysis.
77+
78+### Real-time
79+
80+- `demo_pyaudio.py` and `demo_tapthebeat.py` use [pyaudio]
81+- `demo_pysoundcard_play.py`, `demo_pysoundcard.py` use [PySoundCard]
82+- `demo_alsa.py` uses [pyalsaaudio]
6283
63−Some examples are available in the `python/demos` directory. These scripts are
64−small programs written in python and using python-aubio.
84+### Others
6585
66−For instance, `demo_source.py` reads a media file.
86+- `demo_timestretch.py` can change the duration of an input file and write the
87+ new sound to disk,
88+- `demo_wav2midi.py` detects the notes in a file and uses [mido] to write the
89+ results into a MIDI file
6790
68− $ ./python/demos/demo_source.py /path/to/sound/sample.wav
91+### Example
6992
70−and `demo_timestretch_online.py` stretches the original file into a new one:
93+Use `demo_timestretch_online.py` to slow down `loop.wav`, write the results in
94+`stretched_loop.wav`:
7195
72− $ ./python/demo/demo_timestretch_online.py loop.wav stretched_loop.wav 0.92`
96+ $ python demo_timestretch_online.py loop.wav stretched_loop.wav 0.92
7397
74−Note: you might need to install additional modules to run some of the demos.
75−Some demos use [matplotlib](http://matplotlib.org/) to draw plots, others use
76−[PySoundCard](https://github.com/bastibe/PySoundCard) to play and record
77−sounds.
98+[demos_dir]:https://github.com/aubio/aubio/tree/master/python/demos
99+[pyaudio]:https://people.csail.mit.edu/hubert/pyaudio/
100+[PySoundCard]:https://github.com/bastibe/PySoundCard
101+[pyalsaaudio]:https://larsimmisch.github.io/pyalsaaudio/
102+[mido]:https://mido.readthedocs.io
103+[matplotlib]:https://matplotlib.org/

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