Releases: johentsch/ms3
Releases · johentsch/ms3
ms3 v2.3.0 can be used as pre-commit hook
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 aroundms3 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 executesgit 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.
- The
- 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 togit_revision
and resolves to the latest version tag (falling back to the current HEAD if the repo has no tags)
- The new
- 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
Full Changelog: v2.2.1...v2.2.2
v2.2.1
ms3 v2.2.0 New features, new schemas
What's Changed
- Changing the instrumentation to "Drumset" by @arinaLozhkina in #84
- More robust updating of score instrumentation by modifying
metadata.tsv
and callingms3 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
- More robust updating of score instrumentation by modifying
- 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()
andMSCX.store_random_excerpts()
- score excerpts can now be stored using
- 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
andnotes_and_rests
do not include non-sensical empty columns anymorechords
is the only remaining facet where the abundance of schemas due to high combinatoriality of column names is (somewhat) justified.
- no schemas are stored for
- Renamed columns:
- in unfolded dataframes,
quarterbeats
is now calledquarterbeats_playthrough
- in the
chords
facet,metronome_visible
is now calledtempo_visible
- in unfolded dataframes,
- PyScaffold update
- documentation now hosted at https://ms3.readthedocs.io/
- adds
tox
New Contributors
- @leobruneau made their first contribution in #91
Full Changelog: v2.1.1...v2.2.0
ms3 v2.1.1
- 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)
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'stmp_path
fixture instad ofNamedTemporaryFile
). 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
What's Changed
- Allow metronome mark to appear in MC 2 by @johentsch in #86
Full Changelog: v2.0.0...v2.0.1
ms3 v2.0.0
Breaking changes
- Renamed MultiIndex levels:
- The column
fname
has been renamed topiece
. This concerns especiallymetadata.tsv
where it is used as index, but also the MultiIndex of concatenated facets such as those output byParse.get_facet()
orms3 transform
. - The last (right-most) index level, which used to be called
<facet>_i
in some cases, is now consistently calledi
.
- The column
- 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 tonotes/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, theschema
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 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
- 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
(previouslyconcatenated_<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 callingms3 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 thems3 review
command. - Writing and reading the
volta_mcs
column ofmetadata.tsv
. - #60, #63, #78, #79
Internal changes
utils.py
has been turned into a Python package containing the moculesconstants
,functions
, andfrictionless
.- Not using the
frac
alias forfractions.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
This last version of ms3 1.x uses the _version.py
file introduced in 8f40b16
ms3 v1.2.11
- 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