Summary: | Add support for Plaine & Easie musical incipits rendering in OPAC | ||
---|---|---|---|
Product: | Koha | Reporter: | verolencinas <verolencinas> |
Component: | OPAC | Assignee: | Agustín Moyano <agustinmoyano> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | new feature | ||
Priority: | P5 - low | CC: | bgkriegel, dcook, josef.moravec, magnus, martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34613 | ||
GIT URL: | Change sponsored?: | Sponsored | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This development adds support for displaying Plaine & Easie musical incipits in the OPAC. With this feature enabled, when a cataloguer adds incipits codes to the 031 MARC21 fields they will display as musical scores and optionally include a short audio clip.
|
|
Version(s) released in: |
19.11.00
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 38455 | ||
Attachments: |
Bug 22581: Add new system preferences
Bug 22581: Add new system preferences Bug 22581: Add new system preferences |
Description
verolencinas
2019-03-26 12:14:52 UTC
A while back I was looking into something similar.. `Plaine and Easie` rings a bell - https://www.iaml.info/plaine-easie-code Cool, looks like Verovio support it :) Would love to see this one happen.. perhaps one for targetting 20.05? Tomas said you might get to this any moment Agustin, so I'm marking it as 19.11 possible.. be great to see it in. Created attachment 94855 [details] [review] Bug 22581: Add new system preferences This patch adds 2 new system preferences: 1. OPACShowMusicalInscripts - to toggle musical inscripts to appear in opac's detail page 2. OPACPlayMusicalInscripts - to toggle musical inscripts to be transformed and payed in midi. Depends on OPACShowMusicalInscripts to be enabled. To test: 1. apply this patch 2. perl installer/data/mysql/updatedatabase.pl 3. search for this new preferences in admin module SUCCESS => they appear in OPAC section. 4. sign off Sponsored-by: Biblioteca Provincial Fr. Mamerto Esquiú (Provincia Franciscana de la Asunción) Created attachment 94856 [details] [review] Bug 22581: Add new system preferences This patch adds 2 new system preferences: 1. OPACShowMusicalInscripts - to toggle musical inscripts to appear in opac's detail page 2. OPACPlayMusicalInscripts - to toggle musical inscripts to be transformed and payed in midi. Depends on OPACShowMusicalInscripts to be enabled. To test: 1. apply this patch 2. perl installer/data/mysql/updatedatabase.pl 3. search for this new preferences in admin module SUCCESS => they appear in OPAC section. 4. sign off Sponsored-by: Biblioteca Provincial Fr. Mamerto Esquiú (Provincia Franciscana de la Asunción) Library with piano data is too big to be attached, please apply patches from https://gitlab.com/thekesolutions/Koha/tree/bug-22581 Could you add a sample record or an example on how to catalog this? (In reply to Katrin Fischer from comment #8) > Could you add a sample record or an example on how to catalog this? I saw the commit on the branch has an example. (In reply to Katrin Fischer from comment #8) > Could you add a sample record or an example on how to catalog this? I'll paste the comment on the second commit (that I couldn't upload): This patch adds musical inscripts to OPAC's detail page To test: 1. run previous patch test plan 2. apply this patch 3. edit a the marc structure of a MARC bibliographic framework, and in tag 031 enable the following subfiels to be visible in editor: 2, g, n, o, p, u 4. search the catalog for a record that belongs to that framework, and edit tag 031 with the following: * 2:pe * g:G-2 * n:xFCGD * o:3/8 * p:'6B/{8B+(6B''E'B})({AFD})/{6.E3G},8B-/({6'EGF})({FAG})({GEB})/4F6- * u:http://nonexistent.org/url/of/a/midi 5. save and click in opac view CHECK => even though you add a 031 tag there is no musical inscript shown in opac view 6. in admin module enable OPACShowMusicalInscripts preference 7. refresh opac view SUCCESS => it takes a few seconds to load, but you see a link that says 'Audio file' pointing to the URL you placed in 'u' subfield, and below you see the musical inscript 8. in admin module enable OPACPlayMusicalInscripts preference 9. refresh opac view SUCCESS => You see a play button below the musical inscript, and when you click, the song is played 10. sign off Sponsored-by: Biblioteca Provincial Fr. Mamerto Esquiú (Provincia Franciscana de la Asunción) So far so good, I've left a comment about using `Koha.Preference(` in the templates as an alterative to adding preference called inside the controller. I'll continue to test here.. going to load on of our music libraries catalogues in and see how that looks.. Minor QA comments. * We appear to load the verovio css regardless of the syspref settings * I think we seem to load the midi player JS even if we're only interested in displaying the musical notation (this might be me just not understanding the way the library code works) * The clips seem to play very quickly to me.. I'm no musician though so perhaps they're playing at the proper speed? * I'm sure how the $u subfield is intended to work.. you suggest in the test plan that it is required for this feature.. or is that simply to prove that $u still displays correctly when the verovio incipit are in place? Generally, I really like this feature and think we can probably do some cleaning up in followups. I'm going to let this one slip past the Slush deadline a little so we should still make it before the freeze. (In reply to Martin Renvoize from comment #12) > Minor QA comments. Hi Martin, I'll reply your comments > * We appear to load the verovio css regardless of the syspref settings Yes, I didn't notice that one > * I think we seem to load the midi player JS even if we're only interested > in displaying the musical notation (this might be me just not understanding > the way the library code works) No, midi player JS is wrapped by an IF statement [% IF playMusicalInscripts %] [% Asset.js("lib/verovio/000_acoustic_grand_piano.js") | $raw %] [% Asset.js("lib/verovio/midiplayer.js") | $raw %] [% END %] > * The clips seem to play very quickly to me.. I'm no musician though so > perhaps they're playing at the proper speed? I really don't know.. the midi player library has no options to control playing speed > * I'm sure how the $u subfield is intended to work.. you suggest in the test > plan that it is required for this feature.. or is that simply to prove that > $u still displays correctly when the verovio incipit are in place? $u subfield it's really not related to the musical inscripts.. if it's not set, you simply don't get a link. I tought that it was very little effort to add a link if someone defined a url to the audio file Regarding your previous comment, I'll change the preferences to use ' Koha.Preference(' Thanks I've updated the commits in gitlab, with Owen Leonard's code and suggestion (Thanks Owen!) I didn't realize that the midi player didn't play nice if multiple 031 were present. Thanks again Owen! All works as expected for me and I 'think' my comments have all been resolved. Marking as Signed off.. (Will add SO line to patches on push) Having a go here. Created attachment 94952 [details] [review] Bug 22581: Add new system preferences This patch adds 2 new system preferences: 1. OPACShowMusicalInscripts - to toggle musical inscripts to appear in opac's detail page 2. OPACPlayMusicalInscripts - to toggle musical inscripts to be transformed and payed in midi. Depends on OPACShowMusicalInscripts to be enabled. To test: 1. apply this patch 2. perl installer/data/mysql/updatedatabase.pl 3. search for this new preferences in admin module SUCCESS => they appear in OPAC section. 4. sign off Sponsored-by: Biblioteca Provincial Fr. Mamerto Esquiú (Provincia Franciscana de la Asunción) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> The written music is very pretty. How is the code in 031 generated? (out of interest) Passing QA on this one. Do we need to add something to the about page for the new JavaScript libraries used here? We might to improve the display later slightly - maybe move it further up, move the link closer to the written music, include a label.. but works for now nicely and is an optional feature. Tiny thing: <xsl:text> Play this sample</xsl:text> - the space might get lost with the translation tools. Nice work! Pushed to master for 19.11.00 Question: Why 'inscripts' instead of 'incipits'? I'm referring to the name of the preference and the displayed text. Came to this doing translation. Incipits makes sense, inscripts not so much. (In reply to Bernardo Gonzalez Kriegel from comment #22) > Question: Why 'inscripts' instead of 'incipits'? > I'm referring to the name of the preference and the displayed text. > > Came to this doing translation. > Incipits makes sense, inscripts not so much. Ups!.. misread the title of the bug! I'll correct them in following bug Btw this is a very cool feature that I never noticed before. I'm removing on the onclick attribute event handlers using bug 34613 although I'm going to see if upstream will accept a pull request too... |