2023.01.08

This commit is contained in:
Seymour Shlien
2023-01-08 11:10:49 -05:00
parent c981535a2a
commit d73b3682e1
5 changed files with 22 additions and 64 deletions

View File

@@ -1,2 +1,2 @@
January 06 2023
January 08 2023

View File

@@ -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.

View File

@@ -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

View File

@@ -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) { /* <note2> 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)

View File

@@ -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