-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feature: Auto measure label handling #302
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # add/data/xql/getMeasures.xql
@riedde what’s the status of this draft, any chance to resolve conflicts and close TODOs in the near future? |
# Conflicts: # add/data/xql/getMeasures.xql
@bwbohl conflicts resolved. I'll have a look at the TODOs |
What’s an appropriate dataset for testing this? |
@bwbohl e.g., https://klarinettenquintett.weber-gesamtausgabe.de/index.html?lang=de (Erstdruck 1) |
Tested with the klarinettenquintett dataset:
|
The multiRest at the start of the Allegro in D+-st is also missing "–11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiRest handling doesn’t seem to work properly with data-set klarinettenquintett
add/data/xqm/measure.xqm
Outdated
: | ||
: @param $mei the mei file | ||
: @param $mdivID the ID of the mdiv | ||
: @return Maps (as strings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can! In fact, the file https://github.com/Edirom/Edirom-Online/blob/develop/add/data/xql/getMeasuresOnPage.xql in current develop branch already outputs proper JSON. The change here is a step backwards.
add/data/xql/getMeasuresOnPage.xql
Outdated
(: TODO: überlegen, wie die Staff-spezifischen Ausschnitte angezeigt werden sollen :) | ||
local:getMeasures($mei, $surface) | ||
} | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the array constructor (or force measure:getMeasuresOnPage#2
to return an array)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At 2ad0a2d
The round brackets are removed. The function returns a map. Why should there be an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
measure:getMeasures#2
returns a sequence of maps. If the sequence is gt 1 this will automatically be serialized to a JSON array. If the sequence is 1 the return type will be a JSON object. If it's 0 the return type will be NULL.
This is quite annoying for the frontend so it's much nicer to always return an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterstadler Done at 01568d2 I don't have time today to work on this, so if necessary, please fix directly before tomorrow's release.
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
There are still issues with MEI multiRest. xquery version "3.1";
declare namespace mei="http://www.music-encoding.org/ns/mei";
import module namespace measure = "http://www.edirom.de/xquery/measure" at "xmldb:exist:///db/apps/Edirom-Online/data/xqm/measure.xqm";
doc("/db/apps/Edirom-Online/testing/XQSuite/testdata/multiMeasureRests.xml")/mei:mdiv//mei:measure[1]
=> measure:getMeasureLabel() which will properly output <xhtml:span xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:span>107</xhtml:span>
</xhtml:span> but will fail for Edirom-Online/testing/XQSuite/testdata/multiMeasureRests.xml Lines 64 to 74 in def111d
UPDATE: I just added a test for |
and add tests
and replace the direct call to the `doc` function with the more robust `eutil:getDoc#1`
I tried to update the code but there's still a test failing for Edirom-Online/add/data/xqm/measure.xqm Line 90 in b45c7b5
because there can be multiple <mei:multiRest> (in multiple layers) in an <mei:measure> .
|
at the community meeting 2024-12-18 we agreed to move this PR to next release. |
Better handling of Measure labels
1/9
)needs: