|
From: | Richard Shann |
Subject: | Re: [Denemo-devel] Compiling denemo under fedora |
Date: | Mon, 14 Jul 2008 17:50:46 +0100 |
I am getting zero time to work on this just now, but your patch must go in, (I don't know how you manage to get curobj NULL, but if it can be done we must defend against it). Meanwhile, attached are the files that I have been playing with on a branch - there is some new debug output, and it parses the tiny junk.ly file, still with some problems in the result. My aim is to get it to put everything between the notes which it doesn't understand in to LilyPond directives. From what I can make out the nodes in the parse tree which are hold actual DenemoObjects have type==0. On Mon, 2008-07-14 at 18:04 +1000, Roy Rankin wrote: > Richard, > > So far the two issues I have found > > In lyparser.y, about line 680, lyerror is called for the case > "score_body lilypond_header" for the rule score_body. I think it is safe > to ignore this error (comment lyerror out) I've done this ignoring for another place (in scan_escaped_word), where I will want to pick up the text and put it in a LilyPond directive. The file loads ok with the (nonsensical) escaped word in it ignored. > As the lilypond_header > information has been processed and saved. > > So far I have not seen any other issues then that in parsing, but there > are issues loading the resulting parsed tree into the Denemo structures > which I am still working on trying to understand. It is I am quite sure to do with the initialization of gui->si, which has changed but is still very convoluted. It has changed because of things like being able to add staffs from a file to another file, which requires a different starting point for a load, and the presence of multiple DenemoScore objects in DenemoGUI. Essentially, Denemo is very unstable if there is not a minimally valid si any time the draw routine may be called. But the building of the Denemo from the parse tree seems to depend on si not having staffs, measure etc. What I have done setting si->thescore=NULL is just a quick hack, to test my suspicion, and indeed it gets the sequential notes loaded sequentially (without it they were getting put into a chord, and the music was being appended to the empty first measure). (BTW We will be able to resurrect that bit of the lyparser.y which loads additional score blocks - they will become subsequent movements. it will just need the nextsi to be added to the list kept in gui I think). I hope to have some time to return to this soon, but I hope the attached files will be some help to you. Richard > > Also in my first attempt to generate a lilypond file, Denemo core dumped. > This is fixed by the attached patch > > Regards, > Roy Rankin > > Richard Shann wrote: > > I have also been looking at parsing lilypond - I found a piece on > > Mutopia that I wanted to alter. > > Can we swap ideas? The main problem I found was that you need to set > > si->thescore=NULL > > before starting the parse. > > Richard > > > > > > On Mon, 2008-07-14 at 10:47 +1000, Roy Rankin wrote: > >> In order to take a look at Denemo reading its own lilypond files, I have > >> downloaded and compiled Denemo under Fedora 8. Although 6 months ago I > >> had the development version running, I found it a bit of effort to get > >> the current version compiled under Fedora 8. I hope this might help > >> others doing this. > >> > >> First I had to download Git. No problems, but I was not excited to add > >> another versioning package as I already had CVS and SVN. > >> > >> I then downloaded Denemo and found it now depends on aubio. I could not > >> find a Fedora package of aubio (this may be an issue for potential > >> Fedora users of Denemo), so I found the source tar ball for aubio. > >> > >> Aubio says it requires fftw3 and jack(optional), but it also depends on > >> alsa libsamplerate, libsndfile and lash. The first three packages have > >> different names in Fedora, new packages I needed to download to compile > >> aubio and Denemo: > >> > >> For Fedora 8 (9) load via yum > >> --- ------------ > >> fftw3 fftw-devel > >> jack jack-audio-connection-kit-devel > >> alsa alsa-lib-devel > >> libsamplerate libsamplerate-devel > >> libsndfile libsndfile-devel > >> flac flac-devel > >> lash lash-devel > >> portaudio portaudio-devel > >> > >> Anyway, I have finally compiled Denemo and I am looking at the Lilypond > >> parsing. > >> > >> Regards, > >> Roy Rankin > >> > >> > >> _______________________________________________ > >> Denemo-devel mailing list > >> address@hidden > >> http://lists.gnu.org/mailman/listinfo/denemo-devel > > > plain text document attachment (p1) > diff --git a/src/exportlilypond.c b/src/exportlilypond.c > index 5a1093c..ccb6f68 100644 > --- a/src/exportlilypond.c > +++ b/src/exportlilypond.c > @@ -1348,7 +1348,7 @@ outputStaff (DenemoGUI *gui, DenemoScore * si, > DenemoStaff * curstaffstruct, > g_string_append(figures, "\n"); > if(fakechords->len) > g_string_append(fakechords, "\n"); > - if(curobj->type!=LILYDIRECTIVE) /* if it ends in a lilydirective, > the user may want to choose their own > + if(curobj == NULL || curobj->type!=LILYDIRECTIVE) /* if it ends in > a lilydirective, the user may want to choose their own > barline style, let them */ > if (curmeasure->next) > g_string_append_printf(endstr, "|\n");
lylexer.l
Description: Text Data
lyparser.y
Description: Text Data
lyparser.h
Description: Text Data
lyparserfuncs.c
Description: Text Data
junk.ly
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |