MB Enhancements for classical music

Tags: #<Tag:0x00007f1c949f73f8> #<Tag:0x00007f1c949f7330>

Firstly, I’d like to thank @Algwyn for kicking off this important topic and making some very useful suggestions. It would be great if there could be some developer input to this thread, so that we have some idea as to what is reasonably achievable, given that the MB database and UI seem to evolve very slowly (although I am aware that there is a UI project under way, but am unsure of the details). Unfortunately, I don’t know who the relevant people are, perhaps @reosarevok or @Freso can tag whoever?
As regards the various points raised:

Clean-up of UI

Where the composer has a catalogue which is in MB as a series, then this is sort-of achievable by just looking at the series listing and clicking on the work to see the parts (in a new page). Some composers (e.g. JS Bach) have a link to the series in their annotation on their artist page, but some (e.g. Beethoven) do not. Adding these links would be a small but quick win, which can be done by editors. Ideally, the hierarchical view would be achieved by expandable drop-downs, but this would definitely require some work on the UI. Where there is no series, perhaps things can be improved by editors creating them - even by just simply ( :laughing:) making a series of all their (top) works; again, this would require no developer effort, but perhaps a script or two might help?

The cluttering of popular works by loads of artists listed is a major irritation. I would hope that a simple solution would be to turn off the Artist column. Perhaps it is possible to do a short term fix for this by means of a script? I am not competent in javascript - maybe someone else (@loujin / @jesus2099 ?) can help here.

Again, a nice idea, but perhaps could have a short-term fix using a script to turn the column off.

Unless I misunderstand, this can be effectively achieved in the existing UI by selecting “Display Credits at Bottom”

Naming of movements

I completely agree. This is an enormous waste of time and is frequently done incorrectly. The Classical Extras plugin then attempts to strip the duplicate naming, but sometimes doesn’t work because of large inconsistencies between the child and parent names. However, it must be recognised that the alternative has consequences too. You would end up with a large number of works simply named “Allegro” etc. Unless MB displays these with the parent name prefixed, any list of these would be meaningless. Similarly, any search for a movement-type work would need to implicitly search the parent name too. Both of these considerations then raise the question as to whether just the immediate parent is included in the implied prefixing (assuming there is a non-collection grandparent). There is already a script that is of some help here. Perhaps another could be added to “add/replace subwork prefix with work name”. This would (selectably) either replace all text preceding the first colon with the work name or add the work name as a prefix (followed by a colon). Again, this would be a short-term solution, but I think a complete solution may take some time, both to design and implement.

Group tracks in recordings
As noted, this is a long-outstanding (and much voted-for) request and is by no means limited to classical recordings. I suspect it is a bit tricky to implement in the database structure.
In the meantime, there is (I think) one issue that maybe could be fixed - namely with the Discogs import script. Where Discogs does have a track group, the import only picks up the top level. Instead, it should pick up the full structure, named according to MB style (parent: child).

Primary aliases edits

I agree - it should be mandatory (apart from auto-editors :wink:)

Searches

Agreed. Hopefully this is not a big ask. Do we need a ticket?

Conclusion
I think some very useful suggestions have been made. Some already have ‘work-round’ solutions which can be implemented by editors (given a will…) Some could have quick and dirty fixes by means of scripts. Neat-looking UI and database fixes will take looonngggerrrrr…
There are already a lot of good scripts and other tips which are not as well known as they should be - see the Classical Editor Toolbox. Maybe the reason why these are not well known is that it is not pinned to the top of the Classical discourse page - it really should be (@Freso?)
To summarise the scripts suggested:

  1. Add work to series. On the works page for an artist, the script would allow a series to be chosen, add checkboxes against each work and allow these to be selected to add the work to the series. Editors would still need to be careful not to add works that are just parts of another work.
  2. Turn off artists column on artist works page and search results page.
  3. Add/replace subwork prefix with work name on work - edit page. This would (selectably) either replace all text preceding the first colon with the work name or add the work name as a prefix (followed by a colon).
  4. Modify Import from Discogs script to import grouped tracks into MB flat structure with colon separation.

