1 #ifndef IMPORTMIDI_TUPLET_H 2 #define IMPORTMIDI_TUPLET_H 13 class DurationElement;
15 namespace MidiTuplet {
45 const QList<MidiNote> ¬es,
54 const std::multimap<ReducedFraction, MidiChord> &chords);
56 std::multimap<ReducedFraction, TupletData>::iterator
58 const std::multimap<ReducedFraction, TupletData>::iterator &tupletIt,
59 std::multimap<ReducedFraction, TupletData> &tuplets,
61 std::multimap<ReducedFraction, MidiChord> &chords);
63 std::multimap<ReducedFraction, TupletData>::iterator
65 const std::multimap<ReducedFraction, TupletData>::iterator &tupletIt,
66 std::multimap<ReducedFraction, TupletData> &tuplets,
68 std::multimap<ReducedFraction, MidiChord> &chords);
73 std::pair<ReducedFraction, ReducedFraction>
77 std::vector<std::pair<ReducedFraction, ReducedFraction> >
81 std::vector<TupletData>
86 const std::multimap<ReducedFraction, TupletData> &tupletEvents);
88 std::vector<std::multimap<ReducedFraction, TupletData>::const_iterator>
92 const std::multimap<ReducedFraction, TupletData> &tupletEvents,
93 bool strictComparison);
95 std::multimap<ReducedFraction, TupletData>::const_iterator
98 const std::multimap<ReducedFraction, TupletData> &tupletEvents,
99 bool strictComparison);
104 std::multimap<ReducedFraction, TupletData> &tuplets,
105 std::multimap<ReducedFraction, MidiChord> &chords,
110 const std::pair<const ReducedFraction, MidiChord> &chord,
111 const std::multimap<ReducedFraction, MidiChord> &chords,
117 bool areAllTupletsReferenced(
118 const std::multimap<ReducedFraction, MidiChord> &chords,
119 const std::multimap<ReducedFraction, TupletData> &tupletEvents);
121 bool areTupletReferencesValid(
const std::multimap<ReducedFraction, MidiChord> &chords);
123 bool isTupletRangeOk(
124 const std::pair<const ReducedFraction, MidiChord> &chord,
125 const std::multimap<ReducedFraction, TupletData> &tuplets);
127 bool areTupletRangesOk(
128 const std::multimap<ReducedFraction, MidiChord> &chords,
129 const std::multimap<ReducedFraction, TupletData> &tuplets);
131 bool areAllTupletsDifferent(
const std::multimap<ReducedFraction, TupletData> &tuplets);
139 #endif // IMPORTMIDI_TUPLET_H int minNoteCount
Definition: importmidi_tuplet.h:33
void removeEmptyTuplets(MTrack &track)
Definition: importmidi_tuplet.cpp:157
int minNoteCountHuman
Definition: importmidi_tuplet.h:36
bool isTupletUseless(int voice, const ReducedFraction &onTime, const ReducedFraction &len, const ReducedFraction &maxChordLength, const std::multimap< ReducedFraction, MidiChord > &chords)
Definition: importmidi_tuplet.cpp:85
int minNoteCountAddVoice
Definition: importmidi_tuplet.h:34
Definition: importmidi_tuplet.h:28
std::vector< DurationElement * > elements
Definition: importmidi_tuplet.h:25
std::vector< std::pair< ReducedFraction, ReducedFraction > > findTupletIntervals(const std::vector< TupletInfo > &tuplets, const ReducedFraction &basicQuant)
Definition: importmidi_tuplet.cpp:239
std::pair< ReducedFraction, ReducedFraction > tupletInterval(const TupletInfo &tuplet, const ReducedFraction &basicQuant)
Definition: importmidi_tuplet.cpp:222
ReducedFraction ratio
Definition: importmidi_tuplet.h:32
std::multimap< ReducedFraction, TupletData >::iterator removeTuplet(const std::multimap< ReducedFraction, TupletData >::iterator &tupletIt, std::multimap< ReducedFraction, TupletData > &tuplets, const ReducedFraction &maxChordLength, std::multimap< ReducedFraction, MidiChord > &chords)
Definition: importmidi_tuplet.cpp:108
int voice
Definition: importmidi_tuplet.h:21
int minNoteCountStaccato
Definition: importmidi_tuplet.h:35
Definition: importmidi_inner.h:111
Definition: aeolus.cpp:26
Definition: importmidi_tuplet.h:19
void findAllTuplets(std::multimap< ReducedFraction, TupletData > &tuplets, std::multimap< ReducedFraction, MidiChord > &chords, const TimeSigMap *sigmap, const ReducedFraction &basicQuant)
Definition: importmidi_tuplet.cpp:1108
std::multimap< ReducedFraction, TupletData >::iterator removeTupletIfEmpty(const std::multimap< ReducedFraction, TupletData >::iterator &tupletIt, std::multimap< ReducedFraction, TupletData > &tuplets, const ReducedFraction &maxChordLength, std::multimap< ReducedFraction, MidiChord > &chords)
Definition: importmidi_tuplet.cpp:136
ReducedFraction onTime
Definition: importmidi_tuplet.h:22
bool hasNonTrivialChord(const ReducedFraction &chordOnTime, const QList< MidiNote > ¬es, const ReducedFraction &tupletOnTime, const ReducedFraction &tupletLen)
Definition: importmidi_tuplet.cpp:56
const TupletInfo & tupletFromId(int id, const std::vector< TupletInfo > &tuplets)
Definition: importmidi_tuplet.cpp:40
std::multimap< ReducedFraction, TupletData >::const_iterator findTupletContainingTime(int voice, const ReducedFraction &time, const std::multimap< ReducedFraction, TupletData > &tupletEvents, bool strictComparison)
Definition: importmidi_tuplet.cpp:317
ReducedFraction findOnTimeBetweenChords(const std::pair< const ReducedFraction, MidiChord > &chord, const std::multimap< ReducedFraction, MidiChord > &chords, const ReducedFraction &basicQuant, const ReducedFraction &barStart)
Definition: importmidi_tuplet.cpp:907
ReducedFraction len
Definition: importmidi_tuplet.h:23
Definition: importmidi_inner.h:71
Definition: importmidi_fraction.h:9
int tupletNumber
Definition: importmidi_tuplet.h:24
std::vector< std::multimap< ReducedFraction, TupletData >::const_iterator > findTupletsForTimeRange(int voice, const ReducedFraction &onTime, const ReducedFraction &len, const std::multimap< ReducedFraction, TupletData > &tupletEvents, bool strictComparison)
Definition: importmidi_tuplet.cpp:280
const TupletLimits & tupletLimits(int tupletNumber)
Definition: importmidi_tuplet.cpp:31
std::vector< TupletData > findTupletsInBarForDuration(int voice, const ReducedFraction &barStartTick, const ReducedFraction &durationOnTime, const ReducedFraction &durationLen, const std::multimap< ReducedFraction, TupletData > &tupletEvents)
Definition: importmidi_tuplet.cpp:252