Skip to content

Commit 6d09e6a

Browse files
Update documentation and add info function
1 parent fc1c4a5 commit 6d09e6a

8 files changed

Lines changed: 132 additions & 43 deletions

File tree

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ If you use this toolbox in your research, please cite this article:
7474

7575
## Credits
7676

77-
Developers: [Frida Furmyr](https://github.com/fridafu), [Marcus Widmer](https://github.com/marcuswidmer), [Balint Laczko](https://github.com/balintlaczko), [Alexander Refsum Jensenius](https://github.com/alexarje/)
77+
Developers: [Balint Laczko](https://github.com/balintlaczko), [Joachim Poutaraud](https://github.com/joachimpoutaraud), [Frida Furmyr](https://github.com/fridafu), [Marcus Widmer](https://github.com/marcuswidmer), [Alexander Refsum Jensenius](https://github.com/alexarje/)
7878

7979
## License
8080

docs/musicalgestures/_audio.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Class container for audio analysis processes.
2626

2727
### Audio().descriptors
2828

29-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L210)
29+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L221)
3030

3131
```python
3232
def descriptors(
@@ -62,7 +62,7 @@ Renders a figure of plots showing spectral/loudness descriptors, including RMS e
6262

6363
### Audio().spectrogram
6464

65-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L107)
65+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L112)
6666

6767
```python
6868
def spectrogram(
@@ -72,6 +72,7 @@ def spectrogram(
7272
power=2,
7373
dpi=300,
7474
autoshow=True,
75+
raw=False,
7576
title=None,
7677
target_name=None,
7778
overwrite=False,
@@ -88,6 +89,7 @@ Renders a figure showing the mel-scaled spectrogram of the video/audio file.
8889
- `power` *float, optional* - The steepness of the curve for the color mapping. Defaults to 2.
8990
- `dpi` *int, optional* - Image quality of the rendered figure in DPI. Defaults to 300.
9091
- `autoshow` *bool, optional* - Whether to show the resulting figure automatically. Defaults to True.
92+
- `raw` *bool, optional* - Whether to show labels and ticks on the plot. Defaults to False.
9193
- `title` *str, optional* - Optionally add title to the figure. Defaults to None, which uses the file name as a title.
9294
- `target_name` *str, optional* - The name of the output image. Defaults to None (which assumes that the input filename with the suffix "_spectrogram.png" should be used).
9395
- `overwrite` *bool, optional* - Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to False.
@@ -98,7 +100,7 @@ Renders a figure showing the mel-scaled spectrogram of the video/audio file.
98100

99101
### Audio().tempogram
100102

101-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L348)
103+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L360)
102104

103105
```python
104106
def tempogram(
@@ -141,6 +143,7 @@ def waveform(
141143
mono=False,
142144
dpi=300,
143145
autoshow=True,
146+
raw=False,
144147
title=None,
145148
target_name=None,
146149
overwrite=False,
@@ -154,6 +157,7 @@ Renders a figure showing the waveform of the video/audio file.
154157
- `mono` *bool, optional* - Convert the signal to mono. Defaults to False.
155158
- `dpi` *int, optional* - Image quality of the rendered figure in DPI. Defaults to 300.
156159
- `autoshow` *bool, optional* - Whether to show the resulting figure automatically. Defaults to True.
160+
- `raw` *bool, optional* - Whether to show labels and ticks on the plot. Defaults to False.
157161
- `title` *str, optional* - Optionally add title to the figure. Defaults to None, which uses the file name as a title. Defaults to None.
158162
- `target_name` *str, optional* - The name of the output image. Defaults to None (which assumes that the input filename with the suffix "_waveform.png" should be used).
159163
- `overwrite` *bool, optional* - Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to False.
@@ -164,7 +168,7 @@ Renders a figure showing the waveform of the video/audio file.
164168

165169
## mg_audio_descriptors
166170

167-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L629)
171+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L654)
168172

169173
```python
170174
def mg_audio_descriptors(
@@ -202,7 +206,7 @@ Renders a figure of plots showing spectral/loudness descriptors, including RMS e
202206

203207
## mg_audio_spectrogram
204208

205-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L518)
209+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L536)
206210

207211
```python
208212
def mg_audio_spectrogram(
@@ -213,6 +217,7 @@ def mg_audio_spectrogram(
213217
power=2,
214218
dpi=300,
215219
autoshow=True,
220+
raw=False,
216221
title=None,
217222
target_name=None,
218223
overwrite=False,
@@ -230,6 +235,7 @@ Renders a figure showing the mel-scaled spectrogram of the video/audio file.
230235
- `power` *float, optional* - The steepness of the curve for the color mapping. Defaults to 2.
231236
- `dpi` *int, optional* - Image quality of the rendered figure in DPI. Defaults to 300.
232237
- `autoshow` *bool, optional* - Whether to show the resulting figure automatically. Defaults to True.
238+
- `raw` *bool, optional* - Whether to show labels and ticks on the plot. Defaults to False.
233239
- `title` *str, optional* - Optionally add title to the figure. Defaults to None, which uses the file name as a title.
234240
- `target_name` *str, optional* - The name of the output image. Defaults to None (which assumes that the input filename with the suffix "_spectrogram.png" should be used).
235241
- `overwrite` *bool, optional* - Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to False.
@@ -240,7 +246,7 @@ Renders a figure showing the mel-scaled spectrogram of the video/audio file.
240246

241247
## mg_audio_tempogram
242248

243-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L773)
249+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L798)
244250

245251
```python
246252
def mg_audio_tempogram(
@@ -278,14 +284,15 @@ Renders a figure with a plots of onset strength and tempogram of the video/audio
278284

279285
## mg_audio_waveform
280286

281-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L441)
287+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_audio.py#L453)
282288