Just a quick point re track title grouping. In Picard, Classical Extras attempts to do this for classical works (if you want to use track titles rather than work names) by applying the work structure to the titles. Where CSG has been followed this works perfectly. In other cases it works so long as a reasonably consistent approach to track titles - i.e. including the parent work name(s) - has been adopted. Obviously it is not a solution for non-work-related groups.

:blush: you’re right ! removing these items right away!

Actually there could be a very easy fix which do not require any scripting, using User Stylesheets. I’ve started to test it, it seems to work. I’ll put this in a separate topic “Quick fixes of MB UI at user level”

Indeed, when there are workarounds available we should promote them. This enables to focus development work on the most critical issues for which there are no workaround. I didn’t know about this script. I definitely need to test it!

I agree that the work search feature could be improved. When editing tracks/works relationships, the default match which uses the track title often doesn’t work due to difference of language, or of the tracks naming conventions. But it’s easy to address by replacing the default search text by the right keywords. For example: Bach "BWV 345", Leclair op. 2 no. 3
It’s not as efficient as having directly the right suggestion, but it’s quite efficient anyway.

Indeed, this toolbox seems very useful! it should definitely be pinned …

Did that. Will look through the rest of this post carefully when I have some more time. Some bits already have tickets (and are things I hope to eventually work on), some don’t but seem doable, some are currently very unlikely to happen except in the distant future (inheritance, which I’m not completely sold on personally tbh, and probably track grouping, which I’d love to have but does involve very significant changes).

Try “work name AND Bach” or whatnot for that :slight_smile: It’s admittedly harder for any artists whose artist name isn’t in the Latin script, but it’s useful for most of them.

1 Like

Possibility to copy artist linked to a recording, and paste him/her to another recordings together with all attributes. Especially when editing operas, it is pretty cumbersome to enter the same information on many recordings: artist name, “vocals”, type of vocals (tenor, soprano, …), “credited as” etc. Sometimes it is possible to apply a change for all relationships of the same artist on the page, but for large releases it does not work since the same artist may play different roles in different operas in the same release. It would be great if a reference together with all attributes could be copy-pasted.

Thanks, I’ve added this to the list.
But I’m wondering if there is not an existing workaround already …
If you have set the tracks artists relationships, you can then use Replace recording artists to set the recording artists based on the tracks artists relationships. It’s simple and easy … I’ve just tested it, it works great. Basically you set once the artists relationships on the tracks, then the script does all the work of setting the recording artists based on the tracks

When entering them you can batch-add them to only the selected recordings, but you probably know that :slight_smile: When editing existing ones though this is a problem, yes. Not only a classical-related issue, but probably more common in classical.

That’s a pretty simple change (@Bitmap wrote most of the required code as it is for the collapsible release events), and it’s something that has bugged me for a while but somehow I never thought about just fixing like that. So I just put a PR up for it - no promises on when it’ll get merged, but it will eventually get out there :slight_smile: I went for 4 artist credits, not 2, since I don’t mind the row being a bit “chunkier” and I think that gives a better quick idea than just 2 :slight_smile:

Huh, how often does this actually happen in your experience? My experience is that barely anyone enters aliases in the first place, much less change them :confused:

Actually, if we launch a clean-up of works names, it should happen quite a lot.
For two reasons:

  • when we clean-up work names, one of the recommendations would be to keep the old name as alias, unless it is very wrong. This point is important as we don’t want to throw away all the existing work that has been done in work naming. Just clean up to have consistent naming rules.
  • if we are consistent in naming works in a given language, there will be need to have translations in other languages

One more enhancement: when opening a release in “edit relationships” mode, have a possibility to collapse/expand each media (CD) separately, as well as all at once (“collapse all” / “expand all”). Currently collapsing/expanding is possible when viewing a release, but not when editing relationships.

I often edit releases with 40 and more CDs (“Complete Works of …”) where it is pretty inconvenient to have all CDs expanded. As an example, go to this one, click on “edit relationships” and enjoy :wink:

