[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: |
Mon, 13 Apr 2015 09:12:26 +0100 |
On Sun, 2015-04-12 at 21:22 +0200, Andreas Schneider wrote:
> I had a look at export/importmusicxml.{h,c} as well as
> core/importxml.{h,c}. The MusicXML import creates a Scheme script that
> is then executed, while loading of Denemo's XML files uses the Denemo
> gui object directly. What is the reason behind that different behaviour?
The loading of Denemo's XML was written before the Scheme extension
facility, so that wasn't an option.
> At the moment, I would favour importing CapXML similar to loading the
> Denemo files. The CapXML format has a <layout> section where the score
> layout (number of staffs, their instruments, etc.) is defined. I would
> parse that first. Then there is a <systems> section that contains the
> actual music.
That seems much more sensible than MusicXML's obscure way of jumbling
everything up. On the parse of <layout> you could issue d-NewStaffs (or
whatever the syntax is) and then on the second you could populate each
staff with the music.
>
> What do you think of that approach? I have no insight into Denemo's
> internals.
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".
HTH
Richard
>
> Andreas
>
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel
- Re: [Denemo-devel] Import filter for CapXML, (continued)
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/04
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/06
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/07
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/07
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/07
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/08
- Re: [Denemo-devel] MIDI import, Andreas Schneider, 2015/04/08
- Re: [Denemo-devel] MIDI import, Richard Shann, 2015/04/08
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/09
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/12
- Re: [Denemo-devel] Import filter for CapXML,
Richard Shann <=
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/13
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/14
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/14
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/14
- Re: [Denemo-devel] Import filter for CapXML, Andreas Schneider, 2015/04/14
- Re: [Denemo-devel] Import filter for CapXML, Richard Shann, 2015/04/14
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: [Denemo-devel] The scheme you posted in the MIDI bug, Richard Shann, 2015/04/16