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, 07 Apr 2015 10:05:47 +0100

On Mon, 2015-04-06 at 23:02 +0200, Andreas Schneider wrote:
> Am 04.04.2015 um 17:13 schrieb Richard Shann:
> > Another possibility would be to improve Denemo's musicXML import - the
> > sort of trouble I see is things like time signature changes and double
> > barlines getting repeated, and problems with upbeats (anacrusis...). I
> > stopped working on it once it was importing the bulk data as the sort of
> > score I import doesn't have much if any time signature changes (etc) and
> > there is only one upbeat per movement (etc).
> > Can you send me a problematic example of musicXML output from MuseScore?
> > If it is bad output from MuseScore then directly importing Capella files
> > might be a way to go as I guess Capella is storing information in an
> > easier to read form than musicXML. It is easier to write bad musicXML
> > than to try to read any sort of musicXML - did you try reading back the
> > musicXML into MuseScore?
> 
> As you suggested, I re-imported the MusicXML into MuseScore, and it
> looks like it's not much different from what Denemo gives -- apart from
> several additional empty staffs that Denemo produces (in fact three for
> each real staff). I'll send you the score per PM.

The empty staffs could either be fixed by analysing the problem and
fixing the C code if it is not an error by Musescore in the musicXML
generation or, perhaps more simply by simply running a command
(d-DeleteUselessStaffs) after the import.

That command doesn't exist at the moment, but I see that there is
(d-DeleteEmptyMeasures) already, it could take parameters to tell it to
do more ...
the code looks like this:

;;;DeleteEmptyMeasures    
(while (and (EmptyMeasure?) (> (d-GetMeasuresInStaff) 1))
    (d-DeleteMeasure))

this keeps executing d-DeleteMeasure until there is only one measure (so
d-GetMeasuresInStaff is 1) or the measure is empty - so (EmptyMeasure?)
is true.

Parameters are stored in a variable named after the command, so
DeleteEmptyMeasures::params in this case. This could be tested - it has
the value #f when launched from the menu - and then other meanings of
empty, such as no printing notes or rests or some such used. There would
need to be a final step to delete the staff itself if the remaining one
measure is empty.

Let me know if this seems good to you - I can help if you need me ...

Richard





reply via email to

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