Page MenuHomePhabricator

Create a single score from multiple pages on Wikisource
Open, MediumPublicFeature

Description

At ca-ws we have started creating musical scores and we have found out that when transcluding two pages into one, it is only possible to generate two independent audio files instead of one with the whole score.

Example with two pages
http://ca.wikisource.org/wiki/P%C3%A0gina%3A30_can%C3%A7ons_populars_catalanes_%281916%29.djvu/59
http://ca.wikisource.org/wiki/P%C3%A0gina%3A30_can%C3%A7ons_populars_catalanes_%281916%29.djvu/60

Transcluded score:
http://ca.wikisource.org/wiki/Els_micalets_d%27Espanya

Is there any way to combine multiple pages into a single file? I have tried to transclude each section independently, but I always get a wall of text with errors. Also interesting would be to give the user the option to save that lilypond file.


Version: unspecified
Severity: enhancement

Details

Reference
bz48538

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:40 AM
bzimport set Reference to bz48538.
bzimport added a subscriber: Unknown Object (MLST).

It can maybe be done with the same system as the follow="" feature of <ref> tags managed by Extension:Cite ( https://www.mediawiki.org/wiki/Extension:Cite/Cite.php#Merging_two_texts_into_a_single_reference_.28wikisource_issue.29 ). By example:

<score name="AA">XX</score>
Anything
<score follow="AA">YY</score>

would output the same things than

<score>XX
YY</score>
Anything

The <noinclude> tag doesn't work between <score> tags, only if the line is preceded by the symbol '%' (commented line in lylipond), suggesting that the lilypond score is parsed before transclusion.

If the "follow" solution is an option, it would be recommended to parse the score after page transclusion and not before.

sumanah wrote:

Greg, wanted to cc you on this per http://lists.wikimedia.org/pipermail/wikitech-l/2013-May/069441.html and ask whether this is a blocker for publicizing Score. Thanks!

jgerber wrote:

Its not possible to join the output of two scores and create one score/audio file of it, you can however create a new score with the contents of both, i.e.: https://test2.wikipedia.org/wiki/User:JanGerber/join

are there other tags that can be joined like this? might be possible to get an idea how this could be done from them.

Sumana: not a blocker for publicizing, as this is going to be a enhancement that takes a while to complete (I'm guessing).

Haven't really looked at this task until now. To answer the couple suggestions:

@Tpt: This extension uses a hash system, where each score is given a hash that corresponds to its contents for the purposes of identification (as all images are stored as files). With that, having a follow attribute would be very user-unfriendly (more than Lilypond itself). Contrary to Cite, there is no concept of a page (like for Math). Thus, a follow could only prepend all previous pages, which would not be your expected result.

@Micru: The use of <noinclude> was what I would have suggested. The scores do have to be parsed before transclusion, which does preclude this idea.

Off to the drawing board to figure out a solution. Not just short snippets must be supported :)

I have recently implemented in plwikisource a LUA based solution of this problem.
part1:
https://pl.wikisource.org/wiki/Strona:PL_Wyspia%C5%84ski_-_Warszawianka.djvu/55
part2:
https://pl.wikisource.org/wiki/Strona:PL_Wyspia%C5%84ski_-_Warszawianka.djvu/56
merged:
https://pl.wikisource.org/wiki/Warszawianka_-_melodia
Feel free to use this concept elsewhere;
However, this is still a "work in progress" so undocumented, etc.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM