mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-04-15 22:33:42 +00:00
2021.05.21
This commit is contained in:
28
parseabc.c
28
parseabc.c
@@ -1261,7 +1261,17 @@ static void process_microtones (int *parsed, char word[],
|
||||
modmicrotone[j].denom = b;
|
||||
/* printf("%c microtone = %d/%d\n",modmap[j],modmicrotone[j].num,modmicrotone[j].denom); */
|
||||
}
|
||||
} /* finished ^ = _ */
|
||||
} /* finished ^ = _ */
|
||||
|
||||
static void set_voice_from_master(int voice_num)
|
||||
{
|
||||
voice_context_t *current_voice;
|
||||
|
||||
current_voice = &voicecode[voice_num - 1];
|
||||
copy_timesig(¤t_voice->timesig, &master_timesig);
|
||||
copy_clef(¤t_voice->clef, &master_clef);
|
||||
current_voice->unitlen = master_unitlen;
|
||||
}
|
||||
|
||||
int
|
||||
parsekey (str)
|
||||
@@ -1345,7 +1355,7 @@ parsekey (str)
|
||||
while (*s != '\0')
|
||||
{
|
||||
parsed = parseclef (&s, word, &gotclef, clefstr, &newclef, &cgotoctave, &coctave);
|
||||
if (gotclef) {
|
||||
if (parsed) { /* [JA] 2021-05-21 changed (gotclef) to (parsed) */
|
||||
/* make clef an attribute of current voice */
|
||||
if (inhead) {
|
||||
copy_clef (&master_clef, &newclef);
|
||||
@@ -1550,16 +1560,6 @@ parsekey (str)
|
||||
return (gotkey);
|
||||
}
|
||||
|
||||
static void set_voice_from_master(int voice_num)
|
||||
{
|
||||
voice_context_t *current_voice;
|
||||
|
||||
current_voice = &voicecode[voice_num - 1];
|
||||
copy_timesig(¤t_voice->timesig, &master_timesig);
|
||||
copy_clef(¤t_voice->clef, &master_clef);
|
||||
current_voice->unitlen = master_unitlen;
|
||||
}
|
||||
|
||||
void
|
||||
parsevoice (s)
|
||||
char *s;
|
||||
@@ -2306,10 +2306,12 @@ parsefield (key, field)
|
||||
* if L: fields was missing in the header.
|
||||
*/
|
||||
resolve_unitlen();
|
||||
}
|
||||
foundkey = parsekey (place); /* [JA] 2021.05.21 parsekey called before set_voice_from_master(1) */
|
||||
if (inhead) {
|
||||
/* set voice parameters using values from header */
|
||||
set_voice_from_master(1);
|
||||
}
|
||||
foundkey = parsekey (place);
|
||||
if (inhead || inbody) {
|
||||
if (foundkey)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user