Document object model for the EnigmaXml format in Finale musx files. It is compatible with the C++17 standard.
This project is not affiliated with or endorsed by Finale or its parent company.
- It is an independent open-source library designed to help users access and convert their own data in the absence of Finale, which has been discontinued.
- It does not contain any Finale source code.
- It is not capable of writing Finale files, only reading them.
- It has been separately developed by analyzing the contents of EnigmaXml files and other publically available resources, such as the PDK Framework for Finale and Jari Williamsson’s original site.
- Nothing in this repository circumvents digital copy protection on the Finale application.
Include the top header in your source file.
#include "musx/musx.h"
Add the libary to your project with FetchContent
:
include(FetchContent)
FetchContent_Declare(
musx
GIT_REPOSITORY https://github.com/rpatters1/musx-object-model
GIT_TAG main # Replace with the desired commit hash, tag, or branch
)
FetchContent_MakeAvailable(musx)
# Also add somewhere:
target_link_libraries(project PRIVATE musx) # replace "project" with your actual project name
You will also need an xml parser. This repository provides implementations for tinyxml, rapidxml, and pugixml. If you wish to use one of these, define one and/or the other in your project's CMakeLists.txt file:
set(MUSX_USE_TINYXML2 ON CACHE BOOL "Disable tinyxml2 parsing classes" FORCE)
set(MUSX_USE_RAPIDXML ON CACHE BOOL "Enable rapidxml parsing classes" FORCE)
set(MUSX_USE_PUGIXML ON CACHE BOOL "Enable pugixml parsing classes" FORCE)
You then must add the dependency for the chosen parser(s) to your CMakeLists.txt.
For pugixml:
include(FetchContent)
# Fetch pugixml
FetchContent_Declare(
pugixml
URL https://github.com/zeux/pugixml/releases/download/v1.14/pugixml-1.14.tar.gz
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(pugixml)
The process is similar for tinyxml2
.
For rapidxml, you will need to download the original version from SourceForge. There are more recent forks of rapidxml available, but they may not work with C++17 or the implementation here. Download the zip file and unzip it to a location like .third_party/rapidxml/
. Then you can add it to your CMakeLists.txt file with:
# Add the include path for rapidxml
target_include_directories(your-project PRIVATE "${CMAKE_SOURCE_DIR}/third_party/rapidxml")
You can include them all if you wish to benchmark one against the other. If you prefer a different xml parser, you can use it by defining an implementation of musx::xml:: IXmlAttribute
, musx::xml::IXmlElement
, and musx::xml::IXmlDocument
for your parser.
To create a document with a particular parser, use its IXmlDocument
class as the template to create the document.
Examples:
using namespace musx::factory;
using namespace musx::xml;
auto docTiny = DocumentFactory::create<tinyxml2::Document>(enigmaXmlBuffer); // to use tinyxml2;
auto docRapid = DocumentFactory::create<rapidxml::Document>(enigmaXmlBuffer); // to use rapidxml;
auto docOther = DocumentFactory::create<OtherXmlDocument>(enigmaXmlBuffer); // to use a different xml parser
You need cmake
to build and run the tests. From the directory containing this repository, configure the build directory:
cmake -S . build
To build the tests:
cmake --build build
To run the tests:
ctest --test-dir build
You need Doxygen to create the documentation. You can download and run the installer from the Doxygen site. Package managers can also install it. Once you have Doxygen you can build the documentation as follows.
cd docs
doxygen Doxyfile
You will then find an html website in ./docs/generated/html
. Use a web browser to view the site from your hard drive. Opening any of the .html
pages gives you access to the entire site.