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
57[homepage]: https://aubio.org57[homepage]: https://aubio.org
58[NumPy]: https://www.numpy.org58[NumPy]: https://www.numpy.org
59 59
60Finding some inspiration60Demos scripts
61------------------------61-------------
62
63Some examples are available in the [`python/demos`][demos_dir] folder. These
64scripts 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]
62 83
63Some examples are available in the `python/demos` directory. These scripts are84### Others
64small programs written in python and using python-aubio.
65 85
66For 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
67 90
68 $ ./python/demos/demo_source.py /path/to/sound/sample.wav91### Example
69 92
70and `demo_timestretch_online.py` stretches the original file into a new one:93Use `demo_timestretch_online.py` to slow down `loop.wav`, write the results in
94`stretched_loop.wav`:
71 95
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
73 97
74Note: you might need to install additional modules to run some of the demos.98[demos_dir]:https://github.com/aubio/aubio/tree/master/python/demos
75Some demos use [matplotlib](http://matplotlib.org/) to draw plots, others use99[pyaudio]:https://people.csail.mit.edu/hubert/pyaudio/
76[PySoundCard](https://github.com/bastibe/PySoundCard) to play and record100[PySoundCard]:https://github.com/bastibe/PySoundCard
77sounds.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