Template talk:Synthlisten

Latest comment: 5 years ago by Nardog in topic Merge with Listen

Doesn't work edit

This worked for a little while, but now it doesn't (see Template:Synthlisten/doc). The play bars appear for a second or two, then disappear. Some edit at Module:Synthlisten may have broken it. Further, the parameter |title= should be the link to the MIDI file, and |description= should be free text; that parameter now seems to be hardwired text "MIDI file" which links to the file. Compare the behaviour of {{Listen}}. -- Michael Bednarek (talk) 06:03, 10 August 2018 (UTC)Reply

It now works again – with considerable delay. What's going on?
I still would like that this template treats the parameters |title= and |description= the same as {{Listen}} does. Compare:
 {{Listen|type=music|filename=Mozart-Marsz turecki-(Romuald Greiss).ogg|title=Mozart: "Alla Turca"|description=This is an OGG file}}

 {{Synthlisten|type=music|filename=Rondo Alla Turka.mid|title=Mozart: "Alla Turca"|description=This is a MIDI file}}
Further, the size of the boxes should be the same (smaller, like {{Listen}}). Lastly, and off-topic here, the progress slider in the {{Listen}} box ought to be visible, like it is at sr:Девојачка група; I have no idea why the slider is visible there, but not on the English Wikipedia. -- Michael Bednarek (talk) 14:50, 29 August 2018 (UTC)Reply
Regards, Michael: sorry I didn't see the comments you'd posted here; please direct future feedback to my user talk page if you want to get my attention. First off, regarding the breakage, I, too, noticed this: it was a general problem with the Score extension installation which I really have no control over (as I'm not responsible for the MediaWiki backend of enwiki or any other WMF sites). The use of Score itself is somewhat clunky, just by virtue of the fact that we have to render a dummy invisible LilyPond file in order to get timidity++ to render the MIDI to Ogg, but this is another issue which I cannot solve without WMF intervention which we are unlikely to receive for such a "pet project". The description parameter is indeed free text; the link to the file which appears directly below, however, is indeed, as you say, hardcoded to the words "MIDI file". Now that you mention it, I will try to change that so that the link appears in the title, like in Listen. Don't know what's up with the whole width thing, nor with why the Listen template has been set to not include the scrubber bar. Feel free to poke around in the source code --- it's pretty hacky, so feel free to improve. D. Benjamin Miller (talk) 18:52, 31 August 2018 (UTC)Reply

@Michael Bednarek and D. Benjamin Miller: Hello, I am the developer who works on the MIDI conversion (and sheet music) for MediaWiki. All these problems should be fixed by now (or in a few hours). I did not know about this use of Score, nor was it intended. However I am glad that the tool can be used in many ways. The play-bar should be functioning correctly now (or purge the page and it will improve). Good point about the size of the audio box.

If there are further comments/suggestions/problems, please report it using this link. It is the issue tracker for sheet music (& MIDI conversion) that I watch closely. ~~Ebe123~~ → report 19:23, 5 September 2018 (UTC)Reply

Merge with Listen edit

Nardog, I think merging {{Listen}} and this one is a good idea. While you're at it, do you think you can address the problems I mentioned above: 1) reduce the size of the MIDI box (a parameter to control the size would be terrific); 2) link the parameter |title= to the file which would then allow to drop the extra line "MIDI file". -- Michael Bednarek (talk) 14:19, 30 January 2019 (UTC)Reply

@Michael Bednarek: 1) As far as I know that is not possible. 2) We can do it, but then the clickable portion of the link would be very small (try to select the text of "title" to see what I mean). Both seem to require a change in the Score extension so it's beyond the module's control. Nardog (talk) 21:32, 30 January 2019 (UTC)Reply

Here are the articles that currently link to a MIDI file using {{Listen}}, JFYI:

Nardog (talk) 23:18, 30 January 2019 (UTC)Reply

