diff --git a/VERSION b/VERSION index 66b8484..653acdb 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -2021 May 25 2021 +2021 June 24 2021 diff --git a/doc/CHANGES b/doc/CHANGES index 03134fc..cb9304b 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -14251,3 +14251,29 @@ time signatures like M: none or M:7/8. The code for dealing with 3/2, 3/4, 3/8 ... time signatures was improved. +June 24 2021 + +abc2midi bug: in the following sample + +X:1 +T: octave +M: 2/4 +L: 1/8 +K: none octave=1 +V:1 +C4| +V:2 +C4| + +The octave=1 applies only to voice 1 and does not +act as global variable applying to both voices. + +Analysis: event_octave either sets global.octaveshift or +v.octaveshift depending upon the variable pastheader. Pastheader +was set to 1 by headerprocess() in event_key() prior to calling +event_octave which prevented global.octaveshift from being set. + +Fix: moved headerprocess(), getvoicecontext(), etc to after +calling event_octave(). + + diff --git a/doc/readme.txt b/doc/readme.txt index 21c8f2c..73e54a9 100644 --- a/doc/readme.txt +++ b/doc/readme.txt @@ -1,7 +1,7 @@ abcMIDI : abc <-> MIDI conversion utilities midi2abc version 3.47 May 25 2021 -abc2midi version 4.57 May 25 2021 +abc2midi version 4.58 June 24 2021 abc2abc version 2.15 May 25 2021 yaps version 1.87 May 25 2021 abcmatch version 1.79 May 25 2021 @@ -14,7 +14,7 @@ J.R.Allwright@westminster.ac.uk University of Westminster, London, UK -November 2020 +June 2021 Seymour Shlien Ottawa, Canada diff --git a/store.c b/store.c index 2b59f7f..f5acb5d 100644 --- a/store.c +++ b/store.c @@ -186,7 +186,7 @@ int main() */ -#define VERSION "4.57 May 25 2021 abc2midi" +#define VERSION "4.58 June 24 2021 abc2midi" /* enables reading V: indication in header */ #define XTEN1 1 @@ -5957,11 +5957,13 @@ int explict; copymap(&global); sf = sharps; mi = minor; - headerprocess(); - v = getvoicecontext(1); - if (!inbody) v1index = notes; /* save position in case of split voice */ - }; + /* [SS] 2021-06-24 + ***headerprocess(); + + ***v = getvoicecontext(1); + ***if (!inbody) v1index = notes; /* save position in case of split voice */ + if (gotclef) { event_octave(clef->octave_offset, 0); @@ -5969,6 +5971,11 @@ int explict; if (gotoctave) { event_octave(octave,0); }; + /* [SS] 2021-06-24 */ + headerprocess(); + v = getvoicecontext(1); + if (!inbody) v1index = notes; /* save position in case of split voice */ + }; }; }