MuseScore  3.4
Music composition and notation
Classes | Namespaces | Enumerations | Functions | Variables
importmidi_voice.cpp File Reference
#include "importmidi_voice.h"
#include "importmidi_tuplet.h"
#include "importmidi_inner.h"
#include "importmidi_chord.h"
#include "importmidi_meter.h"
#include "importmidi_operations.h"
#include "libmscore/sig.h"
#include "libmscore/mscore.h"
#include "mscore/preferences.h"
#include "libmscore/durationtype.h"
Include dependency graph for importmidi_voice.cpp:

Classes

struct  Ms::MidiVoice::VoiceSplit
 

Namespaces

 Ms
 
 
 Ms::MidiVoice
 

Enumerations

enum  Ms::MidiVoice::MovedVoiceGroup { Ms::MidiVoice::MovedVoiceGroup::LOW, Ms::MidiVoice::MovedVoiceGroup::HIGH }
 

Functions

int Ms::MidiVoice::toIntVoiceCount (MidiOperations::VoiceCount value)
 
int Ms::MidiVoice::voiceLimit ()
 
bool Ms::MidiVoice::allNotesHaveEqualLength (const QList< MidiNote > &notes)
 
int Ms::MidiVoice::findDurationCountInGroup (const ReducedFraction &chordOnTime, const QList< MidiNote > &notes, int voice, const std::vector< int > &groupOfIndexes, const TimeSigMap *sigmap, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets)
 
int Ms::MidiVoice::findDurationCount (const QList< MidiNote > &notes, int voice, int splitPoint, const ReducedFraction &chordOnTime, const TimeSigMap *sigmap, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets)
 
int Ms::MidiVoice::findOptimalSplitPoint (const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const TimeSigMap *sigmap, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const std::multimap< ReducedFraction, MidiChord > &chords)
 
std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator >::const_iterator Ms::MidiVoice::findInsertedTuplet (const ReducedFraction &onTime, int voice, const std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets)
 
bool Ms::MidiVoice::hasIntersectionWithTuplets (int voice, const ReducedFraction &onTime, const ReducedFraction &offTime, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, const ReducedFraction &tupletOnTime)
 
void Ms::MidiVoice::addGroupSplits (std::vector< VoiceSplit > &splits, const ReducedFraction &maxChordLength, const std::multimap< ReducedFraction, MidiChord > &chords, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, const ReducedFraction &tupletOnTime, const ReducedFraction &onTime, const ReducedFraction &groupOffTime, int origVoice, MovedVoiceGroup groupType, int maxOccupiedVoice)
 
ReducedFraction Ms::MidiVoice::maximizeOffTime (const MidiNote &note, const ReducedFraction &offTime)
 
std::vector< VoiceSplit > Ms::MidiVoice::findPossibleVoiceSplits (int origVoice, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, int splitPoint, const std::multimap< ReducedFraction, MidiChord > &chords, const std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, int maxOccupiedVoice)
 
int Ms::MidiVoice::findPrevPitchDist (const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, int averagePitch, const std::multimap< ReducedFraction, MidiChord > &chords, int voice)
 
int Ms::MidiVoice::findNextPitchDist (const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, int averagePitch, const std::multimap< ReducedFraction, MidiChord > &chords, int voice)
 
int Ms::MidiVoice::findMinPitchDist (int averagePitch, const int voice, const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords)
 
int Ms::MidiVoice::findAverageLowPitch (const QList< MidiNote > &notes, int splitPoint)
 
int Ms::MidiVoice::findAverageHighPitch (const QList< MidiNote > &notes, int splitPoint)
 
VoiceSplit Ms::MidiVoice::findBestSplit (const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords, const std::vector< VoiceSplit > &possibleSplits, int splitPoint)
 
void Ms::MidiVoice::insertNewTuplet (std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator &tuplet, const ReducedFraction &tupletOnTime, int newVoice, std::multimap< ReducedFraction, MidiChord > &chords, std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets)
 
bool Ms::MidiVoice::canSplitTuplet (const std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator &tuplet, int newVoice, const ReducedFraction &chordOnTime, const QList< MidiNote > &notes, const std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &maxChordLength)
 
void Ms::MidiVoice::splitTuplet (std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator &tuplet, int newVoice, const ReducedFraction &chordOnTime, const QList< MidiNote > &notes, bool &isInTuplet, std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, std::multimap< ReducedFraction, MidiChord > &chords, std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const ReducedFraction &maxChordLength, bool allowParallelTuplets, bool isThisAChord)
 
bool Ms::MidiVoice::updateChordTuplets (MidiChord &chord, const ReducedFraction &onTime, std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, std::multimap< ReducedFraction, MidiChord > &chords, std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, const ReducedFraction &maxChordLength, bool allowParallelTuplets)
 
int Ms::MidiVoice::findMaxOccupiedVoiceInBar (const std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const std::multimap< ReducedFraction, MidiChord > &chords)
 
bool Ms::MidiVoice::splitChordToVoice (std::multimap< ReducedFraction, MidiChord >::iterator &chordIt, const QSet< int > &notesToMove, int newVoice, std::multimap< ReducedFraction, MidiChord > &chords, std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets, std::multimap< ReducedFraction, std::multimap< ReducedFraction, MidiTuplet::TupletData >::iterator > &insertedTuplets, const ReducedFraction &maxChordLength, bool allowParallelTuplets)
 
QSet< int > Ms::MidiVoice::findNotesToMove (const QList< MidiNote > &notes, int splitPoint, MovedVoiceGroup splitGroup)
 
bool Ms::MidiVoice::doVoiceSeparation (std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap, std::multimap< ReducedFraction, MidiTuplet::TupletData > &tuplets)
 
int Ms::MidiVoice::findBarIndexForOffTime (const ReducedFraction &offTime, const TimeSigMap *sigmap)
 
int Ms::MidiVoice::averagePitchOfChords (const std::vector< std::multimap< ReducedFraction, MidiChord >::iterator > &chords)
 
void Ms::MidiVoice::sortVoicesByPitch (const std::map< int, std::vector< std::multimap< ReducedFraction, MidiChord >::iterator >> &voiceChords)
 
void Ms::MidiVoice::sortVoices (std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap)
 
bool Ms::MidiVoice::separateVoices (std::multimap< int, MTrack > &tracks, const TimeSigMap *sigmap)
 

Variables

const int Ms::MidiVoice::MAX_PITCH_DIST = 1000