From 8079788c12336e75eb48e41fcf6523cb449f6d67 Mon Sep 17 00:00:00 2001 From: Seymour Shlien Date: Mon, 26 Apr 2021 11:48:42 -0400 Subject: [PATCH] 2021.04.26 --- VERSION | 2 +- doc/CHANGES | 10 ++++++++++ doc/readme.txt | 2 +- genmidi.c | 4 ++-- store.c | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index b0ff5f5..26c061c 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -2021 March 30 2021 +2021 April 26 2021 diff --git a/doc/CHANGES b/doc/CHANGES index 4dd5780..524a7bd 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -14152,3 +14152,13 @@ in the chord [bc] are treated as if they were one note. Otherwise the measure would be too short (B is shrunk to make room for b and c) and there could be a loss of synchronization between the voices. +April 26 2021 + +abc2midi: bar line alignment. The feature introduced in Mar 18 2019, +had a few issues. If the bar ends with a rest, the number of beats +is incorrect because there is no MIDI message to indicate a rest other +than a gap between a NOTEOFF and the following NOTEON and barlines +do not exist in midi files. Using a cumulative beat count does not +detect the possibility that the bar lines can realign because of +two errors cancelling out. As an experiment, I save only the bar size. + diff --git a/doc/readme.txt b/doc/readme.txt index 4245cc8..dafab9b 100644 --- a/doc/readme.txt +++ b/doc/readme.txt @@ -1,7 +1,7 @@ abcMIDI : abc <-> MIDI conversion utilities midi2abc version 3.47 November 01 2020 -abc2midi version 4.51 March 30 2021 +abc2midi version 4.52 April 26 2021 abc2abc version 2.12 October 19 2020 yaps version 1.86 December 10 2020 abcmatch version 1.78 March 27 2021 diff --git a/genmidi.c b/genmidi.c index c06562e..8ee610d 100644 --- a/genmidi.c +++ b/genmidi.c @@ -518,7 +518,7 @@ int pass; { char msg[80]; - if (barno >= 0 && barno < 1024 && pass == 1) barloc[barno] = tracklen; + if (barno >= 0 && barno < 1024 && pass == 1) barloc[barno] = bar_num; /*[SS] 2021-04-26 */ if (barchecking) { /* only generate these errors once */ if (noteson && (partrepno == 0)) { @@ -3527,7 +3527,7 @@ void dump_barloc (FILE *diaghandle, int trkno) int i; fprintf(diaghandle,"track = %d voice = %d type = %d number of bars = %d\n",trkno,trackdescriptor[trkno].voicenum,trackdescriptor[trkno].tracktype,barno); for (i=0;i