Skip to content

Releases: johentsch/ms3

ms3 v2.3.0 can be used as pre-commit hook

19 Oct 18:09
Compare
Choose a tag to compare

What's Changed

  • Adds 'ms3 precommit' and makes the repo usable as a hook by @johentsch in #106
    • The new ms3 precommit command is simply a wrapper around ms3 review that accepts the --files arguments as positional arguments. This is required for the command to be useable as an entry point for a Git pre-commit, which passes the paths of modified or added files as positional arguments. In addition, the command executes git add -A after the review so that all changed files are included.
    • This is to work in the first version of the new, localized, DCML annotation workflow that runs on the annotator's machine before committing, rather than on a GitHub runner after pushing. Things that might be changed in the future:
      • The ms3 precommit command could convert the positional arguments into a regular expression to be passed to -i/--include instead of using the deprecated --files.
      • At some point a mechanism might be needed that makes it possible for the hook to ignore warnings that were already there, i.e., which are not caused/added by the current commit. Currently one would have to remove --fail from the repo's args configuration but that would let all warnings pass and would be besides the point.
    • New method score.mscx.update_metadata() to facilitate (manual) updating of the key-value pairs.
    • Comparison files come with the metadata key compared_against=<commit hash> when the comparison has been performed against a particular git revision.
    • "LATEST_VERSION" is now accepted as argument to git_revision and resolves to the latest version tag (falling back to the current HEAD if the repo has no tags)
  • Extended excerpting functionality by @leobruneau in #105
    • It is now possible to replace head and tail of an excerpt with rests. This does not look pretty but it is an easy way to create audio excerpts starting and ending at the given points in time.
    • It is now possible to set an arbitrary tempo by inserting an invisible metronome mark at the beginning of excerpts.
    • score.mscx.store_phrase_excerpts() makes use of this to omit notes before and after the actual phrase
    • new methods accessible via score.mscx:
      • store_measures()
      • store_within_phrase_excerpts()
      • store_phrase_endings()
      • store_random_excerpts()

Full Changelog: v2.2.2...v2.3.0

ms3 v2.2.2: bugfixes

21 Sep 06:26
Compare
Choose a tag to compare

v2.2.1

04 Sep 09:11
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.2.0...v2.2.1

ms3 v2.2.0 New features, new schemas

02 Sep 10:45
Compare
Choose a tag to compare

What's Changed

  • Changing the instrumentation to "Drumset" by @arinaLozhkina in #84
    • More robust updating of score instrumentation by modifying metadata.tsv and calling ms3 metadata --instrumentation
    • Ensures playback with the correct MIDI instrument
    • Handles a change to Drumset correctly in terms of changing clef, removing key signature, and playback
  • MSCX class API for creating score excerpts by @leobruneau in #91
    • score excerpts can now be stored using score.mscx.store_excerpt()
    • batch excerpt creation via MSCX.store_phrase_excerpts() and MSCX.store_random_excerpts()
  • Improved algorithm for computing mc_offset including bugfix by @johentsch in #95
  • Updated schema mechanism following the first trial by @johentsch in #97
    • quarterbeats_all_endings column now added to all facet dataframes by default
    • schema URLs now use the dedicated DCMLab/frictionless_schemas and the amount of required schemas was reduced drastically
      • no schemas are stored for events anymore
      • rests and notes_and_rests do not include non-sensical empty columns anymore
      • chords is the only remaining facet where the abundance of schemas due to high combinatoriality of column names is (somewhat) justified.
    • Renamed columns:
      • in unfolded dataframes, quarterbeats is now called quarterbeats_playthrough
      • in the chords facet, metronome_visible is now called tempo_visible
  • PyScaffold update

New Contributors

Full Changelog: v2.1.1...v2.2.0

ms3 v2.1.1