1 Like

This should be achievable through a user script … I’m not good at scripting, but this should be easy.

Here is a user script which does the trick. Not pretty, but it works.

// ==UserScript==
// @name         MusicBrainz UI: Make tracks collapsible in Release "Edit Relationships"
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Make  tracks collapsible in Release "Edit Relationships"
// @author       You
// @grant        none
// @include      http*://*musicbrainz.org/release/*/edit-relationships
//// ==/UserScript==

/* global $ */

$(document).ready(function(){
    $('#content>p:first-of-type').after('<p id="collapsibleEnabler"><a>Click here to enable collapsible media</a></p>');
    $('#collapsibleEnabler').click(function(){
        $('.subh td').each(function(){
            $(this).css("width", $(this).width());
        });
        $('#tracklist tr:not(.subh)').slideToggle();
        $('.subh  td:first-child').append('<span class="collapse-mark collapsed"><a>▶</a></span>');
        $('.subh').click(function(){
            $(this).nextUntil('tr.subh').slideToggle();
            $(this).children().find("span.collapse-mark").toggleClass('collapsed expanded');
            $(this).children().find("span.collapsed a").replaceWith('<a>▶</a>');
            $(this).children().find("span.expanded a").replaceWith('<a>▼</a>');
        });
        $('#collapsibleEnabler').hide();
    });
});

[edited: managed to get the user script to work]
[edited: fixed the issue of column width of media row changing when collapsing the tracks]
[edited: fixed the issue of batch-add button disappearing, and added :arrow_forward:/▼ marks to indicate collapsible status]

1 Like

Works like a charm, thank you!

You’re welcome! I wish all the other issues were that easy to fix!

Small improvement: I fixed the column width of the media row, which was changing when tracks were collapsed.

Tested. Works even better!

I was too fast. Unfortunately there is one problem which currently reduces usability of the script: when collapsible media are activated, the button to batch-add relationships disappear. Normally it is located just above the list of media.

That’s fixed. Just needed to be a bit more specific when hiding table rows!
And to make it pretty, I’ve added a marker to indicate whether the media is collapsed or not.

1 Like

Here is a small script to display track groups, using an analysis of track titles to identify the track groups titles.
It should work well for releases which follows the " Classical / Track / Title" guidelines.

It works best when credits are displayed at the bottom.

Userscript to display tracks groups
// ==UserScript==
// @name         MusicBrainz UI: Display Tracks Groups
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include      http*://*musicbrainz.org/release/*
// @exclude      http*://*musicbrainz.org/release/add
// @exclude      http*://*musicbrainz.org/release/*/*
// @exclude      http*://*musicbrainz.org/release/*/*
// @grant        none
// ==/UserScript==

/* global $ */

$(document).ready(function(){
    $('div.annotation').after('<p id="tracksgroupsEnabler"><a>Click here to display Tracks Groups</a></p>');
    $('#tracksgroupsEnabler a').click(function(){
        $('#content .tbl.medium').each(function(){
            var trackGroupLevel = 0;
            var currentTrackGroupTitle = '';
            $(this).children().find('tr').not('.subh').each(function(){
                var trackTitle = $(this).children().find('.mp bdi').html();
                if (trackTitle !== undefined) {
                    var trackTitleSplit = trackTitle.match(/(.*?)\s*:\s*(.*)\s*/);
                    if (trackTitleSplit !== null) {
                        var [,trackGroupTitle, movementTitle] = trackTitleSplit;
                        if (trackGroupTitle !== currentTrackGroupTitle){
                            currentTrackGroupTitle = trackGroupTitle;
                            $(this).before("<tr style='background-color: #c8c8c8;'><td></td><td colspan='4'><strong>" + currentTrackGroupTitle + "</strong></td></tr>");
                        }
                        $(this).children().find('.mp bdi').html(movementTitle);
                    }
                }
            });
        });
        // $('#tracksgroupsEnabler').hide();
    });
});

It’s a rough script, to be tested. Let me know what you think about it.