Explorar el Código

cmMidiFile.c : Note on messages now show sci. pitch in _cmMidiFilePrintMsg().

master
kevin hace 8 años
padre
commit
d49f626d0e
Se han modificado 1 ficheros con 17 adiciones y 4 borrados
  1. 17
    4
      cmMidiFile.c

+ 17
- 4
cmMidiFile.c Ver fichero

@@ -1380,15 +1380,28 @@ void _cmMidiFilePrintHdr( const _cmMidiFile_t* mfp, cmRpt_t* rpt )
1380 1380
 
1381 1381
 void _cmMidiFilePrintMsg( cmRpt_t* rpt, const cmMidiTrackMsg_t* tmp )
1382 1382
 {
1383
-  cmRptPrintf(rpt,"%8i %8i %8i %8i : ",   tmp->dtick, tmp->dmicro, tmp->atick, tmp->amicro );
1383
+  cmRptPrintf(rpt,"%8i %8i %8i %8i : ",
1384
+    tmp->dtick,
1385
+    tmp->dmicro,
1386
+    tmp->atick,
1387
+    tmp->amicro );
1384 1388
 
1385 1389
   if( tmp->status == kMetaStId )
1386
-    cmRptPrintf(rpt,"%s ", cmMidiMetaStatusToLabel(tmp->metaId)); 
1390
+  {
1391
+    cmRptPrintf(rpt,"%s ", cmMidiMetaStatusToLabel(tmp->metaId));
1392
+  }
1387 1393
   else
1388 1394
   {
1389
-    cmRptPrintf(rpt,"%4s %3i %3i %3i", cmMidiStatusToLabel(tmp->status),tmp->u.chMsgPtr->ch,tmp->u.chMsgPtr->d0,tmp->u.chMsgPtr->d1);
1390
-    
1395
+    cmRptPrintf(rpt,"%4s %3i %3i %3i",
1396
+      cmMidiStatusToLabel(tmp->status),
1397
+      tmp->u.chMsgPtr->ch,
1398
+      tmp->u.chMsgPtr->d0,
1399
+      tmp->u.chMsgPtr->d1);    
1391 1400
   }
1401
+
1402
+  if( cmMidiIsChStatus(tmp->status) && cmMidiIsNoteOn(tmp->status) && (tmp->u.chMsgPtr->d1>0) )
1403
+    cmRptPrintf(rpt," %4s ",cmMidiToSciPitch(tmp->u.chMsgPtr->d0,NULL,0));
1404
+    
1392 1405
   
1393 1406
   cmRptPrintf(rpt,"\n");
1394 1407
 }

Loading…
Cancelar
Guardar