From abf7e15301f0656b8f5a4724a547bb8249af52aa Mon Sep 17 00:00:00 2001 From: sshlien Date: Wed, 22 Jan 2025 08:14:45 -0500 Subject: [PATCH] 2025.01.22 --- VERSION | 2 +- doc/CHANGES | 8 +++++--- doc/midi2abc.1 | 9 ++++++++- doc/readme.txt | 2 +- midi2abc.c | 15 +++++++++++++-- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 33edefd..5de0bea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -January 20 2025 +January 22 2025 diff --git a/doc/CHANGES b/doc/CHANGES index 966efd4..ebd9e46 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -15579,10 +15579,12 @@ occurring outside of microtones. January 20 2025 +January 22 2025 midi2abc -Added new option -midinotes for listing the notes (including pitchbends) -present in the midi file. This is useful for checking the accuracy -of abc2midi or the abc notation representation. +Added new options -midinotes and -midinotes-brief for listing the +notes (including pitchbends) present in the midi file. This is +useful for checking the accuracy of abc2midi or the abc notation +representation. diff --git a/doc/midi2abc.1 b/doc/midi2abc.1 index 943a6a4..748dc9a 100644 --- a/doc/midi2abc.1 +++ b/doc/midi2abc.1 @@ -9,7 +9,7 @@ midi2abc \-f \fIinfile\fP [\-xa] [\-ga] [\-k \fIkey\fP] [\-c \fIchannel\fP] [\-obpl] [\-bpl \fibars\fP] [\-bps \fPbars\fP] [\-o \fIfilename\fP] [\-s] [\-sr \fiunits\fP] [\-sum] [\-nb] [\-nt] [\-splitvoices] [\-midigram] [\-mftext] [-mftextpulses] [\-nogr] [\-title \fistring\fP] -[\-origin \fistring\fP][\-midinotes] +[\-origin \fistring\fP][\-midinotes][\-midinotes-brief] @@ -178,6 +178,13 @@ Like -mftext, this option outputs the notes present in the midi file; however, the output is more consise (note-on and noteoff are combined) in order to make it easier to compare one or more midi files using dif, diffuse, or winmerge. +The time as beat number, track number, channel number, pitch, +and pitch bend are presented. + +.TP +.B -midinotes-brief +Similar to -midinotes except only the pitch and pitch bend +values are presented. diff --git a/doc/readme.txt b/doc/readme.txt index dce0e5e..a463b8a 100644 --- a/doc/readme.txt +++ b/doc/readme.txt @@ -1,6 +1,6 @@ abcMIDI : abc <-> MIDI conversion utilities -midi2abc version 3.60 January 20 2025 +midi2abc version 3.61 January 22 2025 abc2midi version 4.99 January 12 2025 abc2abc version 2.22 April 30 2024 yaps version 1.94 April 30 2024 diff --git a/midi2abc.c b/midi2abc.c index 9b2ec4a..2d195cb 100644 --- a/midi2abc.c +++ b/midi2abc.c @@ -45,7 +45,7 @@ * based on public domain 'midifilelib' package. */ -#define VERSION "3.60 January 17 2025 midi2abc" +#define VERSION "3.61 January 22 2025 midi2abc" #include /* Microsoft Visual C++ Version 6.0 or higher */ @@ -963,8 +963,9 @@ if (start_time >= 0) /* printf("%6.2f %6.2f %d %d %d %d\n", (double) start_time/(double) division, (double) Mf_currtime/(double) division, trackno+1, chan +1, pitch,chanbend[chan+1]); */ - printf("%6.2f %d %d %d %d\n", + if (midiprint == 3) printf("%6.2f %d %d %d %d\n", (double) start_time/(double) division, trackno+1, chan +1, pitch,chanbend[chan+1]); + else printf("%d %d\n", pitch,chanbend[chan+1]); if(Mf_currtime > last_tick[chan+1]) last_tick[chan+1] = Mf_currtime; } @@ -3239,6 +3240,11 @@ int argc; { midiprint = 3; } + arg = getarg("-midinotes-brief",argc,argv); + if (arg != -1) + { + midiprint = 4; + } usesplits = 0; @@ -3477,6 +3483,7 @@ int argc; printf(" -origin Adds O: field containing string\n"); printf(" -midigram Prints midigram \n"); printf(" -midinotes Prints pitches with bends\n"); + printf(" -midinotes-brief Prints only pitches and bends\n"); printf(" -mftext mftext output in beats\n"); printf(" -mftextpulses mftext output in midi pulses\n"); printf(" -mftext mftext output in seconds\n"); @@ -3748,6 +3755,10 @@ int argc; initfunc_for_midipitch(); midigram(argc,argv); break; + case 4: initfunc_for_midinotes(); + initfunc_for_midipitch(); + midigram(argc,argv); + break; default: midi2abc(argc,argv); }