Lomse library. API documentation  0.30.0
MusicXmlOptions Class Reference

#include <lomse_import_options.h>

Detailed Description

Class MusicXmlOptions stores and manages the settings for dealing and fixing malformed imported files. The only instance of this class is stored in the LibraryScope object. You can access it and modify its settings either from LomseDoorway object or from the LibraryScope object:

LomseDoorway* pLomse = ...
MusicXmlOptions* opt = pLomse->get_musicxml_options();
LibraryScope& lomse = ...
MusicXmlOptions* opt = lomse.get_musicxml_options();

Example of use:

LomseDoorway* pLomse = ...
MusicXmlOptions* opt = pLomse->get_musicxml_options();
opt->fix_beams(true);
Presenter* pPresenter = pLomse->open_document(k_view_vertical_book,
"my_score.xml");
...
opt->fix_beams(false);
Presenter* pPresenter = pLomse->open_document(k_view_vertical_book,
"other_score.xml");

Settings description and default values for Lomse library are described in the following table:

Setting Default value Description
fix_beams true When true, if beam information is not congruent with note type, the importer will fix the beam.
use_default_clefs true When true, if an score part has pitched notes but the clef is missing, the importer will assume a G or an F4 clef, depending on notes pitch range.
See also
fix_beams(), use_default_clefs()

Public Member Functions

bool fix_beams ()
 
bool use_default_clefs ()
 
void fix_beams (bool value)
 
void use_default_clefs (bool value)
 

Friends

class LibraryScope
 

Member Function Documentation

◆ fix_beams() [1/2]

bool MusicXmlOptions::fix_beams ( )
inline

Returns current setting for the 'fix_beams' option.

◆ fix_beams() [2/2]

void MusicXmlOptions::fix_beams ( bool  value)
inline

Sets the value for 'fix_beams' option. When true, if beam information is not congruent with note type, the importer will fix the beam.

◆ use_default_clefs() [1/2]

bool MusicXmlOptions::use_default_clefs ( )
inline

Returns current setting for the 'use_default_clefs' option.

◆ use_default_clefs() [2/2]

void MusicXmlOptions::use_default_clefs ( bool  value)
inline

Sets the value for 'use_default_clefs' option. When true, if an score part has pitched notes but the clef is missing, the importer will assume a G or an F4 clef, depending on notes pitch range.