Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of saxon:evaluate() in musicxml2mei-3.0.xsl #9

Open
ahankinson opened this issue Apr 26, 2016 · 2 comments
Open

Usage of saxon:evaluate() in musicxml2mei-3.0.xsl #9

ahankinson opened this issue Apr 26, 2016 · 2 comments

Comments

@ahankinson
Copy link
Member

From @ahankinson on May 28, 2015 18:13

From [email protected] on July 31, 2014 10:12:27

The usage of the Saxon extension function evaluate() forces users to have a Saxon EE license and it doesn't seem to be necessary.

The line 1790 could be rewritten from

<xsl:value-of select="saxon:evaluate(ancestor::part[attributes/time/beats]/attributes/time/beats)"/>

to

<xsl:value-of select="ancestor::part[attributes/time/beats]/attributes/time/beats"/>

The lines 1794, 3857, 3861 can be rewritten in the same way.

Cheers, Daniel

Original issue: http://code.google.com/p/music-encoding/issues/detail?id=196

Copied from original issue: music-encoding/music-encoding#196

@ahankinson
Copy link
Member Author

From [email protected] on July 31, 2014 12:18:03

Most of the time, plain old, run-of-the-mill time signatures don't need the evaluate() function. BUT, its use is necessary to calculate a common time-base for compound time signatures, for example in /tools/musicxml2mie/Lilypond-MusicXML-TestSuite-0.1/timewise/11c-TimeSignatures-CompoundSimple.xml,

3+2 8

and in 11d-TimeSignatures-CompoundMultiple.xml,

3 8 2 8 3 4

where the string value of beats (i.e., 3+2) must be evaluated/calculated (i.e., 5) when trying to figure out the beat position of an event or a control event (e.g., something other than a note or a rest like a dynamic marking).

Unfortunately, it looks like some work is still needed for multiple time signatures because the result of running the stylesheet against the 2nd file is a meterSigGrp containing 5/2 and 1/8. Bummer! :-(

Until I can get it to function properly 100% of the time, I'm inclined to re-write the stylesheet so that it dies when it encounters a compound meter signature of the 2nd variety for now.

Labels: -Type-Enhancement -Priority-Medium Type-Bug Priority-High

@ahankinson
Copy link
Member Author

From [email protected] on July 31, 2014 14:18:12

I was wrong about the reason for using saxon:evaluate. It seems that it's actually being used to choose between and when a MusicXML rest doesn't specify that its duration equals a measure (using @-measure='yes') and is missing.

A better option might be to use the rest's position in the measure; that is, if it's the only event in the measure, then it gets transformed into ; otherwise, it becomes a . The complicating factor, however, is , which makes it more difficult to determine the rest's position in the measure.

Still working on it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant