diff --git a/VERSION b/VERSION index 5b3cc03..95fd6a3 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -January 06 2023 +January 08 2023 diff --git a/doc/CHANGES b/doc/CHANGES index 3683eb8..dca3e72 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -15021,5 +15021,15 @@ 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. +January 08 2023 + +abc2abc should replicate the score=, shift=, sound=, and instrument= +directives but otherwise ignore them. + +Fix: parseSoundScore() in parseabc.c does nothing if it is +called from abc2abc and return 0. The function parseother(), +which is called from parsevoice() or parsekey(), will output +all other directives in the K: or V: command. + diff --git a/doc/readme.txt b/doc/readme.txt index 7b4f2bc..1dae5da 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.82 January 06 2022 -abc2abc version 2.18 June 14 2022 -yaps version 1.92 January 06 2022 +abc2midi version 4.82 January 06 2023 +abc2abc version 2.19 January 08 2023 +yaps version 1.92 January 06 2023 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 13c46f5..5532b67 100644 --- a/parseabc.c +++ b/parseabc.c @@ -1024,7 +1024,8 @@ parsetranspose (s, word, gottranspose, transpose) int parseSoundScore (char **s, char *word, int *gottranspose, - int *transpose) + int *transpose + ) /* parses sound, score, instrument, and shift * according to Hudson Lacerda's pseudo code file * doc/hudsonshift.txt. @@ -1040,9 +1041,11 @@ transp_score = 0; if (casecmp(word,"sound") != 0 && casecmp(word,"shift") != 0 && casecmp(word,"instrument") != 0 - && casecmp(word,"score") != 0 - ) - return 0; + && casecmp(word,"score") != 0) return 0; + +if ( fileprogram == ABC2ABC) { + return 0; + } skipspace (s); if (**s != '=') @@ -1117,61 +1120,6 @@ if (**s != '=') -/* parsesound has been replaced with parseSoundScore */ -/* [SS] 2021-10-11 */ -int parsesound (s, word, gottranspose, transpose) -/* parses string sound = - shift = - instrument = note1note2 or note1/note2 - for parsekey() or parsevoice() - and returns the transpose value -*/ - char **s; - char *word; - int *gottranspose; - int *transpose; - { - int p1,p2; - if (casecmp(word,"sound") != 0 - && casecmp(word,"shift") != 0 - && casecmp(word,"instrument") != 0 - ) - return 0; - skipspace (s); - if (**s != '=') - { - event_error ("sound must be followed by '='"); - return 0; - } else { - *s = *s + 1; - skipspace (s); - p1 = note2midi (s,word); - printf("p1 midi note = %d\n",p1); - p2 = note2midi (s,word); - printf("p2 midi note = %d\n",p2); - - if (p2 == p1 || p2 == 0) { - *transpose = 72 - p1; /* [SS] 2022.12.30 */ - } - if (casecmp(word,"instrument") == 0) { /*2022.12.27 */ - *transpose = p1 - p2; /* [SS] 2022.02.18 2022.04.27 */ - if (p2 == 0) { /* is missing */ - *transpose = p1 - 72; - } - if (p2 == p1 || p2 == 0) { - *transpose = p1 - 72; /* [SS] 2022.12.30 */ - } - if (p2 == 72 && fileprogram == ABC2MIDI) { - *transpose = 0; - } /* [SS] 2022.12.30 */ - } else { - *transpose = p2 - p1; /* [SS] 2022.02.18 2022.04.27 */ - } - *gottranspose = 1; - printf("p1 = %d p2 = %d transpose = %d\n",p1,p2,*transpose); - } - return 1; - } int parseoctave (s, word, gotoctave, octave) diff --git a/toabc.c b/toabc.c index 05c2d0d..74cb9ee 100644 --- a/toabc.c +++ b/toabc.c @@ -21,7 +21,7 @@ /* back-end for outputting (possibly modified) abc */ -#define VERSION "2.18 June 14 2022 abc2abc" +#define VERSION "2.19 Jan 08 2022 abc2abc" /* for Microsoft Visual C++ 6.0 or higher */ #ifdef _MSC_VER