Browse Source

cmScore.c : Changed invalid MIDI velocity from fatal error to a warning.

master
kevin larke 7 years ago
parent
commit
59dbe1df10
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      app/cmScore.c

+ 6
- 1
app/cmScore.c View File

@@ -745,7 +745,12 @@ cmScRC_t _cmScParseNoteOn( cmSc_t* p, unsigned rowIdx, cmScoreEvt_t* s, unsigned
745 745
     return cmErrMsg(&p->err,kSyntaxErrScRC,"Unable to convert the scientific pitch '%s' to a MIDI value. ");
746 746
 
747 747
   if((midiVel = cmCsvCellUInt( p->cH,rowIdx,kD1ColScIdx)) >= kInvalidMidiVelocity )
748
-    return cmErrMsg(&p->err,kSyntaxErrScRC,"An invalid MIDI velocity (%i) was encountered.",midiVel);
748
+  {
749
+    //return cmErrMsg(&p->err,kSyntaxErrScRC,"An invalid MIDI velocity (%i) was encountered.",midiVel);
750
+    midiVel = 64;
751
+    cmErrWarnMsg(&p->err,kSyntaxErrScRC,"An invalilid MIDI velocity (%i) was encountered.",midiVel);
752
+  }
753
+    
749 754
   
750 755
   // get the sec's field - or DBL_MAX if it is not set
751 756
   if((secs =  cmCsvCellDouble(p->cH, rowIdx, kSecsColScIdx )) == DBL_MAX) // Returns DBL_MAX on error.

Loading…
Cancel
Save