29 Aug 18:07
Compare
Choose a tag to compare
  • Message headers in .warnings files now come without trailing --.
  • This version is able to correctly IGNORED_WARNINGS even if the header ends on a trailing -- (copied from a
    .warnings file generated by an older version of ms3).
  • adds the low-level function ms3.bs4_parser._MSCX_bs4.make_excerpt that returns the new object type
    ms3.bs4_parser.Excerpt. High-level API in preparation (#91).

ms3 v2.1.0: Loads of code cosmetics (and support for pandas 2)

14 Aug 18:54
Compare
Choose a tag to compare

This update includes a few minor bug fixes but some heavy updating of the code internals:

  • pandas>=2.0.0 is now supported
  • the @function_logger decorator has been removed and replaced with a function argument that defaults to the
    module_logger
  • all modules which have seen a commit since the previous tag have been fully linted using pre-commit hooks
  • the filelock problem that made a couple of test fail under Windows since the early days has been resolved (by using
    pytest's tmp_path fixture instad of NamedTemporaryFile).
  • make_ml() (responsible for creating measure tables) was refactored and should be much more legible (and easier
    to adapt and extend in the future)

Full Changelog: v2.0.1...v2.1.0

ms3 v2.0.1

02 Aug 15:45
c8a3f3c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

ms3 v2.0.0

17 Jul 12:19
Compare
Choose a tag to compare

Breaking changes

  • Renamed MultiIndex levels:
    • The column fname has been renamed to piece. This concerns especially metadata.tsv where it is used as index, but also the MultiIndex of concatenated facets such as those output by Parse.get_facet() or ms3 transform.
    • The last (right-most) index level, which used to be called <facet>_i in some cases, is now consistently called i.
  • When extracting TSV files:
    • The possibility to assign custom suffixes to the extracted facets has been replaced by default suffixes separated by a full stop. For example, the notes for the MuseScore file MS3/filename.mscx will be extracted to notes/filename.notes.tsv by default.
    • Every extracted TSV file comes with a JSON descriptor file following the frictionless specification for metadata. This replaces the csv-metadata.json files that were following the CSV on the Web specification.
    • The frictionless schemas used in the JSON descriptor files are stored in the schemas folder of the ms3 package in YAML format. Their filenames are truncated hashes computed from the included column/field names and they are stored in a folder pertaining to the facet in question. This comes with the advantage that schemas do not have to be written out in every descriptor: Instead, the schema field contains the URL of the schema file, allowing to update the schema specifications at a later point, e.g. with added or more elaborate descriptions.
    • Validation errors are written into .errors files stored next to the resource descriptor in question.
  • The command ms3 transform, by default, outputs the concatenated facets as a single ZIP file that comes with a frictionless DataPackage descriptor (for the parameters added to the command, see below). The concatenated files are now named <corpus_name>.<facet>.tsv (previously concatenated_<facet>.tsv).

New features

  • It is now possible to batch-edit the instrumentation in many scores at once by changing the relevant column(s) in metadata.tsv and calling ms3 metadata --instrumentation.
  • Since ms3 transform now outputs zipped frictionless DataPackages by default (meaning that all concatenated facets are described in the same package descriptor JSON file), it comes with additional parameters:
    • --unzipped to output the package as uncompressed TSV files rather than as single ZIP file.
    • --resources to create a frictionless resource descriptor per concatenated facet instead of a package descriptor.
    • --safe to prevent overwriting existing files.
  • The ms3 extract command now has a --corpuswise option allowing to parse and extract one corpus after the other, avoiding the need to parse all scores at once and keep them in memory before beginning the extraction.
  • The parser throws a warning if a score does not have a metronome mark at the beginning (which can be hidden). This is to encourage the inclusion of information on the basic beat unit (in 6/8 meter, e.g., the metronome unit is typically a dotted quarter) and pace to every score for better comparability.

Bugfixes

  • For the IGNORED_WARNINGS file.
  • For the --threshold argument of the ms3 review command.
  • Writing and reading the volta_mcs column of metadata.tsv.
  • #60, #63, #78, #79

Internal changes

  • utils.py has been turned into a Python package containing the mocules constants, functions, and frictionless.
  • Not using the frac alias for fractions.Fraction anymore.
  • The version number is not manually stored as a constant, instead it is automatically written into _version.py upon initialization.

Other

This version contains the final version of the paper A parser for MuseScore 3 files and data factory for annotated music corpora for publication in the Journal of Open Source Software (JOSS).

ms3 v1.2.12

17 Jul 10:34
Compare
Choose a tag to compare

This last version of ms3 1.x uses the _version.py file introduced in 8f40b16

ms3 v1.2.11

13 Jul 17:53
Compare
Choose a tag to compare
  • stops writing the version of ms3 into the .warnings files to avoid merge conflicts
  • bugfixes for
    • handling IGNORED_WARNINGS
    • ms3 review command
    • overview table written to README