Skip to main content

GitHub PyPI GitHub Release Date GitHub repo size

ms3 - Parsing MuseScore 3 and 4

Welcome to ms3, a Python library for parsing MuseScore files.

Statement of need

Here comes a list of functionalities to help you decide if this library could be useful for you.

  • parses MuseScore 3 and 4 files, dispensing with lossy conversion to musicXML. The file formats in question are

    • uncompressed *.mscx files,

    • compressed *.mscz files,

  • extracts and processes the information contained in one or many scores in the form of DataFrames:

    • notes (start, duration, pitch etc.) and/or rests,

    • measures (time signature, lengths, repeat structure etc.)

    • labels, such as

      • guitar/Jazz chord labels

      • arbitrary annotation labels

      • expanded harmony labels following the DCML annotation standard

      • cadences (part of the same annotation syntax)

      • form_labels (annotation standard currently in press)

    • chords, that is, onset positions that have musical markup attached, e.g. dynamics, lyrics, slurs, 8va signs…

    • metadata from the respective fields, but also score statistics, such as length, number of notes, etc.

  • stores the extracted information in a uniform and interoperable tabular format (*.tsv)

  • writes information from tabular *.tsv files into MuseScore files, especially

    • chord and annotation labels

    • metadata

    • header information (title, subtitle, etc.)

    • note coloring

  • uses a locally installed or standalone MuseScore executable for

    • batch-converting files to any output format supported by MuseScore (mscz, mscx, mp3, midi, pdf etc.)

    • on-the-fly converting any file that MuseScore can read (including MuseScore 2, cap, capx, midi, and musicxml) to parse it

  • offers its functionality via the convenient ms3 commandline interface.

View the full documentation here.

For a demo video (using an old, pre-1.0.0 version) on YouTube, click here

Installation

ms3 requires Python >= 3.10 (type python3 --version to check). Once you have switched to a virtual environment that has Python 3.10 installed you can pip-install the library via one of the two commands:

python3 -m pip install ms3
pip install ms3

If successful, the installation will make the ms3 commands available in your PATH (try by typing ms3).

Quick demo

Parsing a single score

import ms3
score = ms3.Score('musescore_file.mscz')

Parsing a corpus

import ms3
corpus = ms3.Corpus('score_directory')
corpus.parse()

Parsing several corpora

import ms3
corpora = ms3.Parse('my_research_corpora')
corpora.parse()

Making Changes & Contributing

This project uses pre-commit to ensure code quality. If you are a developer, please make sure to install it before making any changes:

cd ms3
pip install -e ".[dev]" # includes "pip install pre-commit"
pre-commit install

Acknowledgements

Development of this software tool was supported by the Swiss National Science Foundation within the project “Distant Listening – The Development of Harmony over Three Centuries (1700–2000)” (Grant no. 182811). This project is being conducted at the Latour Chair in Digital and Cognitive Musicology, generously funded by Mr. Claude Latour.

Project generated with PyScaffold

Metadata

Release files for ms3 2.6.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ms3 2.6.5
File Size Uploaded
ms3-2.6.5.tar.gz 11.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ms3 2.6.5
File Interpreter ABI Platform
ms3-2.6.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 MB

Release files / ms3-2.6.5.tar.gz

Download URL ms3-2.6.5.tar.gz
Size 11.8 MB
Tags Source
SHA-256 checksum
How to use checksums
43803f2f58e523e814b8f5ae4fdcc0a9263c620640c55af68ef7dde280630259
BLAKE2b-256 checksum
How to use checksums
2987130fca82d7f9ca0fef2ae4e9a65b8524bdc392c324cae93932ff507c9fbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / ms3-2.6.5-py3-none-any.whl

Download URL ms3-2.6.5-py3-none-any.whl
Size 423.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eeeed6797290a6976db542b2a5808ad016d37f49e6d2f691d0ad52085a6ed46
BLAKE2b-256 checksum
How to use checksums
93df0d1c607282fcf366df0056cb815714b96e52a3c78d853d37983e0fadc476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

2.6.5 This release

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.12

2 release files

1.2.11

2 release files

1.2.10

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page