denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Import filter for CapXML


From: Richard Shann
Subject: Re: [Denemo-devel] Import filter for CapXML
Date: Tue, 14 Apr 2015 09:19:20 +0100

On Mon, 2015-04-13 at 22:33 +0200, Andreas Schneider wrote:
> Am 13.04.2015 um 10:12 schrieb Richard Shann:
> > The main problem with basing your import on Denemo's XML import (ie the
> > file src/core/importxml.c rather than src/export/importmusicxml.c) is
> > the obscurities that you will see in src/core/importxml.c  starting at
> > the main function importXML() and the associated parseMovement() just
> > before - the creation of staffs, insertion of notes etc is all
> > accompanied by calls to functions to set up things for the display
> > appearance which are poorly understood.
> > 
> > What might be good is to parse CapXML and write Denemo's XML saving that
> > to a temporary file and then load it. This would mean that all the
> > obscure calls to staff_beams_and_stems_dirs () and a half-a-dozen others
> > continue to be done by src/core/importxml.c and not repeated in your new
> > importer. There is some obsolete fields in src/core/importxml.c which
> > are no longer present in modern .denemo files, so these should be
> > skipped - mostly I hope they are marked as "backward compatibility".
> 
> So do you think it would be better/easier to use the Scheme approach?

I could be of more help if you decide to go with generating a scheme
script as I have done this fairly recently. I didn't write the denemo
xml format so I know less about it - besides some obsolete forms it has
an overly-sophisticated method of giving staffs and voices id's and then
looking them up later. It is a more abstract way of describing the
Denemo music data which would be appropriate if there were ambitions for
the denemo format to be used by other programs.
Using the scheme script to build the music will be more robust as the
rule is never to change the semantics of a Denemo scheme procedure - we
just create a new one, while the .denemo format does evolve slowly. 

So practicality and elegance are negatively correlated between the three
methods we have come up with!

Richard

> 
> Andreas
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

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