Преглед изворни кода

cmXScore.c : A warning is now reported when a overlapped note triggers a 'shorten/shift' resolution.

Tick number added to pedal state warning messages.
master
kevin пре 4 година
родитељ
комит
4942b48206
1 измењених фајлова са 10 додато и 7 уклоњено
  1. 10
    7
      src/app/cmXScore.c

+ 10
- 7
src/app/cmXScore.c Прегледај датотеку

@@ -1368,7 +1368,10 @@ void  _cmXScoreProcessOverlappingNotes( cmXScore_t* p )
1368 1368
               fnp->tied_dur -= d;
1369 1369
 
1370 1370
             // move the second note just past it
1371
-            np->tick       = fnp->tick + fnp->tied_dur + 1;
1371
+            np->tick       = fnp->tick + fnp->tied_dur;
1372
+
1373
+            cmErrWarnMsg(&p->err,kOverlapWarnXsRC,"A shorten/shift operation was done to reconcile two overlapped %s (ticks:%i %i) notes in measure %i.",cmMidiToSciPitch(np->pitch,NULL,0),fnp->tick,np->tick,np->meas->number);
1374
+
1372 1375
           }
1373 1376
         }
1374 1377
     }
@@ -1587,7 +1590,7 @@ cmXsRC_t _cmXScoreProcessPedals( cmXScore_t* p, bool reportFl )
1587 1590
             
1588 1591
           case kDampDnXsFl:            
1589 1592
             if( dnp != NULL )
1590
-              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper down not preceded by damper up in measure:%i.",mp->number);
1593
+              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper down not preceded by damper up in measure:%i tick:%i.",mp->number,np->tick);
1591 1594
             else
1592 1595
               dnp = np;
1593 1596
 
@@ -1597,7 +1600,7 @@ cmXsRC_t _cmXScoreProcessPedals( cmXScore_t* p, bool reportFl )
1597 1600
             
1598 1601
           case kDampUpXsFl:
1599 1602
             if( dnp == NULL )
1600
-              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper up not preceded by damper down in measure:%i.",mp->number);
1603
+              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper up not preceded by damper down in measure:%i tick:%i.",mp->number,np->tick);
1601 1604
             else
1602 1605
             {
1603 1606
               dnp->duration = np->tick - dnp->tick;
@@ -1611,7 +1614,7 @@ cmXsRC_t _cmXScoreProcessPedals( cmXScore_t* p, bool reportFl )
1611 1614
             
1612 1615
           case kDampUpDnXsFl:
1613 1616
             if( dnp == NULL )
1614
-              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper up/down not preceded by damper down in measure:%i.",mp->number);
1617
+              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Damper up/down not preceded by damper down in measure:%i tick:%i.",mp->number,np->tick);
1615 1618
             else
1616 1619
             {            
1617 1620
               dnp->duration = np->tick - dnp->tick;
@@ -1624,7 +1627,7 @@ cmXsRC_t _cmXScoreProcessPedals( cmXScore_t* p, bool reportFl )
1624 1627
             
1625 1628
           case kSostDnXsFl:
1626 1629
             if( snp != NULL )
1627
-              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Sostenuto down not preceded by sostenuto up in measure:%i.",mp->number);
1630
+              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Sostenuto down not preceded by sostenuto up in measure:%i tick:%i.",mp->number, np->tick);
1628 1631
             else
1629 1632
               snp = np;
1630 1633
             
@@ -1634,7 +1637,7 @@ cmXsRC_t _cmXScoreProcessPedals( cmXScore_t* p, bool reportFl )
1634 1637
             
1635 1638
           case kSostUpXsFl:
1636 1639
             if( snp == NULL )
1637
-              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Sostenuto up not preceded by sostenuto down in measure:%i.",mp->number);
1640
+              cmErrWarnMsg(&p->err,kPedalStateErrorXsRc,"Sostenuto up not preceded by sostenuto down in measure:%i tick:%i.",mp->number,np->tick);
1638 1641
             else
1639 1642
             {
1640 1643
               snp->duration = np->tick - snp->tick;
@@ -2102,7 +2105,7 @@ cmXsNote_t*  _cmXsReorderFindNote( cmXScore_t* p, unsigned measNumb, const cmXsR
2102 2105
         {
2103 2106
 
2104 2107
 
2105
-          if( 0 /*mp->number==19*/ )
2108
+          if( 0 /*mp->number==27*/ )
2106 2109
             printf("voice: %i %i loc:%i %i  tick:%i %i pitch:%i %i rval:%f %f idx:%i %i \n",
2107 2110
               np->voice->id, r->voice, 
2108 2111
               np->locIdx ,  r->locIdx ,

Loading…
Откажи
Сачувај