Help talk:Score/Archive 1 Source: en.wikipedia.org/wiki/Help_talk:Score/Archive_1
This is an archive of past discussions about Help:Score. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
Seconded. Of course there is Lilypond syntax to change the output size, but the default size is somewhat large to my taste.--KlausFoehl (talk) 12:23, 29 April 2013 (UTC)
This looks great, but the current format for showing the markup in the examples doesn't really work. You're using some special tag, and it breaks the pagewrapping and also doesn't clearly show use of ' (because they get treated as marking italics and bolding). It would be clearer to use the plain <nowiki> tags around it.
I just took the use of the template {{tag}} as I found it on the page. I think it displays almost all wikicode properly, except the pipe character. -- Michael Bednarek (talk) 03:15, 29 April 2013 (UTC)
That's much better. But what's the advantage of using the tag template, rather than nowiki? What does it do? If you use nowiki, you'd just write out exactly what coding you use, and it displays it exactly (so you wouldn't need the pipe work-arounds). Is breaking the pagewrapping an advantage? 86.161.209.128 (talk) 06:40, 29 April 2013 (UTC)
On various sheet music and chord sites, there are typically two buttons: Transpose up, and transpose down. I suggest that the score viewer should have that as well, to allow the user to choose what key to show (and play).
I also have a question: I added chords to a song using "\chords", but when I added the lilypond "\transpose" keyword, the chords did not change key, only the sheet music. Is there a solution to this? Mange01 (talk) 16:04, 27 February 2016 (UTC)
Hello! Which are the available instruments for MIDI reproduction? It seems that only piano and violin are installed. -Theklan (talk) 13:48, 24 March 2017 (UTC)
@Patrug:: I've noted that some pieces of documentation are wrong. As Vater unser im Himmelreich works with \set Staff.midiInstrument = "english horn" documentation says that the correct way is \set Staff.midiInstrument = #"bassoon", with a # before the instrument. Some instruments work like this, some other not. -Theklan (talk) 10:48, 6 April 2017 (UTC)
Thanks for the ping. No, I haven't, but I have haven't tried either – it's too hard and there are more important things in RL and WP I'd like to concentrate on. -- Michael Bednarek (talk) 10:03, 30 July 2016 (UTC)
@SchroCat, Michael Bednarek, and KlausFoehl: I just came tantalizingly close to solving this. At "Lasst uns erfreuen", I put a \layout command that created a nice compact version of the score, following the LilyPond documentation. Unfortunately, it went on to print an unmodified copy of the score below the compact one, so for now I left the \layout command as a comment in the markup. Maybe I'm overlooking something in the syntax, or maybe WP is translating something incorrectly? Feel free to try some sandbox experiments. If anyone can figure out how to suppress the unwanted second copy, then we'll have the re-sizing problem at least partially solved. —Patrug (talk) 09:46, 6 April 2017 (UTC)
OK, here's a workaround. It seems the Score extension normally defaults to a simplified implementation of LilyPond, which does not fully conform to LilyPond's documentation manual, and which misinterprets the layout code:
<score>
\relative { \time 3/4 \partial 4 c''8 b a4 g c8 b a4 g f8 e d2. c2 \bar "|." }
\layout { line-width = 85\mm }
</score>
to produce the unwanted double score that I described above:
The workaround is to invoke the Score extension with attribute raw="1", which then correctly interprets the full markup according to LilyPond's documentation:
<score raw="1">
\header { tagline = ##f }
\score {
\relative { \time 3/4 \partial 4 c''8 b a4 g c8 b a4 g f8 e d2. c2 \bar "|." }
\layout { line-width = 100\mm }
} </score>
In January there was a discussion about using curved triplets brackets rather than square ones. The thread started here: [1] Hans Aikema investigated the problem and found that Wiki "embeds the lilypond in a template of its own". He further dug out the use of raw="1" to defeat this problem. Martin of Sheffield (talk) 19:21, 8 April 2017 (UTC)
Thanks Martin, this is helpful confirmation that raw="1" (and random "#" signs!) are frequent workarounds for Wikipedia's limited LilyPond implementation. This week I'll definitely add some explanatory notes to Help:Score, and maybe also to mw:Extension:Score itself. —Patrug (talk) 08:46, 9 April 2017 (UTC)
List of examples
Often the best way to learn is often by example, so it would be useful to list a few articles with different types of score so that editors could inspect how they were generated. My shortlist is mostly those that I created:
I see it now, Special:PagesWithProp/score, thanks. I will explore it for more examples, as I say above, I propose to add a curated list of few pages that illustrate how do various things, such as multiple staves and multiple line of text. I will try to find some useful examples. Verbcatcher (talk) 01:27, 8 April 2017 (UTC)
That is useful resource, and one that I would have found helpful when I was struggling with the syntax. However, I am reluctant to link to a user page because its content may be very dynamic and have less oversight than articles.
According to the edit history, Sinuhe20/Spielwiese was created during one week in 2014 (mostly during an impressive six-hour burst) and has been untouched ever since. Since it's both helpful & stable, please feel free to include it in your curated list of pages, and/or cut & paste some of Sinuhe20's particular examples with proper credit.
I thinkvorbis="1"is working, but a change in formatting is obscuring it. I've looked at previous good examples and the same behaviour is visible. I also note that on a refresh or edit the sound bar comes up, then disappears. The actual line in question is rendered as:
It seems that <code>vorbis="1"</code> is no longer working:
<divclass="mw-ext-score"data-midi="//upload.wikimedia.org/score/o/a/oaz8a7c01g32iry2g8hxs1uolhphqak/oaz8a7c0.midi"data-source="//upload.wikimedia.org/score/o/a/oaz8a7c01g32iry2g8hxs1uolhphqak/oaz8a7c0.ly"><imgsrc="//upload.wikimedia.org/score/o/a/oaz8a7c01g32iry2g8hxs1uolhphqak/oaz8a7c0.png"width="198"height="111"alt=" \relative c'' { \set Staff.midiInstrument = #"bassoon" \clef treble \numericTimeSignature \time 4/4 \tempo "Lento" 4 = 50 \stemDown c4\fermata(_"solo ad lib." \grace { b16[( c] } b g e b' \times 2/3 { a8)\fermata } } "/><divclass="mediaContainer"style="width:300px"><audioid="mwe_player_0"controls=""preload="none"style="width:300px"class="kskin"data-disablecontrols="options,timedText"data-durationhint="4.8004535147392"><sourcesrc="//upload.wikimedia.org/score/o/a/oaz8a7c01g32iry2g8hxs1uolhphqak/oaz8a7c0.ogg"type="application/ogg; codecs="vorbis""/></audio></div></div>
I wanted to add an example to the backdoor progression page, and I don't know lilypond, and poring through the documentation takes time (and much as lily is great and versatile and all, it's not exactly the shallowest of learning curves and from past experiences of using it it takes me a while to even get off the ground). Since ABC is quick and intuitive, when I saw that it was supported here, I thought I'd use that rather than downloading musescore, taking a screenshot, and uploading an image.
here is the code I used:
<score lang="ABC">
X: 1
T:
M: 4/4
L: 2/4
K: C clef=treble_8
[F c _e _a] [_B, _A d f]| [C G A e ] |
</score>
and here is how it renders
The clef, note duration, and time signature are missing (displaying as their defaults; treble, common time, and 8ths, respectively._
As you can see, it's rendering, so it's not deprecated, and mw:Extension:Score and its talk page don't call it that either. However, according to mw:Extension:ABC, it's been unmaintained for a long time (marked in January 2013). I have never used ABC, so I can't help you with the syntax. Maybe you can find the answer at http://www.lesession.co.uk/abc/abc_notation.htm — After 2 minutes, I found that one change to your input takes care of note lengths. I have no idea why it shows common time and not 4/4. -- Michael Bednarek (talk) 06:12, 4 September 2018 (UTC)
Preference
Has there been a discussion anywhere about whether there is a preference to use <score>...</score> versus images (.jpg, .svg) to represent musical samples in articles? WikiDan61ChatMe!ReadMe!!15:05, 11 February 2019 (UTC)
I would expect it to be a matter of editorial judgement. If you are wanting to publish the opening page of Beethoven's 9th then I suspect an image would be more appropriate. If you are wanting to make a simple melody available than can be manipulated by the user and played, then a score is the right way to go. If comparing pieces then using the built in midi gives a clean (if antispetic) line, if you are referring to a great performance of the past then an Ogg Vorbis sound file would be appropriate. Martin of Sheffield (talk) 15:27, 11 February 2019 (UTC)
I second this. Player is several pixels higher than score image, but it shows ok in mobile version. Seems like problem with css, I'll ask on WP:TECHPUMP. --M5 (talk) 21:55, 15 February 2019 (UTC)
I'm also seeing this. It appears that a workaround is to add an empty lyrics line. I had to put a hyphen in the lyrics, but this is not displayed. Put \addlyrics { - } before </score>. Verbcatcher (talk) 00:16, 16 February 2019 (UTC)
The problem with this workaround that it renders "-" on the bottom of the score and it shows e.g. on mobile version. Also it will show again when (hopefully) the bug will be resolved. --M5 (talk) 10:22, 16 February 2019 (UTC)
Problem confirmed on Firefox running under Linux, so not our friend the IOS issue. I also tried introducing vobis=1, a tempo mark and a key signature, but the effect of changing the e to an f is the same. Martin of Sheffield (talk) 19:56, 16 March 2019 (UTC)
I have the impression that all existing scores still work, even in a new article, but all the new ones fail. Perhaps the rendering is completely broken, but there is some kind of cache from which the old scores are still loaded. --Rodomonte (talk) 20:18, 16 March 2019 (UTC)
phab:T218535 has now been marked as resolved. I don't know how to regenerate a Lilypond .PNG at Wikimedia, in this case, so I simply added a final (unnecessary) bar line,
I would be very surprised if it did. Where will the Wikipedia server being including the file from? Remember that your browser is just displaying the page, the server is building it - how else would I for example see it? Martin of Sheffield (talk) 20:10, 28 February 2018 (UTC)
Right, that's what I thought. So is there a way to get this library's functionalities to work within the Score extension? χchi (talk) 22:49, 28 February 2018 (UTC)
I expect you'll have to include the file yourself. There is another point to be aware of though, the documentation only refers to 2.14 whereas your microtonal example is from 2.19.81. It might work, but then again it may complain the version is too low. Good luck! Martin of Sheffield (talk) 22:55, 28 February 2018 (UTC)
Which version of LilyPond is used as the backend of the Score extension on Wikipedia? The are syntax changes that break compatibility between, for example, v2.12 and v2.16. Sammo (now Burkenyo) (talk) 23:13, 14 April 2014 (UTC)
Hello from the Teahouse, where an issue was raised today (see here) about music scores not displaying a playbar using an iPad, and thus being unable to play the notation. I can confirm that on my own iPhone with default Safari browser I do not see any playbar either, so can't play the music, whereas I have no problem displaying or playing them on a Windows PC with Chrome.
If there are known browser or iOS compatibility issues, the Help:Score page could really benefit from an additional section explaining what these may be, and how to resolve them if at all possible. Pinging Martin of Sheffield who previously commented on issues of the player not functioning. Many thanks, Nick Moyes (talk) 10:41, 8 March 2019 (UTC) (Teahouse Host)
Task T68722 is about, in part, iOS not supporting certain media formats including OGG audio. But that task has a comment from 2018 "Audio should work now (using MP3 transcodes)". If a [[File:somefile.oga]] wikilink to media, for example , works in iOS, then the problem with the Score extension on iOS would seem to be the more specific task T252795, "Ogg Vorbis audio from the Score extension is not transcoded to MP3 on iOS." Skierpage (talk) 00:28, 25 May 2020 (UTC)
Obsolete and deprecated score attributes, including override_midi, override_audio, override_ogg
midi="1" has been obsolete for a while, every score image now has a JavaScript popup offering download of the Lilypond and MIDI files. I'm not sure what happens if the Score extension doesn't produce a MIDI file (if this is even possible).
vorbis="1" is deprecated, use sound="1" instead. As I understand it, the Score extension supports generating an MP3 file with the Lame encoder (unused I think on Wikipedia sites), and it may be that when the Score extension hands off audio generation to the TimedMediaHandler extension (more below), TMH will generate a .MP3 on iOS. So sound="1" is more accurate and less technical. I don't see any plan to remove vorbis attribute, and based on unscientific search for insource:/score vorbis=\"1\"/ there are hundreds of pages on English Wikipedia with the deprecated attribute. Also, I'm not sure that the VisualEditor support for the score tag knows/prefers the sound attribute.
override_midi and override_audio are deprecated. More on these below.
* MIDI files can soon be played without the Score extension. You can then add them with [[File:Filename.midi]]. Later override_midi and override_audio will stop working. Instead you will need to add the MIDI file below the music score. [2]
That task is T135597, "Move MIDI to audio conversion from Score into TimedMediaHandler." The Score extension already relies on TMH to provide an audio player, so if I understand correctly, it's less code and bugs for it to hand off generating the audio file for the player to TMH. Once that happens, override_midi="better_midi_file.mid" and override_audio="better_midi_file.ogg" won't work. Pages using these are already flagged in Category:Pages using deprecated score attributes.
As the Tech News item hints, putting a wikilink like [[File:somefile.mid]] or [[File:better sounding audio.oga]] underneath the score tag will create a player that looks the same, so that's the workaround. It seems to me some functionality may be lost, e.g. the MIDI file in the JavaScript popup for the score image won't be the improved MIDI file. On the Score extension's talk page, User:Michael Bednarekcommented:
The generation of MIDI files may have improved, but I think the override is mostly done with .ogg files. These could be sound files from actual performances, or from MIDI files that editors have created in their own environment with Soundfonts or similar which most likely generates better sound than this extension. Then there are cases where LilyPond doesn't produce certain ornaments at all.
Searching for insource:"override_midi=" finds 50 pages on en-wiki with override_midi, 7 with override_audio, and 18 with override_ogg.
Thank you for your explanation, but the essence of this change is to remove functionality. The documented method at mw:Extension:Score ("you can add a [[File:name.mid]] wikilink after the score tag.") doesn't seem to work. A <score>...</score> using a filename: <score sound="1" [[File:La tartine de beurre first 8.ogg]] >
What we hear is the imperfectly generated MIDI sound, where the old method sounded the replacement file: <score override_ogg="La tartine de beurre first 8.ogg">
The alternative of placing the sound file manually below the score or somewhere else in the article is hardly satisfactory. Can you point to any example where the non-deprecated method using [[File:… works? -- Michael Bednarek (talk) 02:57, 25 May 2020 (UTC)
Your example <score sound="1" [[File:La tartine de beurre first 8.ogg]] > put the wikilink inside the score tag, and you don't want the sound attribute if you're going to provide a better audio file. If you put it after the closing tag, it works, e.g.:
Emphatically: Do not remove – As someobody else who has used this a few times, I certainly think that it should be kept. The reason it's used so little is because:
a) editors are generally not familiar with lilypond
b) there are relatively few examples so far where there are currently acceptable midi/audio files in place of the default output (the default audio can by itself be quite tolerable - see wikisource:The Army and Navy Hymnal for plenty of such examples)) - or at least relatively few where an editor that is familiar enough with lilypond (see point a) has found one... (see for example this, or this).
c) because something is used "relatively rarely" (see the numbers I bring up below) doesn't mean it should be removed...
I assume the cases where it is a midi file have similar explanations (ornementation can be approximated rather well, if not perfectly; or maybe additional instruments not present in the sheet music for simplicity reasons...). For the record, I made searches for insource:"score vorbis" (599 in article space; searching in all namespaces yields 711 but I assume most of these are examples on talk pages/tp archives, documentation, sandboxes...)); "score audio=" (17) ... Quick math (just on en-wiki): 50+7+18 / 599+17+50+7+18 = 75 / 691 = 11% of cases).
This, if anything, proves my point that few editors are familiar with lilypond. I hardly find that justification for removing a useful feature (using the "override_audio"/"override_midi" parameters seems also clearer and more intuitive syntax). Additionally, this extension is surely used on other wikis (it's used a Wikisource, too, where I have employed the override option at least once). Thanks, RandomCanadian (talk / contribs) 03:36, 25 May 2020 (UTC)
Please note I'm just a messenger. I figured editors might have overlooked the Tech News item, so it was worth documenting the deprecation in various places and highlighting here, though it seems what I wrote is unclear for which I apologize. Anyway, I'm no expert but I don't understand what you're saying. If someone doesn't know LilyPond syntax then how are they using the Score extension? They'll continue to insert a wiki link to the audio file, as on e.g. wikisource:The Army and Navy Hymnal/Hymns/Our God, Our Help in Ages Past (which doesn't use the score tag). Maybe you're confused by the Tech News item I quoted, which says "Instead you will need to add the MIDI file below the music score" without explicitly saying you can instead add an audio file (I improved my opening talk comment above to say this). I took Eternal Father, Strong to Save and swapped its override_audio=better audio file attribute with a File:better audio file wikilink underneath on my Sandbox page, check it out; the before and after look identical. Does that help? Feel free to make changes. Also I don't know if the relevant developers hang out on this page, if they don't then saying "do not remove" here isn't going to reach the right people. You can mention your concerns on the Phabricator task, but I suggest linking to a clear example of your problem. Cheers. Skierpage (talk) 10:44, 25 May 2020 (UTC)
Thank you very much for efforts to clarify this matter. After looking at your sandbox, I now believe there is no loss of functionality. But changing current instances of override to the new format is probably not suited to an automated replacement. Cheers, Michael Bednarek (talk) 11:16, 25 May 2020 (UTC)
Thanks. Regarding "editors are generally not familiar with lilypond", I meant to say that not all editors who write lilypond are familiar with some of it's features and even then they might not be familiar with the specifics of it's implementation on wikipedia and related projects (override_audio &c. fall under that - I personally discovered them only by accident when looking through the documentation for something else). Just for clarification, the pages at Wikisource actually are transcluded, see eg. wikisource:The Army and Navy Hymnal/Hymns/Our God, Our Help in Ages Past is a transclusion of wikisource:Page:The Army and Navy Hymnal.djvu/32. Anyway I still stand by my statement that the parameters are a clearer syntax. Cheers, RandomCanadian (talk / contribs) 14:07, 25 May 2020 (UTC)
Those two aren't working for me either. Every occurrence of <score> in every Wikipedia language doesn't work, in Firefox, Chrome, IE, not in the Wikipedia app on my Android phone or on my wife's iPhone in Safari, not on my laptop. -- Michael Bednarek (talk) 01:50, 22 October 2018 (UTC)
I've just purged the cache and gone to both the above examples. They render correctly and play the melody as expected. I'm running Firefox 60.2.2esr under CentOS 7.5.1804, patched as of yesterday. Which page is it you are having problems with? Martin of Sheffield (talk) 09:07, 22 October 2018 (UTC)
I'm seeing a lot of broken scores with the error message "Musical scores are temporarily disabled". I wonder if it has anything to do with the new Visual Editor, even if I'm working in source mode? Lwangaman (talk) 08:23, 18 October 2020 (UTC)
I also noted that quite a few old scores that used to work no longer do. There's a remarkable absence of any action at phab:T257066 – see below at #Error message. Old scores that had been cached continued to work until recently. Most still do, but some don't. I don't know why. -- Michael Bednarek (talk) 10:14, 18 October 2020 (UTC)
I was not aware of the vorbis=1 workaround. I presume a bot recently went through and made a bulk change. Any article I've seen with a score is working. Presumably all vorbis — Preceding unsigned comment added by 73.173.218.150 (talk) 00:40, 23 December 2020 (UTC)
Has anyone received the "Musical scores are temporarily disabled." message? I am able to copy and paste scores from here and they are rendered fine, but as soon as I change one note I get this message. Is this something new? Pigby2 (talk) 12:36, 17 August 2020 (UTC)
LilyPond and <score> has been turned off and on several times since at least 4 July 2020; see phab:T257066. There seems to be some concern, the details of which are not disclosed, that LilyPond in a certain configuration is a security problem. It's a very annoying situation, and it doesn't seem to get a lot of attention fixing it. -- Michael Bednarek (talk) 13:50, 17 August 2020 (UTC)
If the issue is questionable security, might it be reasonable to instead rely on an easier-to-secure format like MusicXML? Or to look into a way of maybe offering it as an option? It's more verbose, but it was built for the particular purpose of music interchange, and it supports about everything you could ever want to. 24.128.20.42 (talk) 03:45, 30 October 2020 (UTC)
I've just hit it trying to improve the tempo of a piece. It appears that the original score is cached somewhere, but as soon as you make a change the error appears. It's one of the great things about a computerised encyclopedia; you can hear snippets and melodies which particularly assist those who can't read scores. Martin of Sheffield (talk) 12:40, 6 October 2020 (UTC)