MuseScore  3.4
Music composition and notation
Classes | Enumerations | Functions | Variables
Ms::Meter Namespace Reference

Classes

struct  DivisionInfo
 
struct  DivLengthInfo
 
struct  MaxLevel
 
struct  Node
 

Enumerations

enum  DurationType : char { DurationType::NOTE, DurationType::REST }
 

Functions

ReducedFraction userTimeSigToFraction (MidiOperations::TimeSigNumerator timeSigNumerator, MidiOperations::TimeSigDenominator timeSigDenominator)
 
MidiOperations::TimeSigNumerator fractionNumeratorToUserValue (int n)
 
MidiOperations::TimeSigDenominator fractionDenominatorToUserValue (int z)
 
bool isSimple (const ReducedFraction &barFraction)
 
bool isCompound (const ReducedFraction &barFraction)
 
bool isComplex (const ReducedFraction &barFraction)
 
bool isDuple (const ReducedFraction &barFraction)
 
bool isTriple (const ReducedFraction &barFraction)
 
bool isQuadruple (const ReducedFraction &barFraction)
 
bool isQuintuple (const ReducedFraction &barFraction)
 
bool isSeptuple (const ReducedFraction &barFraction)
 
DivisionInfo metricDivisionsOfBar (const ReducedFraction &barFraction)
 
DivisionInfo metricDivisionsOfTuplet (const MidiTuplet::TupletData &tuplet, int tupletStartLevel)
 
ReducedFraction beatLength (const ReducedFraction &barFraction)
 
std::vector< ReducedFractiondivisionsOfBarForTuplets (const ReducedFraction &barFraction)
 
std::vector< DivisionInfodivisionInfo (const ReducedFraction &barFraction, const std::vector< MidiTuplet::TupletData > &tupletsInBar)
 
int levelOfTick (const ReducedFraction &tick, const std::vector< DivisionInfo > &divsInfo)
 
std::vector< int > metricLevelsOfBar (const ReducedFraction &barFraction, const std::vector< DivisionInfo > &divsInfo, const ReducedFraction &minDuration)
 
Meter::MaxLevel maxLevelBetween (const ReducedFraction &startTickInBar, const ReducedFraction &endTickInBar, const DivisionInfo &divInfo)
 
Meter::MaxLevel findMaxLevelBetween (const ReducedFraction &startTickInBar, const ReducedFraction &endTickInBar, const std::vector< DivisionInfo > &divsInfo)
 
int tupletNumberForDuration (const ReducedFraction &startTick, const ReducedFraction &endTick, const std::vector< MidiTuplet::TupletData > &tupletsInBar)
 
bool isPowerOfTwo (unsigned int x)
 
bool isSimpleNoteDuration (const ReducedFraction &duration)
 
bool isQuarterDuration (const ReducedFraction &ticks)
 
bool is23EndOfBeatInCompoundMeter (const ReducedFraction &startTickInBar, const ReducedFraction &endTickInBar, const ReducedFraction &barFraction)
 
bool is2of3RestInTripleMeter (const ReducedFraction &startTickInBar, const ReducedFraction &endTickInBar, const ReducedFraction &barFraction)
 
ReducedFraction findTupletRatio (const ReducedFraction &startPos, const ReducedFraction &endPos, const std::vector< MidiTuplet::TupletData > &tupletsInBar)
 
QList< std::pair< ReducedFraction, TDuration > > collectDurations (const std::map< ReducedFraction, Node > &nodes, const std::vector< MidiTuplet::TupletData > &tupletsInBar, bool useDots, bool printRestRemains)
 
bool badLevelCondition (int startLevelDiff, int endLevelDiff, int tol)
 
int noteCount (const ReducedFraction &duration, bool useDots)
 
bool isLessNoteCount (const ReducedFraction &t1, const ReducedFraction &t2, const ReducedFraction &t3, bool useDots)
 
void excludeNodes (std::map< ReducedFraction, Node > &nodes, int tol, bool useDots)
 
int adjustEdgeLevelIfTuplet (const Meter::MaxLevel &splitPoint, const std::vector< DivisionInfo > &divInfo)
 
QList< std::pair< ReducedFraction, TDuration > > toDurationList (const ReducedFraction &startTickInBar, const ReducedFraction &endTickInBar, const ReducedFraction &barFraction, const std::vector< MidiTuplet::TupletData > &tupletsInBar, DurationType durationType, bool useDots, bool printRestRemains)
 

Variables

const int TUPLET_BOUNDARY_LEVEL = 10
 

Enumeration Type Documentation

◆ DurationType

enum Ms::Meter::DurationType : char
strong
Enumerator
NOTE 
REST 

Function Documentation

◆ adjustEdgeLevelIfTuplet()

int Ms::Meter::adjustEdgeLevelIfTuplet ( const Meter::MaxLevel splitPoint,
const std::vector< DivisionInfo > &  divInfo 
)

◆ badLevelCondition()

bool Ms::Meter::badLevelCondition ( int  startLevelDiff,
int  endLevelDiff,
int  tol 
)

◆ beatLength()

ReducedFraction Ms::Meter::beatLength ( const ReducedFraction barFraction)

◆ collectDurations()

QList<std::pair<ReducedFraction, TDuration> > Ms::Meter::collectDurations ( const std::map< ReducedFraction, Node > &  nodes,
const std::vector< MidiTuplet::TupletData > &  tupletsInBar,
bool  useDots,
bool  printRestRemains 
)

