MgList¶
Auto-generated documentation for musicalgestures._mglist module.
- Mgt-python / Modules / Musicalgestures / MgList
MgList¶
Class for handling lists of MgImage, MgFigure and MgList objects in the Musical Gestures Toolbox.
Attributes¶
- *objectlist : objects and/or list(s) of objects
MgObjects and/or MgImages to include in the list.
MgList().__add__¶
Implements +
.
Arguments¶
other
MgImage/MgFigure/MgList - The object(s) to add to the MgList.
Returns¶
MgList
- The incremented MgList.
MgList().__delitem__¶
Implements deleting elements given an index from the MgList.
Arguments¶
key
int - The index of the element to delete.
MgList().__getitem__¶
Implements getting elements given an index from the MgList.
Arguments¶
key
int - The index of the element to retrieve.
Returns¶
MgImage/MgFigure/MgList
- The element atkey
.
MgList().__iadd__¶
Implements +=
.
Arguments¶
other
MgImage/MgFigure/MgList - The object(s) to add to the MgList.
Returns¶
MgList
- The incremented MgList.
MgList().__iter__¶
Implements iter()
.
Returns¶
iterator
- The iterator ofself.objectlist
.
MgList().__len__¶
Implements len()
.
Returns¶
int
- The length of the MgList.
MgList().__setitem__¶
Implements setting elements given an index from the MgList.
Arguments¶
key
int - The index of the element to change.value
MgImage/MgFigure/MgList - The element to place atkey
.
MgList().as_figure¶
Creates a time-aligned figure from all the elements in the MgList.
Arguments¶
dpi
int, optional - Image quality of the rendered figure in DPI. Defaults to 300.autoshow
bool, optional - Whether to show the resulting figure automatically. Defaults to True.title
str, optional - Optionally add a title to the figure. Defaults to None (no title).export_png
bool, optional - Whether to export a png image of the resulting figure automatically. Defaults to True.
Returns¶
MgFigure
- The MgFigure with all the elements from the MgList as layers.
MgList().show¶
def show(
filename=None,
key=None,
mode='windowed',
window_width=640,
window_height=480,
window_title=None,
):
Iterates all objects in the MgList and calls mg_show()
on them.