On Sat, May 12, 2001 at 06:20:35AM -0700, David J. Roundy wrote:
>
> Denemo was written for an older version of lily, in which those semicolons
> were supposed to be there. As I see it, there are two ways one could go
> about fixing it. One would be to make denemo output good 1.4 lily. The
> other would be to make denemo call convert-ly. I experimented with the
> former for a while, and just by removing a lot of semicolons from
> "exportmudela.c" I was able to get the playback working. However, I'm not
> sure whether or not I broke the import of lily files.
>
> I also ran into a bug in which notes below middle c were written about 10
> octaves too high, and at that point I stopped working on it, and decided
> I'd stick with editing lily by hand. But you should be able to just remove
> all those semicolons and get it to work.
Here's a patch to make denemo support lily 1.4. It also deals with the
fact that denemo assumed a gchar was a signed char, and on my system it
isn't, which is what gave bad octaves.
--
David Roundy
http://civet.berkeley.edu/droundy/
--- denemo-0.5.5/exportmudela.c Thu Sep 14 21:36:48 2000
+++ /usr/src/denemo-0.5.5/exportmudela.c Sat May 12 08:04:09 2001
@@ -157,7 +157,7 @@
gint prevduration, prevnumdots;
gint octave, enshift;
gint noteheadtype;
- gchar mid_c_offset;
+ signed char mid_c_offset;
GList *curtone;
GString *filename = g_string_new (thefilename);
gint i, j, last, k;
@@ -180,9 +180,9 @@
/* header stuff */
fprintf (fp, "\\header{\n");
- fprintf (fp, "\ttitle = \"%s\";\n", si->title->str);
- fprintf (fp, "\tsubtitle = \"%s\";\n", si->subtitle->str);
- fprintf (fp, "\tcomposer = \"%s\";\n", si->composer->str);
+ fprintf (fp, "\ttitle = \"%s\"\n", si->title->str);
+ fprintf (fp, "\tsubtitle = \"%s\"\n", si->subtitle->str);
+ fprintf (fp, "\tcomposer = \"%s\"\n", si->composer->str);
fprintf (fp, "}\n\n");
fprintf (fp, "\\include \"paper16.ly\"\n");
@@ -210,7 +210,7 @@
curstaffstruct->midi_instrument->str);
/* Time signature */
- fprintf (fp, "\t\\time %d/%d;\n", curstaffstruct->stime1,
+ fprintf (fp, "\t\\time %d/%d\n", curstaffstruct->stime1,
curstaffstruct->stime2);
cur_stime1 = curstaffstruct->stime1;
@@ -226,12 +226,12 @@
fprintf (fp, " \\minor");
else
fprintf (fp, " \\major");
- fprintf (fp, ";\n");
+ fprintf (fp, "\n");
/* Determine the clef */
determineclef (curstaffstruct->sclef, &clef);
- fprintf (fp, "\t\\clef %s;\n", clef);
+ fprintf (fp, "\t\\clef %s\n", clef);
curmeasurenum = 0;
curmeasure = curstaffstruct->measures;
@@ -358,7 +358,7 @@
break;
case CLEF:
determineclef (curobj->u.clefval.type, &clef);
- fprintf (fp, "\\clef %s; ", clef);
+ fprintf (fp, "\\clef %s ", clef);
break;
case KEYSIG:
determinekey (curobj->u.keyval.isminor ?
@@ -369,10 +369,10 @@
fprintf (fp, " \\minor");
else
fprintf (fp, " \\major");
- fprintf (fp, "; ");
+ fprintf (fp, " ");
break;
case TIMESIG:
- fprintf (fp, "\\time %d/%d; ", curobj->u.timeval.time1,
+ fprintf (fp, "\\time %d/%d ", curobj->u.timeval.time1,
curobj->u.timeval.time2);
cur_stime1 = curobj->u.timeval.time1;
cur_stime2 = curobj->u.timeval.time2;
@@ -414,7 +414,7 @@
if (curmeasure->next)
fprintf (fp, "|\n");
else
- fprintf (fp, "\\bar \"|.\";\n");
+ fprintf (fp, "\\bar \"|.\"\n");
} /* Done with this staff */
fprintf (fp, "}\n");
@@ -460,7 +460,7 @@
"\t\\paper {\n"
"\t}\n"
"\t\\midi {\n"
- "\t\t\\tempo 4 = %d;\n"
+ "\t\t\\tempo 4 = %d\n"
"\t}\n"
"}\n", si->tempo);