◆ divisionInfo()

std::vector< DivisionInfo > Ms::Meter::divisionInfo ( const ReducedFraction barFraction,
const std::vector< MidiTuplet::TupletData > &  tupletsInBar 
)

◆ divisionsOfBarForTuplets()

std::vector< ReducedFraction > Ms::Meter::divisionsOfBarForTuplets ( const ReducedFraction barFraction)

◆ excludeNodes()

void Ms::Meter::excludeNodes ( std::map< ReducedFraction, Node > &  nodes,
int  tol,
bool  useDots 
)

◆ findMaxLevelBetween()

Meter::MaxLevel Ms::Meter::findMaxLevelBetween ( const ReducedFraction startTickInBar,
const ReducedFraction endTickInBar,
const std::vector< DivisionInfo > &  divsInfo 
)

◆ findTupletRatio()

ReducedFraction Ms::Meter::findTupletRatio ( const ReducedFraction startPos,
const ReducedFraction endPos,
const std::vector< MidiTuplet::TupletData > &  tupletsInBar 
)

◆ fractionDenominatorToUserValue()

MidiOperations::TimeSigDenominator Ms::Meter::fractionDenominatorToUserValue ( int  z)

◆ fractionNumeratorToUserValue()

MidiOperations::TimeSigNumerator Ms::Meter::fractionNumeratorToUserValue ( int  n)

◆ is23EndOfBeatInCompoundMeter()

bool Ms::Meter::is23EndOfBeatInCompoundMeter ( const ReducedFraction startTickInBar,
const ReducedFraction endTickInBar,
const ReducedFraction barFraction 
)

◆ is2of3RestInTripleMeter()

bool Ms::Meter::is2of3RestInTripleMeter ( const ReducedFraction startTickInBar,
const ReducedFraction endTickInBar,
const ReducedFraction barFraction 
)

◆ isComplex()

bool Ms::Meter::isComplex ( const ReducedFraction barFraction)

◆ isCompound()

bool Ms::Meter::isCompound ( const ReducedFraction barFraction)

◆ isDuple()

bool Ms::Meter::isDuple ( const ReducedFraction barFraction)

◆ isLessNoteCount()

bool Ms::Meter::isLessNoteCount ( const ReducedFraction t1,
const ReducedFraction t2,
const ReducedFraction t3,
bool  useDots 
)

◆ isPowerOfTwo()

bool Ms::Meter::isPowerOfTwo ( unsigned int  x)

◆ isQuadruple()

bool Ms::Meter::isQuadruple ( const ReducedFraction barFraction)

◆ isQuarterDuration()

bool Ms::Meter::isQuarterDuration ( const ReducedFraction ticks)

◆ isQuintuple()

bool Ms::Meter::isQuintuple ( const ReducedFraction barFraction)

◆ isSeptuple()

bool Ms::Meter::isSeptuple ( const ReducedFraction barFraction)

◆ isSimple()

bool Ms::Meter::isSimple ( const ReducedFraction barFraction)

◆ isSimpleNoteDuration()

bool Ms::Meter::isSimpleNoteDuration ( const ReducedFraction duration)

◆ isTriple()

bool Ms::Meter::isTriple ( const ReducedFraction barFraction)

◆ levelOfTick()

int Ms::Meter::levelOfTick ( const ReducedFraction tick,
const std::vector< DivisionInfo > &  divsInfo 
)

◆ maxLevelBetween()

Meter::MaxLevel Ms::Meter::maxLevelBetween ( const ReducedFraction startTickInBar,
const ReducedFraction endTickInBar,
const DivisionInfo divInfo 
)

◆ metricDivisionsOfBar()

DivisionInfo Ms::Meter::metricDivisionsOfBar ( const ReducedFraction barFraction)

◆ metricDivisionsOfTuplet()

DivisionInfo Ms::Meter::metricDivisionsOfTuplet ( const MidiTuplet::TupletData tuplet,
int  tupletStartLevel 
)

◆ metricLevelsOfBar()

std::vector< int > Ms::Meter::metricLevelsOfBar ( const ReducedFraction barFraction,
const std::vector< DivisionInfo > &  divsInfo,
const ReducedFraction minDuration 
)

◆ noteCount()

int Ms::Meter::noteCount ( const ReducedFraction duration,
bool  useDots 
)

◆ toDurationList()

QList< std::pair< ReducedFraction, TDuration > > Ms::Meter::toDurationList ( const ReducedFraction startTickInBar,
const ReducedFraction endTickInBar,
const ReducedFraction barFraction,
const std::vector< MidiTuplet::TupletData > &  tupletsInBar,
DurationType  durationType,
bool  useDots,
bool  printRestRemains 
)

◆ tupletNumberForDuration()

int Ms::Meter::tupletNumberForDuration ( const ReducedFraction startTick,
const ReducedFraction endTick,
const std::vector< MidiTuplet::TupletData > &  tupletsInBar 
)

◆ userTimeSigToFraction()

enum DurationType char ReducedFraction Ms::Meter::userTimeSigToFraction ( MidiOperations::TimeSigNumerator  timeSigNumerator,
MidiOperations::TimeSigDenominator  timeSigDenominator 
)
strong

Variable Documentation

◆ TUPLET_BOUNDARY_LEVEL

const int Ms::Meter::TUPLET_BOUNDARY_LEVEL = 10