source: python/ext/aubio-docstrings.h @ 521b9ad

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretch
Last change on this file since 521b9ad was 521b9ad, checked in by Paul Brossier <piem@piem.org>, 20 months ago

[py] add minimal docstrings to generated objects

  • Property mode set to 100644
File size: 3.2 KB
Line 
1#define PYAUBIO_dct_doc \
2    "dct(size=1024)\n"\
3    "\n"\
4    "Compute Discrete Fourier Transorms of Type-II.\n"\
5    "\n"\
6    "Parameters\n"\
7    "----------\n"\
8    "size : int\n"\
9    "    size of the DCT to compute\n"\
10    "\n"\
11    "Example\n"\
12    "-------\n"\
13    ">>> d = aubio.dct(16)\n"\
14    ">>> d.size\n"\
15    "16\n"\
16    ">>> x = aubio.fvec(np.ones(d.size))\n"\
17    ">>> d(x)\n"\
18    "array([4., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n"\
19    "      dtype=float32)\n"\
20    ">>> d.rdo(d(x))\n"\
21    "array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n"\
22    "      dtype=float32)\n"\
23    "\n"\
24    "References\n"\
25    "----------\n"\
26    "`DCT-II in Discrete Cosine Transform\n"\
27    "<https://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II>`_\n"\
28    "on Wikipedia.\n"
29
30#define PYAUBIO_mfcc_doc \
31    "mfcc(buf_size=1024, n_filters=40, n_coeffs=13, samplerate=44100)\n"\
32    "\n"\
33    "Compute Mel Frequency Cepstrum Coefficients (MFCC).\n"\
34    "\n"\
35    "`mfcc` creates a callable which takes a `cvec` as input.\n"\
36    "\n"\
37    "If `n_filters = 40`, the filterbank will be initialized with\n"\
38    ":meth:`filterbank.set_mel_coeffs_slaney`. Otherwise, if `n_filters`\n"\
39    "is greater than `0`, it will be initialized with\n"\
40    ":meth:`filterbank.set_mel_coeffs` using `fmin = 0`,\n"\
41    "`fmax = samplerate/`.\n"\
42    "\n"\
43    "Example\n"\
44    "-------\n"\
45    ">>> buf_size = 2048; n_filters = 128; n_coeffs = 13; samplerate = 44100\n"\
46    ">>> mf = aubio.mfcc(buf_size, n_filters, n_coeffs, samplerate)\n"\
47    ">>> fftgrain = aubio.cvec(buf_size)\n"\
48    ">>> mf(fftgrain).shape\n"\
49    "(13,)\n"\
50    ""
51
52#define PYAUBIO_notes_doc \
53    "notes(method=\"default\", buf_size=1024, hop_size=512, samplerate=44100)\n"\
54    "\n"\
55    "Note detection\n"
56
57#define PYAUBIO_onset_doc \
58    "onset(method=\"default\", buf_size=1024, hop_size=512, samplerate=44100)\n"\
59    "\n"\
60    "Onset detection object. `method` should be one of method supported by\n"\
61    ":class:`specdesc`.\n"
62
63#define PYAUBIO_pitch_doc \
64    "pitch(method=\"default\", buf_size=1024, hop_size=512, samplerate=44100)\n"\
65    "\n"\
66    "Pitch detection.\n"\
67    "\n"\
68    "Supported methods: `yinfft`, `yin`, `yinfast`, `fcomb`, `mcomb`,\n"\
69    "`schmitt`, `specacf`, `default` (`yinfft`).\n"
70
71#define PYAUBIO_sampler_doc \
72    "sampler(hop_size=512, samplerate=44100)\n"\
73    "\n"\
74    "Sampler.\n"
75
76#define PYAUBIO_specdesc_doc \
77    "specdesc(method=\"default\", buf_size=1024)\n"\
78    "\n"\
79    "Spectral descriptor.\n"\
80    "\n"\
81    "Onset novelty methods: `energy`, `hfc`, `complex`, `phase`, `wphase`,\n"\
82    "`specdiff`, `kl`, `mkl`, `specflux`.\n"\
83    "\n"\
84    "Shape description methods: `centroid`, `spread`, `skewness`,\n"\
85    "`slope`, `decrease`, `rolloff`.\n"\
86    "\n"\
87    "Parameters\n"\
88    "----------\n"\
89    "method : str\n"\
90    "    Onset novelty or shape description method.\n"\
91    "buf_size : int\n"\
92    "    Length of the input frame.\n"
93
94#define PYAUBIO_tempo_doc \
95    "tempo(method=\"default\", buf_size=1024, hop_size=512, samplerate=44100)\n"\
96    "\n"\
97    "Tempo detection and beat tracking.\n"
98
99#define PYAUBIO_tss_doc \
100    "tss(buf_size=1024, hop_size=512)\n"\
101    "\n"\
102    "Transient/Steady-state separation.\n"
Note: See TracBrowser for help on using the repository browser.