Skip to content

Repository files navigation

MGT-python

PyPi version Python GitHub license CI Documentation

The Musical Gestures Toolbox for Python (musicalgestures) is a collection of tools for visualising and analysing motion in video recordings, together with the sound that accompanies them. It was developed for research on music-related body motion, but it works on any video or audio file.

MGT python

Installation

pip install musicalgestures

You also need FFmpeg on your system; everything else installs automatically. The installation guide covers optional extras such as pose estimation.

Quickstart

import musicalgestures as mg

v = mg.MgVideo(mg.examples.dance)   # or your own file: mg.MgVideo('dance.mp4')
v.motiongrams().show()

This draws motiongrams: images that trace where in the frame movement happens over time, like a spectrogram for the body. Analysis methods return result objects, and .show() displays them.

You can also try the toolbox in the browser, with no installation:

Open In Colab

Documentation

  • Documentation site — installation, quickstart, user guide, and full API reference
  • Wiki — worked examples and discussion of the methods
  • Contributing — how to report issues and submit changes

Credits

This toolbox builds on the Musical Gestures Toolbox for Matlab, which again builds on the Musical Gestures Toolbox for Max. Many researchers and research assistants have helped its development over the years, including Balint Laczko, Joachim Poutaraud, Frida Furmyr, Marcus Widmer, and Alexander Refsum Jensenius.

The software is maintained by the fourMs lab at RITMO Centre for Interdisciplinary Studies in Rhythm, Time and Motion, University of Oslo.

If you use this toolbox in your research, please cite:

License

This toolbox is released under the GNU General Public License 3.0.

About

A Python toolbox for video visualisation and analysis

Topics

Resources

Contributing

Stars

56 stars

Watchers

5 watching

Forks

Releases

Used by

Contributors

Languages