283289
```python
284290
def mg_audio_waveform(
285291
filename=None,
286292
mono=False,
287293
dpi=300,
288294
autoshow=True,
295+
raw=False,
289296
title=None,
290297
target_name=None,
291298
overwrite=False,
@@ -300,6 +307,7 @@ Renders a figure showing the waveform of the video/audio file.
300307
- `mono` *bool, optional* - Convert the signal to mono. Defaults to False.
301308
- `dpi` *int, optional* - Image quality of the rendered figure in DPI. Defaults to 300.
302309
- `autoshow` *bool, optional* - Whether to show the resulting figure automatically. Defaults to True.
310+
- `raw` *bool, optional* - Whether to show labels and ticks on the plot. Defaults to False.
303311
- `title` *str, optional* - Optionally add title to the figure. Defaults to None, which uses the file name as a title. Defaults to None.
304312
- `target_name` *str, optional* - The name of the output image. Defaults to None (which assumes that the input filename with the suffix "_waveform.png" should be used).
305313
- `overwrite` *bool, optional* - Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to False.

docs/musicalgestures/_blurfaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Credits: `centerface.onnx` (original) and `centerface.py` are based on https://g
3939
- `mask_scale` *float, optional* - Scale factor for face masks, to make sure that the masks cover the complete face. Defaults to 1.0.
4040
- `ellipse` *bool, optional* - Mask faces with blurred ellipses. Defaults to True.
4141
- `draw_scores` *bool, optional* - Draw detection faceness scores onto outputs (a score between 0 and 1 that roughly corresponds to the detector's confidence that something is a face). Defaults to False.
42-
- `save_data` *bool, optional* - Whether we save the scaled coordinates of the face mask (x1, y1, x2, y2) for each frame to a file. Defaults to True
42+
- `save_data` *bool, optional* - Whether to save the scaled coordinates of the face mask (time, x1, y1, x2, y2) for each frame to a file. Defaults to True.
4343
- `data_format` *str, optional* - Specifies format of blur_faces-data. Accepted values are 'csv', 'tsv' and 'txt'. For multiple output formats, use list, eg. ['csv', 'txt']. Defaults to 'csv'.
4444
- `color` *tuple, optional* - Customized color of the rectangle boxes. Defaults to black (0, 0, 0).
4545
- `target_name` *str, optional* - Target output name for the directogram. Defaults to None (which assumes that the input filename with the suffix "_blurred" should be used).

docs/musicalgestures/_motionvideo.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## mg_motion
1515

16-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L267)
16+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L272)
1717

1818
```python
1919
def mg_motion(
@@ -26,6 +26,7 @@ def mg_motion(
2626
inverted_motiongram=False,
2727
unit='seconds',
2828
equalize_motiongram=True,
29+
audio_descriptors=False,
2930
save_plot=True,
3031
plot_title=None,
3132
save_data=True,
@@ -75,7 +76,7 @@ centroid of motion for each frame with timecodes in milliseconds.
7576

7677
## mg_motiondata
7778

78-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L87)
79+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L90)
7980

8081
```python
8182
def mg_motiondata(
@@ -108,7 +109,7 @@ Shortcut for [mg_motion](#mg_motion) to only render motion data.
108109

109110
## mg_motiongrams
110111

111-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L14)
112+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L17)
112113

113114
```python
114115
def mg_motiongrams(
@@ -147,7 +148,7 @@ Shortcut for [mg_motion](#mg_motion) to only render motiongrams.
147148

148149
## mg_motionplots
149150

150-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L156)
151+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L159)
151152

152153
```python
153154
def mg_motionplots(
@@ -156,6 +157,7 @@ def mg_motionplots(
156157
thresh=0.05,
157158
blur='None',
158159
kernel_size=5,
160+
audio_descriptors=False,
159161
unit='seconds',
160162
title=None,
161163
target_name=None,
@@ -182,7 +184,7 @@ Shortcut for [mg_motion](#mg_motion) to only render motion plots.
182184

183185
## mg_motionvideo
184186

185-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L207)
187+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L212)
186188

187189
```python
188190
def mg_motionvideo(
@@ -217,7 +219,7 @@ Shortcut to only render the motion video. Uses musicalgestures._utils.motionvide
217219

218220
## plot_motion_metrics
219221

220-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L563)
222+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L573)
221223

222224
```python
223225
def plot_motion_metrics(
@@ -226,6 +228,7 @@ def plot_motion_metrics(
226228
aom,
227229
com,
228230
qom,
231+
audio_descriptors,
229232
width,
230233
height,
231234
unit,
@@ -239,7 +242,7 @@ Helper function to plot the centroid and quantity of motion using matplotlib.
239242

240243
## save_txt
241244

242-
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L620)
245+
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo.py#L675)
243246

244247
```python
245248
def save_txt(

0 commit comments

Comments
 (0)