Skip to content

Musicalgestures

API reference for the musicalgestures package. Each page below is rendered directly from the source docstrings by mkdocstrings, so the reference always matches the code on the current branch.

The main entry points are MgVideo, MgAudio, Mg360Video, and MgList; most other modules provide the functions these classes call. See also the Complete Reference for the same list with one entry per module.

Modules

Examples

The bundled example videos are exposed through the Examples class:

Paths to the sample media shipped with the package, as musicalgestures.examples.

examples.dance and examples.pianist are the two short videos the documentation and the tests use, and examples.notebook is the tutorial notebook. They are absolute paths resolved from the installed package, so they work from any working directory.

Source code in musicalgestures/__init__.py
39
40
41
42
43
44
def __init__(self):
    module_path = os.path.realpath(os.path.dirname(__file__)).replace("\\", "/")
    # module_path = os.path.abspath(os.path.dirname(__file__))
    self.dance = module_path + "/examples/dancer.avi"
    self.pianist = module_path + "/examples/pianist.avi"
    self.notebook = module_path + "/MusicalGesturesToolbox.ipynb"