MuseScore  3.4
Music composition and notation
Classes | Functions
Ms::Quantize Namespace Reference

Classes

struct  QuantData
 
struct  QuantInfo
 
struct  QuantPos
 

Functions

MidiOperations::QuantValue defaultQuantValueFromPreferences ()
 
ReducedFraction quantValueToFraction (MidiOperations::QuantValue quantValue)
 
MidiOperations::QuantValue fractionToQuantValue (const ReducedFraction &fraction)
 
ReducedFraction shortestQuantizedNoteInRange (const std::multimap< ReducedFraction, MidiChord >::const_iterator &beg, const std::multimap< ReducedFraction, MidiChord >::const_iterator &end)
 
ReducedFraction reduceQuantIfDottedNote (const ReducedFraction &noteLen, const ReducedFraction &raster)
 
ReducedFraction quantizeValue (const ReducedFraction &value, const ReducedFraction &quant)
 
ReducedFraction quantForLen (const ReducedFraction &noteLen, const ReducedFraction &basicQuant)
 
ReducedFraction quantForTuplet (const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio)
 
ReducedFraction findMinQuant (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction findQuantizedTupletChordOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction findQuantizedChordOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
std::pair< ReducedFraction, ReducedFractionfindQuantizedTupletNoteOffTime (const ReducedFraction &onTime, const ReducedFraction &offTime, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
std::pair< ReducedFraction, ReducedFractionfindQuantizedNoteOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &offTime, const ReducedFraction &basicQuant)
 
ReducedFraction findMinQuantizedOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction findMaxQuantizedTupletOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction findMaxQuantizedOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction findOnTimeTupletQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction findOnTimeQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction findOffTimeTupletQuantError (const ReducedFraction &onTime, const ReducedFraction &offTime, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction findOffTimeQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &offTime, const ReducedFraction &basicQuant)
 
ReducedFraction findQuantForRange (const std::multimap< ReducedFraction, MidiChord >::const_iterator &beg, const std::multimap< ReducedFraction, MidiChord >::const_iterator &end, const ReducedFraction &basicQuant)
 
bool isHumanPerformance (const std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap)
 
std::multimap< int, MTrackgetTrackWithAllChords (const std::multimap< int, MTrack > &tracks)
 
void setIfHumanPerformance (const std::multimap< int, MTrack > &tracks, TimeSigMap *sigmap)
 
void preserveLegato (ReducedFraction &offTime, bool isOffTimeInTuplet, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &basicQuant)
 
std::pair< ReducedFraction, ReducedFractionquantizeOffTimeForTuplet (const ReducedFraction &noteOffTime, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &basicQuant, const MidiTuplet::TupletData &tuplet)
 
std::pair< ReducedFraction, ReducedFractionquantizeOffTimeForNonTuplet (const ReducedFraction &noteOffTime, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &basicQuant)
 
ReducedFraction quantizeToLarge (const ReducedFraction &time, const ReducedFraction &quant)
 
ReducedFraction quantizeToSmall (const ReducedFraction &time, const ReducedFraction &quant)
 
void findMetricalLevels (std::vector< QuantData > &data, const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords, const ReducedFraction &tupletQuant, const ReducedFraction &barStart, const ReducedFraction &barFraction)
 
void findChordRangeEnds (std::vector< QuantData > &data, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &barStart, const ReducedFraction &beatLen)
 
void findChordRangeStarts (std::vector< QuantData > &data, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &barStart, const ReducedFraction &beatLen)
 
void findQuants (std::vector< QuantData > &data, const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &basicQuant, const ReducedFraction &tupletQuant, const ReducedFraction &barFraction)
 
ReducedFraction findTupletQuant (const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords)
 
std::vector< QuantDatafindQuantData (const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &basicQuant, const ReducedFraction &barStart, const ReducedFraction &barFraction)
 
int findLastChordPosition (const std::vector< QuantData > &quantData)
 
void applyDynamicProgramming (std::vector< QuantData > &quantData)
 
void quantizeOnTimesInRange (const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords, std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &foundOnTimes, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &basicQuant, const ReducedFraction &barStart, const ReducedFraction &barFraction)
 
void applyTupletStaccato (std::multimap< ReducedFraction, MidiChord > &chords)
 
void quantizeOffTimes (std::multimap< ReducedFraction, MidiChord > &quantizedChords, const ReducedFraction &basicQuant)
 
void addChordsFromPrevRange (std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chordsToQuant, const std::multimap< ReducedFraction, MidiChord > &chords, bool currentlyInTuplet, int currentBarIndex, int voice, const ReducedFraction &barStart, const ReducedFraction &rangeStart, const ReducedFraction &basicQuant)
 
void quantizeOnTimes (const std::multimap< ReducedFraction, MidiChord > &chords, std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &foundOnTimes, const ReducedFraction &basicQuant, const TimeSigMap *sigmap)
 
void moveOffTimes (const ReducedFraction &oldOnTime, const ReducedFraction &newOnTime, QList< MidiNote > &notes)
 
std::multimap< ReducedFraction, MidiChordfindQuantizedChords (const std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &foundOnTimes)
 
void removeUselessTupletReferences (std::multimap< ReducedFraction, MidiChord > &chords)
 
void quantizeChords (std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap, const ReducedFraction &basicQuant)
 

Function Documentation

◆ addChordsFromPrevRange()

void Ms::Quantize::addChordsFromPrevRange ( std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chordsToQuant,
const std::multimap< ReducedFraction, MidiChord > &  chords,
bool  currentlyInTuplet,
int  currentBarIndex,
int  voice,
const ReducedFraction barStart,
const ReducedFraction rangeStart,
const ReducedFraction basicQuant 
)

◆ applyDynamicProgramming()

void Ms::Quantize::applyDynamicProgramming ( std::vector< QuantData > &  quantData)

◆ applyTupletStaccato()

void Ms::Quantize::applyTupletStaccato ( std::multimap< ReducedFraction, MidiChord > &  chords)

◆ defaultQuantValueFromPreferences()

MidiOperations::QuantValue Ms::Quantize::defaultQuantValueFromPreferences ( )

◆ findChordRangeEnds()

void Ms::Quantize::findChordRangeEnds ( std::vector< QuantData > &  data,
const ReducedFraction rangeStart,
const ReducedFraction rangeEnd,
const ReducedFraction barStart,
const ReducedFraction beatLen 
)

◆ findChordRangeStarts()

void Ms::Quantize::findChordRangeStarts ( std::vector< QuantData > &  data,
const ReducedFraction rangeStart,
const ReducedFraction rangeEnd,
const ReducedFraction barStart,
const ReducedFraction beatLen 
)

◆ findLastChordPosition()

int Ms::Quantize::findLastChordPosition ( const std::vector< QuantData > &  quantData)

◆ findMaxQuantizedOffTime()

ReducedFraction Ms::Quantize::findMaxQuantizedOffTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction basicQuant 
)

◆ findMaxQuantizedTupletOffTime()

ReducedFraction Ms::Quantize::findMaxQuantizedTupletOffTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction tupletLen,
const ReducedFraction tupletRatio,
const ReducedFraction rangeStart 
)

◆ findMetricalLevels()

void Ms::Quantize::findMetricalLevels ( std::vector< QuantData > &  data,
const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chords,
const ReducedFraction tupletQuant,
const ReducedFraction barStart,
const ReducedFraction barFraction 
)

◆ findMinQuant()

ReducedFraction Ms::Quantize::findMinQuant ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction basicQuant 
)

◆ findMinQuantizedOnTime()

ReducedFraction Ms::Quantize::findMinQuantizedOnTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction basicQuant 
)

◆ findOffTimeQuantError()

ReducedFraction Ms::Quantize::findOffTimeQuantError ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction offTime,
const ReducedFraction basicQuant 
)

◆ findOffTimeTupletQuantError()

ReducedFraction Ms::Quantize::findOffTimeTupletQuantError ( const ReducedFraction onTime,
const ReducedFraction offTime,
const ReducedFraction tupletLen,
const ReducedFraction tupletRatio,
const ReducedFraction rangeStart 
)

◆ findOnTimeQuantError()

ReducedFraction Ms::Quantize::findOnTimeQuantError ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction basicQuant 
)

◆ findOnTimeTupletQuantError()

ReducedFraction Ms::Quantize::findOnTimeTupletQuantError ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction tupletLen,
const ReducedFraction tupletRatio,
const ReducedFraction rangeStart 
)

◆ findQuantData()

std::vector<QuantData> Ms::Quantize::findQuantData ( const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chords,
const ReducedFraction rangeStart,
const ReducedFraction rangeEnd,
const ReducedFraction basicQuant,
const ReducedFraction barStart,
const ReducedFraction barFraction 
)

◆ findQuantForRange()

ReducedFraction Ms::Quantize::findQuantForRange ( const std::multimap< ReducedFraction, MidiChord >::const_iterator &  beg,
const std::multimap< ReducedFraction, MidiChord >::const_iterator &  end,
const ReducedFraction basicQuant 
)

◆ findQuantizedChordOnTime()

ReducedFraction Ms::Quantize::findQuantizedChordOnTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction basicQuant 
)

◆ findQuantizedChords()

std::multimap<ReducedFraction, MidiChord> Ms::Quantize::findQuantizedChords ( const std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &  foundOnTimes)

◆ findQuantizedNoteOffTime()

std::pair< ReducedFraction, ReducedFraction > Ms::Quantize::findQuantizedNoteOffTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction offTime,
const ReducedFraction basicQuant 
)

◆ findQuantizedTupletChordOnTime()

ReducedFraction Ms::Quantize::findQuantizedTupletChordOnTime ( const std::pair< const ReducedFraction, MidiChord > &  chord,
const ReducedFraction tupletLen,
const ReducedFraction tupletRatio,
const ReducedFraction rangeStart 
)

◆ findQuantizedTupletNoteOffTime()

std::pair< ReducedFraction, ReducedFraction > Ms::Quantize::findQuantizedTupletNoteOffTime ( const ReducedFraction onTime,
const ReducedFraction offTime,
const ReducedFraction tupletLen,
const ReducedFraction tupletRatio,
const ReducedFraction rangeStart 
)

◆ findQuants()

void Ms::Quantize::findQuants ( std::vector< QuantData > &  data,
const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chords,
const ReducedFraction rangeStart,
const ReducedFraction rangeEnd,
const ReducedFraction basicQuant,
const ReducedFraction tupletQuant,
const ReducedFraction barFraction 
)

◆ findTupletQuant()

ReducedFraction Ms::Quantize::findTupletQuant ( const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chords)

◆ fractionToQuantValue()

MidiOperations::QuantValue Ms::Quantize::fractionToQuantValue ( const ReducedFraction fraction)

◆ getTrackWithAllChords()

std::multimap<int, MTrack> Ms::Quantize::getTrackWithAllChords ( const std::multimap< int, MTrack > &  tracks)

◆ isHumanPerformance()

bool Ms::Quantize::isHumanPerformance ( const std::multimap< ReducedFraction, MidiChord > &  chords,
const TimeSigMap sigmap 
)

◆ moveOffTimes()

void Ms::Quantize::moveOffTimes ( const ReducedFraction oldOnTime,
const ReducedFraction newOnTime,
QList< MidiNote > &  notes 
)

◆ preserveLegato()

void Ms::Quantize::preserveLegato ( ReducedFraction offTime,
bool  isOffTimeInTuplet,
const std::multimap< ReducedFraction, MidiChord >::iterator &  chordIt,
const std::multimap< ReducedFraction, MidiChord > &  chords,
const ReducedFraction basicQuant 
)

◆ quantForLen()

ReducedFraction Ms::Quantize::quantForLen ( const ReducedFraction noteLen,
const ReducedFraction basicQuant 
)

◆ quantForTuplet()

ReducedFraction Ms::Quantize::quantForTuplet ( const ReducedFraction tupletLen,
const ReducedFraction tupletRatio 
)

◆ quantizeChords()

void Ms::Quantize::quantizeChords ( std::multimap< ReducedFraction, MidiChord > &  chords,
const TimeSigMap sigmap,
const ReducedFraction basicQuant 
)

◆ quantizeOffTimeForNonTuplet()

std::pair<ReducedFraction, ReducedFraction> Ms::Quantize::quantizeOffTimeForNonTuplet ( const ReducedFraction noteOffTime,
const std::multimap< ReducedFraction, MidiChord >::iterator &  chordIt,
const std::multimap< ReducedFraction, MidiChord > &  chords,
const ReducedFraction basicQuant 
)

◆ quantizeOffTimeForTuplet()

std::pair<ReducedFraction, ReducedFraction> Ms::Quantize::quantizeOffTimeForTuplet ( const ReducedFraction noteOffTime,
const std::multimap< ReducedFraction, MidiChord >::iterator &  chordIt,
const std::multimap< ReducedFraction, MidiChord > &  chords,
const ReducedFraction basicQuant,
const MidiTuplet::TupletData tuplet 
)

◆ quantizeOffTimes()

void Ms::Quantize::quantizeOffTimes ( std::multimap< ReducedFraction, MidiChord > &  quantizedChords,
const ReducedFraction basicQuant 
)

◆ quantizeOnTimes()

void Ms::Quantize::quantizeOnTimes ( const std::multimap< ReducedFraction, MidiChord > &  chords,
std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &  foundOnTimes,
const ReducedFraction basicQuant,
const TimeSigMap sigmap 
)

◆ quantizeOnTimesInRange()

void Ms::Quantize::quantizeOnTimesInRange ( const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &  chords,
std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &  foundOnTimes,
const ReducedFraction rangeStart,
const ReducedFraction rangeEnd,
const ReducedFraction basicQuant,
const ReducedFraction barStart,
const ReducedFraction barFraction 
)

◆ quantizeToLarge()

ReducedFraction Ms::Quantize::quantizeToLarge ( const ReducedFraction time,
const ReducedFraction quant 
)

◆ quantizeToSmall()

ReducedFraction Ms::Quantize::quantizeToSmall ( const ReducedFraction time,
const ReducedFraction quant 
)

◆ quantizeValue()

ReducedFraction Ms::Quantize::quantizeValue ( const ReducedFraction value,
const ReducedFraction quant 
)

◆ quantValueToFraction()

ReducedFraction Ms::Quantize::quantValueToFraction ( MidiOperations::QuantValue  quantValue)

◆ reduceQuantIfDottedNote()

ReducedFraction Ms::Quantize::reduceQuantIfDottedNote ( const ReducedFraction noteLen,
const ReducedFraction raster 
)

◆ removeUselessTupletReferences()

void Ms::Quantize::removeUselessTupletReferences ( std::multimap< ReducedFraction, MidiChord > &  chords)

◆ setIfHumanPerformance()

void Ms::Quantize::setIfHumanPerformance ( const std::multimap< int, MTrack > &  tracks,
TimeSigMap sigmap 
)

◆ shortestQuantizedNoteInRange()

ReducedFraction Ms::Quantize::shortestQuantizedNoteInRange ( const std::multimap< ReducedFraction, MidiChord >::const_iterator &  beg,
const std::multimap< ReducedFraction, MidiChord >::const_iterator &  end 
)