mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-06 06:55:06 +00:00
2020.10.06
This commit is contained in:
55
doc/CHANGES
55
doc/CHANGES
@@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
3
toabc.c
3
toabc.c
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user