MuseScore  3.4
Music composition and notation
Classes | Namespaces | Functions
importmidi_quant.cpp File Reference
#include "importmidi_quant.h"
#include "libmscore/sig.h"
#include "importmidi_fraction.h"
#include "libmscore/mscore.h"
#include "mscore/preferences.h"
#include "importmidi_chord.h"
#include "importmidi_meter.h"
#include "importmidi_tuplet.h"
#include "importmidi_inner.h"
#include "importmidi_beat.h"
#include "importmidi_voice.h"
#include "importmidi_tempo.h"
#include "importmidi_operations.h"
#include <set>
#include <deque>
Include dependency graph for importmidi_quant.cpp:

Classes

struct  Ms::Quantize::QuantPos
 
struct  Ms::Quantize::QuantData
 
struct  Ms::Quantize::QuantInfo
 

Namespaces

 Ms
 
 
 Ms::Quantize
 

Functions

ReducedFraction Ms::Quantize::quantValueToFraction (MidiOperations::QuantValue quantValue)
 
MidiOperations::QuantValue Ms::Quantize::fractionToQuantValue (const ReducedFraction &fraction)
 
MidiOperations::QuantValue Ms::Quantize::defaultQuantValueFromPreferences ()
 
ReducedFraction Ms::Quantize::shortestQuantizedNoteInRange (const std::multimap< ReducedFraction, MidiChord >::const_iterator &beg, const std::multimap< ReducedFraction, MidiChord >::const_iterator &end)
 
ReducedFraction Ms::Quantize::reduceQuantIfDottedNote (const ReducedFraction &noteLen, const ReducedFraction &raster)
 
ReducedFraction Ms::Quantize::quantizeValue (const ReducedFraction &value, const ReducedFraction &quant)
 
ReducedFraction Ms::Quantize::quantForLen (const ReducedFraction &noteLen, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::quantForTuplet (const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio)
 
ReducedFraction Ms::Quantize::findMinQuant (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findQuantizedTupletChordOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction Ms::Quantize::findQuantizedChordOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
std::pair< ReducedFraction, ReducedFraction > Ms::Quantize::findQuantizedTupletNoteOffTime (const ReducedFraction &onTime, const ReducedFraction &offTime, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
std::pair< ReducedFraction, ReducedFraction > Ms::Quantize::findQuantizedNoteOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &offTime, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findMinQuantizedOnTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findMaxQuantizedTupletOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction Ms::Quantize::findMaxQuantizedOffTime (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findOnTimeTupletQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction Ms::Quantize::findOnTimeQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findOffTimeTupletQuantError (const ReducedFraction &onTime, const ReducedFraction &offTime, const ReducedFraction &tupletLen, const ReducedFraction &tupletRatio, const ReducedFraction &rangeStart)
 
ReducedFraction Ms::Quantize::findOffTimeQuantError (const std::pair< const ReducedFraction, MidiChord > &chord, const ReducedFraction &offTime, const ReducedFraction &basicQuant)
 
ReducedFraction Ms::Quantize::findQuantForRange (const std::multimap< ReducedFraction, MidiChord >::const_iterator &beg, const std::multimap< ReducedFraction, MidiChord >::const_iterator &end, const ReducedFraction &basicQuant)
 
bool Ms::Quantize::isHumanPerformance (const std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap)
 
std::multimap< int, MTrack > Ms::Quantize::getTrackWithAllChords (const std::multimap< int, MTrack > &tracks)
 
void Ms::Quantize::setIfHumanPerformance (const std::multimap< int, MTrack > &tracks, TimeSigMap *sigmap)
 
void Ms::Quantize::preserveLegato (ReducedFraction &offTime, bool isOffTimeInTuplet, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &basicQuant)
 
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)
 
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)
 
ReducedFraction Ms::Quantize::quantizeToLarge (const ReducedFraction &time, const ReducedFraction &quant)
 
ReducedFraction Ms::Quantize::quantizeToSmall (const ReducedFraction &time, const ReducedFraction &quant)
 
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)
 
void Ms::Quantize::findChordRangeEnds (std::vector< QuantData > &data, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &barStart, const ReducedFraction &beatLen)
 
void Ms::Quantize::findChordRangeStarts (std::vector< QuantData > &data, const ReducedFraction &rangeStart, const ReducedFraction &rangeEnd, const ReducedFraction &barStart, const ReducedFraction &beatLen)
 
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)
 
ReducedFraction Ms::Quantize::findTupletQuant (const std::deque< std::multimap< ReducedFraction, MidiChord >::const_iterator > &chords)
 
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)
 
int Ms::Quantize::findLastChordPosition (const std::vector< QuantData > &quantData)
 
void Ms::Quantize::applyDynamicProgramming (std::vector< QuantData > &quantData)
 
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)
 
void Ms::Quantize::applyTupletStaccato (std::multimap< ReducedFraction, MidiChord > &chords)
 
void Ms::Quantize::quantizeOffTimes (std::multimap< ReducedFraction, MidiChord > &quantizedChords, const ReducedFraction &basicQuant)
 
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)
 
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)
 
void Ms::Quantize::moveOffTimes (const ReducedFraction &oldOnTime, const ReducedFraction &newOnTime, QList< MidiNote > &notes)
 
std::multimap< ReducedFraction, MidiChord > Ms::Quantize::findQuantizedChords (const std::map< const std::pair< const ReducedFraction, MidiChord > *, QuantInfo > &foundOnTimes)
 
void Ms::Quantize::removeUselessTupletReferences (std::multimap< ReducedFraction, MidiChord > &chords)
 
void Ms::Quantize::quantizeChords (std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap, const ReducedFraction &basicQuant)