MGT-python
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.
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:
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
Related toolboxes
These come out of the same lab, as separate packages with separate release cycles. They are built to be used together and share several implementations, so a measure computed in one agrees with the same measure computed in another.
- micromotion—human micromotion: quantity of motion from
optical markers, accelerometers, respiration belts and force plates. This package re-exports its
corrected
group_qomand requires it - ambiscape—soundscapes: the sonic ambience of a place
- musiscape—music collections: comparing many tracks and albums held as audio files in folders
The boundary is the input rather than the question: this package starts from a VIDEO file, and the other three from motion series, a room recording and a music collection.
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:
- Laczkó, B., & Jensenius, A. R. (2021). Reflections on the Development of the Musical Gestures Toolbox for Python. Proceedings of the Nordic Sound and Music Computing Conference, Copenhagen.
License
This toolbox is released under the GNU General Public License 3.0.
Citing
Cite the CONCEPT DOI, which always resolves to the newest version:
Jensenius, A. R., Laczkó, B., Poutaraud, J., Widmer, M., & Furmyr, F. (2026). Musical Gestures Toolbox for Python (Version 1.11.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.21949007
Where the exact behaviour matters, cite the version you ran instead. Version 1.11.1 is https://doi.org/10.5281/zenodo.21949008.
CITATION.cff in this repository carries the same information in machine-readable form.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file musicalgestures-1.11.2.tar.gz.
File metadata
- Download URL: musicalgestures-1.11.2.tar.gz
- Upload date:
- Size: 32.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6347e4fa2b77ac714ebb5831a8c979bf7370d1b352fa3016f302118d870cee4b
|
|
| MD5 |
905e288e8848c91a66c69dfc733d486b
|
|
| BLAKE2b-256 |
3ed81054d01f2869a7a6219f6ba0b9458513413abb72f2cb2d93c2eb28510eef
|
Provenance
The following attestation bundles were made for musicalgestures-1.11.2.tar.gz:
Publisher:
pypi-publish.yml on fourMs/MGT-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musicalgestures-1.11.2.tar.gz -
Subject digest:
6347e4fa2b77ac714ebb5831a8c979bf7370d1b352fa3016f302118d870cee4b - Sigstore transparency entry: 2487619707
- Sigstore integration time:
-
Permalink:
fourMs/MGT-python@04a5da72624e7e9fce23d0b2532428e7b1d27a53 -
Branch / Tag:
refs/tags/v1.11.2 - Owner: https://github.com/fourMs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@04a5da72624e7e9fce23d0b2532428e7b1d27a53 -
Trigger Event:
release
-
Statement type:
File details
Details for the file musicalgestures-1.11.2-py3-none-any.whl.
File metadata
- Download URL: musicalgestures-1.11.2-py3-none-any.whl
- Upload date:
- Size: 32.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96c1fb641ee3a144aeb6d7868f27a4da095b6de345dfb38c9f0fbb06bb1aa932
|
|
| MD5 |
7554c75722eb8b07e217b09c68ec7382
|
|
| BLAKE2b-256 |
c3a5c7fb0f3c674d2ebd42425a1adb777f5ff15f0bf065b5fbb92ff51fa0619b
|
Provenance
The following attestation bundles were made for musicalgestures-1.11.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on fourMs/MGT-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musicalgestures-1.11.2-py3-none-any.whl -
Subject digest:
96c1fb641ee3a144aeb6d7868f27a4da095b6de345dfb38c9f0fbb06bb1aa932 - Sigstore transparency entry: 2487619742
- Sigstore integration time:
-
Permalink:
fourMs/MGT-python@04a5da72624e7e9fce23d0b2532428e7b1d27a53 -
Branch / Tag:
refs/tags/v1.11.2 - Owner: https://github.com/fourMs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@04a5da72624e7e9fce23d0b2532428e7b1d27a53 -
Trigger Event:
release
-
Statement type: