Skip to content

mlang/xsdcxx-musicxml

Repository files navigation

XSDCXX based MusicXML bindings for C++

xsdcxx-musicxml is a MusicXML binding for C++11 based on xsdcxx. The bulk of the source code is automatically generated from the MusicXML W3C XML Schema Definition (XSD). Parsing, manipulation, and serialization of MusicXML documents is supported.

This library handles both, partwise and timewise MusicXML documents in a uniform way. Client code is free to work with either of the two object models, and MusicXML documents are automatically converted to the requested format during parsing.

or

Alternatively, if you want to save to a different format as you have worked with, you can use the musicxml::convert function to flip formats:

Both, musicxml::score_partwise::part_type::measure_type and musicxml::score_timewise::measure_type::part_type use boost::variant to store the different allowed element types in a heterogeneous container. This container can be accessed and set with the music_data() accessors, and its type is available as member type music_data_sequence.

IDREF attributes are configured to point directly to the referenced element type(s). Some IDREF's are optional though, so be sure to not dereference those unconditionally.

Building

CMake and XSDCXX are required to build this library.

See generate.cpp, partiwse.cpp and timewise.cpp for very simple usage examples.

To use this library in your project,

and link with the xsdcxx-musicxml library. If you prefer static linking, use xsdcxx-musicxml-static.

You can also use the CMake ADD_SUBDIRECTORY command to directly include this library as a subproject in your CMake based project.

Parent project

This library is being developed as a sub-project of BMC, the Braille Music Compiler.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published