mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-04-18 07:43:42 +00:00
2024.02.23
This commit is contained in:
30
doc/CHANGES
30
doc/CHANGES
@@ -15377,7 +15377,7 @@ it is only called if the token was a clef.
|
|||||||
Fix: commented out the line in isclef() which zeros the octave_offset.
|
Fix: commented out the line in isclef() which zeros the octave_offset.
|
||||||
|
|
||||||
|
|
||||||
February 22 2024
|
February 23 2024
|
||||||
|
|
||||||
abcmidi bug:
|
abcmidi bug:
|
||||||
|
|
||||||
@@ -15387,7 +15387,33 @@ clef=treble^8 to be substituted for treble+8. abc2midi does not
|
|||||||
recognize these variants.
|
recognize these variants.
|
||||||
|
|
||||||
Fix: extended the function get_clef_octave_offset in music_utils.c
|
Fix: extended the function get_clef_octave_offset in music_utils.c
|
||||||
to recognize these variants.
|
to recognize these variants. Unfortunately, readword() called by
|
||||||
|
parseclef breaks the clef string when it encounters either a ^
|
||||||
|
or _. This was necessary to handle sharps and flats in the
|
||||||
|
K: declaration. (See note above April 8 2015.) It was necessary
|
||||||
|
to create a replacement function, readword_with_() which does
|
||||||
|
not break the string on underscore _ or caret ^.
|
||||||
|
|
||||||
|
The following test file was used to verify the correct operation
|
||||||
|
of this feature.
|
||||||
|
|
||||||
|
X:1
|
||||||
|
T: clef= variants
|
||||||
|
M:4/4
|
||||||
|
L:1/4
|
||||||
|
V:1 clef=treble-8
|
||||||
|
V:2 clef=treble_8
|
||||||
|
V:3 clef=treble+8
|
||||||
|
V:4 clef=treble^8
|
||||||
|
K:C
|
||||||
|
[V:1] z z C z |
|
||||||
|
[V:2] z z z C |
|
||||||
|
[V:3] C z z z |
|
||||||
|
[V:4] z C z z |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
abcMIDI : abc <-> MIDI conversion utilities
|
abcMIDI : abc <-> MIDI conversion utilities
|
||||||
|
|
||||||
midi2abc version 3.59 February 08 2023
|
midi2abc version 3.59 February 08 2023
|
||||||
abc2midi version 4.88 February 22 2024
|
abc2midi version 4.89 February 23 2024
|
||||||
abc2abc version 2.21 February 19 2024
|
abc2abc version 2.21 February 19 2024
|
||||||
yaps version 1.93 February 19 2024
|
yaps version 1.93 February 19 2024
|
||||||
abcmatch version 1.83 February 19 2024
|
abcmatch version 1.83 February 19 2024
|
||||||
|
|||||||
38
parseabc.c
38
parseabc.c
@@ -742,6 +742,33 @@ readword (word, s)
|
|||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
readword_with_ (word, s)
|
||||||
|
/* This version allows ^ and _ characters to be embedded in*/
|
||||||
|
/* the string. It is needed to parse clef=treble_8 or
|
||||||
|
/* clef=treble^8 . [SS] 2024-02-23 */
|
||||||
|
char word[];
|
||||||
|
char *s;
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
p = s;
|
||||||
|
i = 0;
|
||||||
|
/* [SS] 2015-04-08 */
|
||||||
|
while ((*p != '\0') && (*p != ' ') && (*p != '\t') && ((i == 0) ||
|
||||||
|
((*p != '='))))
|
||||||
|
{
|
||||||
|
if (i < 29)
|
||||||
|
{
|
||||||
|
word[i] = *p;
|
||||||
|
i = i + 1;
|
||||||
|
};
|
||||||
|
p = p + 1;
|
||||||
|
};
|
||||||
|
word[i] = '\0';
|
||||||
|
return (p);
|
||||||
|
}
|
||||||
void
|
void
|
||||||
lcase (s)
|
lcase (s)
|
||||||
/* convert word to lower case */
|
/* convert word to lower case */
|
||||||
@@ -965,7 +992,7 @@ parseclef (s, word, gotclef, clefstr, newclef, gotoctave, octave)
|
|||||||
{
|
{
|
||||||
int successful;
|
int successful;
|
||||||
skipspace (s);
|
skipspace (s);
|
||||||
*s = readword (word, *s);
|
*s = readword_with_ (word, *s);
|
||||||
successful = 0;
|
successful = 0;
|
||||||
if (casecmp (word, "clef") == 0)
|
if (casecmp (word, "clef") == 0)
|
||||||
{
|
{
|
||||||
@@ -978,7 +1005,7 @@ parseclef (s, word, gotclef, clefstr, newclef, gotoctave, octave)
|
|||||||
{
|
{
|
||||||
*s = *s + 1;
|
*s = *s + 1;
|
||||||
skipspace (s);
|
skipspace (s);
|
||||||
*s = readword (clefstr, *s);
|
*s = readword_with_ (clefstr, *s);
|
||||||
if (isclef (clefstr, newclef, gotoctave, octave, 1))
|
if (isclef (clefstr, newclef, gotoctave, octave, 1))
|
||||||
{
|
{
|
||||||
*gotclef = 1;
|
*gotclef = 1;
|
||||||
@@ -1743,13 +1770,6 @@ parsevoice (s)
|
|||||||
}
|
}
|
||||||
event_voice (num, s, &vparams);
|
event_voice (num, s, &vparams);
|
||||||
|
|
||||||
/*
|
|
||||||
if (gottranspose) printf("transpose = %d\n", vparams.transpose);
|
|
||||||
if (gotoctave) printf("octave= %d\n", vparams.octave);
|
|
||||||
if (gotclef) printf("clef= %s\n", vparams.clefstr);
|
|
||||||
if (gotname) printf("parsevoice: name= %s\n", vparams.namestring);
|
|
||||||
if(gotmiddle) printf("parsevoice: middle= %s\n", vparams.middlestring);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user