I didn't explain myself clearly enough. In the template {{Listen}} the audio file is linked from the output of |title= – see example above where the string Mozart: "Alla Turca" above the player links to File:Mozart-Marsz turecki-(Romuald Greiss).ogg. Contrast this with the behaviour of {{Synthlisten}} where that string is unlinked and instead the fixed string MIDI file 2 lines below the player links to File:Rondo Alla Turka.mid. I suggest to have {{Synthlisten}} behave the same as {{Listen}} in this regard, which would also mean that the line MIDI file is not needed. -- Michael Bednarek (talk) 00:49, 31 January 2019 (UTC)Reply
@Michael Bednarek: I think I got your message perfectly clear the first time. Now go to Template:Listen/testcases#MIDI files and try to click the links. Don't you find it difficult?
However, I may have found a solution to the size problem. It has the side effect of hiding the length and volume, though. Nardog (talk) 01:43, 31 January 2019 (UTC)Reply
It's all my fault. My attempt to add a section to the testcases was a complete failure as it didn't invoke the sandbox template. After you corrected that, the output of {{Listen/sandbox}} there is fine. I apologize for being a nuisance. -- Michael Bednarek (talk) 01:56, 31 January 2019 (UTC)Reply
Not at all! I didn't even realized you added that section to the testcases until today and I then experimented with it anyway so you have been absolutely no nuisance.
Do you get what I mean by "the clickable portion of the link would be very small"? The thing is, the output of the Ogg rendition by default creates some extraneous space above the player. The template negates that by margin-top: -1em;. But this has resulted in the player overlapping with the title text, which is ostensibly invisible but affects the area of the text that can be clicked/selected by the user. If the Score extension didn't add .mw-ext-score { position: relative; display: inline-block; } this wouldn't have been a problem, but there's no way of changing it from the template.
Also, what you think of the solution to the size problem? Notice the playback position and the volume are unavailable in the sandbox version as a result of shortening the box. Nardog (talk) 02:35, 31 January 2019 (UTC)Reply
Hey guys. I think that it is indeed possible to make the title within synthlisten link to the file, and totally doable --- just edit the module accordingly in the part which generates the wikitext. As for the proposed merge between Listen and Synthlisten, I don't know how it could be done, but if somebody can figure that out, all power to them. I don't have a ton of time. In the meanwhile, I will replace the Listen template on pages using MIDI with Synthmidi, at least until we can merge the templates. I'm not really a Lua expert, so if you or anybody else interested know(s) more, then maybe we can get something done. D. Benjamin Miller (talk) 04:57, 31 January 2019 (UTC)Reply
@D. Benjamin Miller: I will replace the Listen template on pages using MIDI with Synthmidi No, you don't have to. The merger with {{Listen}} is a done deal (Wikipedia:Templates for discussion/Log/2019 January 22#Module:Synthlisten) and I have already figured it out. See Template:Listen/testcases#MIDI files. Nardog (talk) 04:59, 31 January 2019 (UTC)Reply
OK, if this is being implemented now, all the better. If it's all ready to go, then go whenever it's fully ready. If the formatting can work on the Listen sandbox version, wonderful. The CSS hacks were unfortunately necessary due to the fact that we are doing this through the score extension, which was a huge hack in the first place. You'll notice that MediaWiki doesn't show any form of preview for MIDI files on file description pages, for example. If only we had such a thing, then we wouldn't need this hack. If you know whom to contact to install such an extension (if one exists), please feel free to go ahead.D. Benjamin Miller (talk) 05:02, 31 January 2019 (UTC)Reply
Also, the formatting issues (with the lack of volume button, lack of ability to add captions, etc) all arise from the fact that we're not "really" embedding the file (but instead, using a blank hardcoded lilypond + a fluidsynth input override). So that's the real source of the formatting inconsistency. I can't change how the score extension output works. If only we could change that, we wouldn't have to deal with these issues.D. Benjamin Miller (talk) 05:04, 31 January 2019 (UTC)Reply
"very small clickable portion": No, I don't get that. The output at Template:Listen/testcases#MIDI files works perfectly fine for me, and the linked titles "Bagatelle No. 1", "Bagatelle No. 4", "Étude Op. 8 No. 12" present no problem. They appear the same as the titles for .ogg files. As for the box's size: MIDI files now play in a box the same size as .ogg files; the difference bothered me with {{Synthlisten}}, that's fixed now. The absence of a volume button for MIDI files doesn't bother me – that is much better handled on the playing device. There seems to be an added bonus: because the MIDI player doesn't have a timer, a closed caption button, a volume button, and a Menu button, it has a slidable progress indicator. -- Michael Bednarek (talk) 13:25, 31 January 2019 (UTC)Reply
Alright, let's implement the sandbox version then. Nardog (talk) 04:45, 1 February 2019 (UTC)Reply