MuseScore  3.4
Music composition and notation
Static Public Member Functions | List of all members
Ms::MxmlSupport Class Reference

#include <musicxmlsupport.h>

Static Public Member Functions

static int stringToInt (const QString &s, bool *ok)
 Convert a string in s into an int. More...
 
static Fraction durationAsFraction (const int divisions, const QDomElement e)
 Return duration specified in the element e as Fraction. More...
 
static Fraction noteTypeToFraction (QString type)
 Convert MusicXML note type to fraction. More...
 
static Fraction calculateFraction (QString type, int dots, int normalNotes, int actualNotes)
 Convert note type, number of dots and actual and normal notes into a duration. More...
 

Member Function Documentation

◆ calculateFraction()

Fraction Ms::MxmlSupport::calculateFraction ( QString  type,
int  dots,
int  normalNotes,
int  actualNotes 
)
static

Convert note type, number of dots and actual and normal notes into a duration.

◆ durationAsFraction()

Fraction Ms::MxmlSupport::durationAsFraction ( const int  divisions,
const QDomElement  e 
)
static

Return duration specified in the element e as Fraction.

Caller must ensure divisions is valid.

◆ noteTypeToFraction()

Fraction Ms::MxmlSupport::noteTypeToFraction ( QString  type)
static

Convert MusicXML note type to fraction.

◆ stringToInt()

int Ms::MxmlSupport::stringToInt ( const QString &  s,
bool *  ok 
)
static

Convert a string in s into an int.

Set *ok to true iff conversion was successful. s may end with ".0", as is generated by Audiveris 3.2 and up, in elements <divisions>, <duration>, <alter> and <sound> attributes dynamics and tempo. In case of error val return a default value of 0. Note that non-integer values cannot be handled by mscore.


The documentation for this class was generated from the following files: