2020.10.06

This commit is contained in:
Seymour Shlien
2020-10-06 08:23:57 -04:00
parent e9a36cc688
commit c0d3f540d5
4 changed files with 59 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
2020 August 09 2020
2020 October 06 2020

View File

@@ -13850,3 +13850,58 @@ matchsup.c, yapstree.c, and toabc.c: event_temperament declared as
event_temperament(*line) instead of event_temperament(**line).
parsekey() was split into two functions, parsekey() and process_microtones().
October 06 2020
abc2abc bug: abc2abc hangs when it is applied to a multivoiced file
with the -n option. The following file hangs abc2abc
X: 1
T: hangs abc2abc
M: 4/4
L: 1/4
K: C
V:1
C4|E4|D4|E4|
F4|G4|A4|B4|
V:2
D4|F4|G4|A4|B4|c4|
C4|B,4|
eg
abc2abc hanger.abc -n 3
X:1
T:hangs abc2abc
M:4/4
L:1/4
K:C
V:1
C4|E4|D4|
E4|F4|G4|A4|
(Hangs when it encounters the V:2.)
Analysis:
The program hangs in a infinite loop
331 while (v->bars_complete > v->bars_remaining) {
in the function complete_bars in toabc.c
v->bars_complete is 2, v->bars_remaining is -1 and bars_done is always 0.
If you insert a comment before V:2, the program runs normally.
Fix: insert the line
close_newabc(); /* [SS] 2020-10-06 */
in the function event_voice().
Explanation:
v->bars_complete, v->bars_remaining are elements of a voice structure
which has room for up to 30 voices. When V:2 is encountered, the
program automatically calls event_voice and switches to a new voice;
however, the program has not finished with voice 1 and the voice
structure gets corrupted during the switch. Event_voice was modified
so that any remaining data in voice 1 is released before the switch.

View File

@@ -2,7 +2,7 @@ abcMIDI : abc <-> MIDI conversion utilities
midi2abc version 3.46 June 22 2020
abc2midi version 4.42 October 01 2020
abc2abc version 2.09 October 01 2020
abc2abc version 2.10 October 10 2020
yaps version 1.79 October 01 2020
abcmatch version 1.74 October 01 2020
midicopy version 1.36 June 04 2019

View File

@@ -21,7 +21,7 @@
/* back-end for outputting (possibly modified) abc */
#define VERSION "2.09 October 01 2020 abc2abc"
#define VERSION "2.10 October 06 2020 abc2abc"
/* for Microsoft Visual C++ 6.0 or higher */
#ifdef _MSC_VER
@@ -1213,6 +1213,7 @@ struct voice_params *vp;
{
char output[300]; /* [SS] 2017-10-09 2017-10-11 2018-12-27*/
if (xinbody) {
close_newabc(); /* [SS] 2020-10-06 */
next_voice = setvoice(n);
};
if (!must_emit_voice(n)) { /* [PHDM] 2013-03-08 */