diff --git a/VERSION b/VERSION index f17a1b2..5b3cc03 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -January 05 2022 +January 06 2023 diff --git a/doc/CHANGES b/doc/CHANGES index 561a2cd..3683eb8 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -14995,3 +14995,31 @@ which describes how all the transpose directives should work. This code was implemented in parseSoundScore() which now replaces parseSound(). It also fixes yaps. + +January 06 2023 + +abcmidi ignores sound=cD in the following example. + +X:2 +T: sound + score +M: 4/4 +K:C +V:1 sound=cD score=FD +cdec z4 +V:2 +z4 c4 + +Analysis: *transpose is set to -10 by parseSoundScore when it +processes sound=CD but when parseSoundScore is called again +with score=FD it sets *transpose to 0, the initialized value +of transp_sound. The last value of *transpose is used by +event_voice. + +Fix: if parseSoundScore is called by the abc2midi executable, +then *transpose is not set to transp_sound when the score= +directive is processed. There is a similar issue when +parseSoundScore is called by yaps. We do not want to set +*transpose to transp_score when the sound= is processed. + + + diff --git a/doc/readme.txt b/doc/readme.txt index 78c7916..7b4f2bc 100644 --- a/doc/readme.txt +++ b/doc/readme.txt @@ -1,9 +1,9 @@ abcMIDI : abc <-> MIDI conversion utilities midi2abc version 3.58 December 09 2022 -abc2midi version 4.80 December 30 2022 +abc2midi version 4.82 January 06 2022 abc2abc version 2.18 June 14 2022 -yaps version 1.90 June 14 2022 +yaps version 1.92 January 06 2022 abcmatch version 1.82 June 14 2022 midicopy version 1.38 May 06 2022 midistats version 0.58 December 09 2022 diff --git a/parseabc.c b/parseabc.c index f6d18b4..13c46f5 100644 --- a/parseabc.c +++ b/parseabc.c @@ -1102,8 +1102,14 @@ if (**s != '=') *gottranspose = 1; - if (fileprogram == ABC2MIDI) *transpose = transp_sound; - if (fileprogram == YAPS) *transpose = transp_score; + if (fileprogram == ABC2MIDI) { + /* [SS] 2023.01.06 */ + if (casecmp(word,"score") != 0) *transpose = transp_sound; + } + if (fileprogram == YAPS) { + /* [SS] 2023.01.06 */ + if (casecmp(word,"sound") != 0) *transpose = transp_score; + } return(1); } } diff --git a/store.c b/store.c index afdc0c2..7d11f0e 100644 --- a/store.c +++ b/store.c @@ -186,7 +186,7 @@ int main() */ -#define VERSION "4.81 January 05 2023 abc2midi" +#define VERSION "4.82 January 06 2023 abc2midi" /* enables reading V: indication in header */ #define XTEN1 1 diff --git a/yapstree.c b/yapstree.c index 5ab20e5..7d158a8 100644 --- a/yapstree.c +++ b/yapstree.c @@ -22,7 +22,7 @@ /* yapstree.c - back-end for abc parser. */ /* generates a data structure suitable for typeset music */ -#define VERSION "1.91 January 05 2023 yaps" +#define VERSION "1.92 January 06 2023 yaps" #include #ifdef USE_INDEX #define strchr index