Skip to content

Commit

Permalink
Merge pull request #3695 from rettinghaus/develop-libmei
Browse files Browse the repository at this point in the history
Updates to libmei
  • Loading branch information
ahankinson committed Jun 14, 2024
2 parents d430ee0 + b3e229a commit ab7a0b9
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 130 deletions.
15 changes: 8 additions & 7 deletions libmei/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ This is a modified version that is used for generating C++ code for Verovio.
2. each attribute has a C++ type deduced from the MEI schema or given in a separated datatypes configuration file,
3. it uses the MEI page-based customization by default.


License
-------

LibMEI is released under the MIT license.

Compilation & Usage
Expand All @@ -32,14 +32,15 @@ This allows you to run Python with all the necessary dependencies for running th

To generate the code, activate the poetry environment and, from the `libmei` directory, run:

$> python3 tools/parseschema2.py ./mei/develop/mei-verovio_compiled.odd
$> python3 tools/parseschema2.py ./mei/mei-verovio_compiled.odd

Where the positional argument points to an ODD file for which you wish to generate code.

Other options are:

* `-c`: A path to a YML config file. If not specified this will look for a file called "config.yml"
in your current working directory. (provided by default, but you can make your own if you
have custom requirements.)
in your current working directory. (provided by default, but you can make your own if you
have custom requirements.)

Config file
-----------
Expand All @@ -53,16 +54,16 @@ addons_dir: "../addons" # path to an optional addons directory
elements: true|false # whether code for element handling should be generated
namespace: "vrv" # the namespace to use in generated CPP code
datatypes: "./datatypes.yml" # path to a datatypes mapping file
# path to an MEI basic ODD file. If not provided then the meibasic.h file will not
# path to an MEI Basic ODD file. If not provided then the meibasic.h file will not
# be written. (This contains a map of the elements and attributes allowed in MEI Basic
# which is then used by Verovio to ensure the "full" MEI output is stripped when the user
# requests "Basic" output.)
basic_odd: "../mei/develop/mei-basic_compiled.odd"
```

For the `basic_odd` option, if provided the generator will generate a map of notes and allowed
attributes within the MEI basic ODD file and write it to a file called `meibasic.h`.
attributes within the MEI Basic ODD file and write it to a file called `meibasic.h`.

If the `addons_dir` is provided, the files in that directory will be copied to the output directory.
The files will also have the namespace in the addons replaced with the value provided in the
`namespace` option.
`namespace` option.
Loading

0 comments on commit ab7a0b9

Please sign in to comment.