Skip to content

Commit 05cd8b2

Browse files
committed
Add comments about which functions operate in stretched vs global time
1 parent f75ec8a commit 05cd8b2

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/engraving/editing/cmd.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,7 @@ void Score::createCRSequence(const Fraction& f, ChordRest* cr, const Fraction& t
10681068
//---------------------------------------------------------
10691069
// setNoteRest
10701070
// pitch == -1 -> set rest
1071+
// "sd" is in local (stretched) time
10711072
// return segment of last created note/rest
10721073
//---------------------------------------------------------
10731074

@@ -1262,9 +1263,11 @@ Segment* Score::setNoteRest(Segment* segment, track_idx_t track, NoteVal nval, F
12621263
//
12631264
// if keepChord, the chord at tick is not removed
12641265
//
1266+
// "sd" is in local (stretched) time
1267+
//
12651268
// gap does not exceed measure or scope of tuplet
12661269
//
1267-
// return size of actual gap
1270+
// return size of actual gap in local time
12681271
//---------------------------------------------------------
12691272

12701273
Fraction Score::makeGap(Segment* segment, track_idx_t track, const Fraction& _sd, Tuplet* tuplet, bool keepChord)
@@ -1451,6 +1454,7 @@ Fraction Score::makeGap(Segment* segment, track_idx_t track, const Fraction& _sd
14511454
// chord/rest
14521455
// - cr is top level (not part of a tuplet)
14531456
// - do not stop at measure end
1457+
// - len and voiceOffset are in local (stretched) time
14541458
//---------------------------------------------------------
14551459

14561460
bool Score::makeGap1(const Fraction& baseTick, staff_idx_t staffIdx, const Fraction& len, const Fraction voiceOffset[VOICES])
@@ -1609,7 +1613,7 @@ bool Score::makeGapVoice(Segment* seg, track_idx_t track, Fraction len, const Fr
16091613
//---------------------------------------------------------
16101614
// splitGapToMeasureBoundaries
16111615
// cr - start of gap
1612-
// gap - gap len
1616+
// gap - gap len in local (stretched) time
16131617
//---------------------------------------------------------
16141618

16151619
std::vector<Fraction> Score::splitGapToMeasureBoundaries(ChordRest* cr, Fraction gap)
@@ -1655,6 +1659,7 @@ std::vector<Fraction> Score::splitGapToMeasureBoundaries(ChordRest* cr, Fraction
16551659

16561660
//---------------------------------------------------------
16571661
// changeCRlen
1662+
// - dstF is in local (stretched) time
16581663
//---------------------------------------------------------
16591664

16601665
void Score::changeCRlen(ChordRest* cr, const TDuration& d)

src/engraving/editing/edit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ ChordRest* Score::addClone(ChordRest* cr, const Fraction& tick, const TDuration&
465465
//---------------------------------------------------------
466466
// setRest
467467
// sets rests and returns the first one
468+
// "l" is in local (stretched) time
468469
//---------------------------------------------------------
469470

470471
Rest* Score::setRest(const Fraction& _tick, track_idx_t track, const Fraction& _l, bool useDots, Tuplet* tuplet, bool useFullMeasureRest)
@@ -476,6 +477,7 @@ Rest* Score::setRest(const Fraction& _tick, track_idx_t track, const Fraction& _
476477
//---------------------------------------------------------
477478
// setRests
478479
// create one or more rests to fill "l"
480+
// "l" is in local (stretched) time
479481
//---------------------------------------------------------
480482

481483
std::vector<Rest*> Score::setRests(const Fraction& _tick, track_idx_t track, const Fraction& _l, bool useDots, Tuplet* tuplet,

0 commit comments

Comments
 (0)