denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Import LilyPond


From: Richard Shann
Subject: Re: [Denemo-devel] Import LilyPond
Date: Thu, 03 Jul 2008 09:22:07 +0100

On Wed, 2008-07-02 at 15:29 -0500, Jeremiah Benham wrote:
> On Wed, 2008-07-02 at 17:52 +0100, Richard Shann wrote:
> > On Wed, 2008-07-02 at 09:11 +0100, Richard Shann wrote:
> > > 
> > > Are there any LilyPond files that can be imported at present? I would
> > > guess not. If not we should make sure Denemo does not offer to do it.
> > I've fixed this so that Denemo does not offer this format - you can
> > still try, though.
> 
> This is disappointing. It was working a few releases back.  I didn't
> write the code
I did. Originally that is. But then I had a few years away while I
switched careers and I only have an outline knowledge of what I did with
it. (It was creating a tree representing the LilyPond file with links to
the DenemoObjects in a DenemoScore. Each time you edited in Denemo the
corresponding bit of the LilyPond file (tree) was updated. Denemo was
getting released so slowly and LilyPond so quickly that it never stood a
chance.)
What happened to it since I'm not so sure, I think it critically depends
on the LilyPond output generated by Denemo - everytime that changes you
would need to find the bits in the parser and fix them.
 In principle you ought to be able to locate bits of music in a LilyPond
file and dump them on to Denemo staffs, but it would be difficult to do
this. I guess it was only handling untouched Denemo output. But
untouched Denemo output is the one thing you don't need it for - you
already have the Denemo format.
I think it might be more useful to be able to cut and paste the *notes*
from an arbitrary LilyPond file to a Denemo staff. This is because the
bulk of a LilyPond file is music notes, and these can be translated into
Denemo notes fairly easily (just by starting the parser at Music rather
than at the top). So you would be able to take something like

a8 b c'4 \times 2/3 {e8 f g} dis <<ees c-2>>...... fis'' gis'' \bar ":|"

select it and hit paste-lilypond and it would parse the text selection
inserting the notes at the current object (and putting LilyPond
directives for the "\times 2/3 {", "-2" \bar ":|" and "}" bits, which
are just unknown text to the parser). This would then become editable
Denemo music, which would print correctly in LilyPond.
In this way you could take some LilyPond file and get the bulk typing
into Denemo without trying to parse the (infinite) variety of \context
\paper \book \etc. etc. things into corresponding Denemo structures, if
any. Once you had done that you could edit the music using Denemo,
instead of textually. (E.g. you could add an accompaniment, while seeing
the notes that the accompaniment was for on the DenemoStaff above).
But I won't be able to get to this for a while :-(
Richard







reply via email to

[Prev in Thread] Current Thread [Next in Thread]