Browse Source

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 years ago
parent
commit
4942b48206
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      src/app/cmXScore.c

+ 10
- 7
src/app/cmXScore.c View File

1368
               fnp->tied_dur -= d;
1368
               fnp->tied_dur -= d;
1369
 
1369
 
1370
             // move the second note just past it
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
             
1590
             
1588
           case kDampDnXsFl:            
1591
           case kDampDnXsFl:            
1589
             if( dnp != NULL )
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
             else
1594
             else
1592
               dnp = np;
1595
               dnp = np;
1593
 
1596
 
1597
             
1600
             
1598
           case kDampUpXsFl:
1601
           case kDampUpXsFl:
1599
             if( dnp == NULL )
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
             else
1604
             else
1602
             {
1605
             {
1603
               dnp->duration = np->tick - dnp->tick;
1606
               dnp->duration = np->tick - dnp->tick;
1611
             
1614
             
1612
           case kDampUpDnXsFl:
1615
           case kDampUpDnXsFl:
1613
             if( dnp == NULL )
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
             else
1618
             else
1616
             {            
1619
             {            
1617
               dnp->duration = np->tick - dnp->tick;
1620
               dnp->duration = np->tick - dnp->tick;
1624
             
1627
             
1625
           case kSostDnXsFl:
1628
           case kSostDnXsFl:
1626
             if( snp != NULL )
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
             else
1631
             else
1629
               snp = np;
1632
               snp = np;
1630
             
1633
             
1634
             
1637
             
1635
           case kSostUpXsFl:
1638
           case kSostUpXsFl:
1636
             if( snp == NULL )
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
             else
1641
             else
1639
             {
1642
             {
1640
               snp->duration = np->tick - snp->tick;
1643
               snp->duration = np->tick - snp->tick;
2102
         {
2105
         {
2103
 
2106
 
2104
 
2107
 
2105
-          if( 0 /*mp->number==19*/ )
2108
+          if( 0 /*mp->number==27*/ )
2106
             printf("voice: %i %i loc:%i %i  tick:%i %i pitch:%i %i rval:%f %f idx:%i %i \n",
2109
             printf("voice: %i %i loc:%i %i  tick:%i %i pitch:%i %i rval:%f %f idx:%i %i \n",
2107
               np->voice->id, r->voice, 
2110
               np->voice->id, r->voice, 
2108
               np->locIdx ,  r->locIdx ,
2111
               np->locIdx ,  r->locIdx ,

Loading…
Cancel
Save