Lomse library. API documentation
0.30.0
|
Lomse export documents as strings in MusicXML format or LDP format. But currently Lomse does not include facilities for writing files (although this is planned for future). Therefore, for now it is responsibility of your application to save in a file the source code string provided by Lomse.
Exporting a document is a simple operation. It is just instantiating the exporter object for the required format (MxlExporter for MusicXML format or LdpExporter for LDP format), specify the desired generation options and request to generate the source code. Example:
Plain text MusicXML files can be very large and, therefore, MusicXML files are normally exported in compressed format, which reduces file sizes to roughly the same size as the corresponding MIDI files. The format uses zip compression and the ".mxl" file extension. If your application would like to export in compressed format, this will have to be done in your application. See https://www.w3.org/2021/06/musicxml40/tutorial/compressed-mxl-files/
For now, Lomse does not include facilities for writing files and generating the MusicXML compressed format, but this is planned for future.
Exporting in LDP format is done in the same way, but using the LdpExporter object. Example: