Taggerscript: Move multi-value %composer% to multi-value %composers%

Tags: #<Tag:0x00007f6d4fd20078>

I like my COMPOSER field to be a single value, not multi-value, for both compatibility reasons and for artist intent. (Japanese music tends to present writers and arrangers in the same order every time, and it’s not the same order that MusicBrainz automatically generates.)

If there is more than one composer, this taggerscript will move %composer% and %composersort% to %composers% and %composers_sort%, respectively. This frees you to put in the correct, intended composer string into the %composer% field (although few if any music library apps support the field…)

1 Like

Updated with a workaround to allow duplicate values:

$if($gt($lenmulti(%composersort%),1),

  $set(_fixedComposersSort,)
  $set(_atLeastOneComposerSortDiffers,0)
  
  $foreach(%composersort%,
    $set(_currentComposerSort,%_loop_value%)
    $set(_currentIndex,$sub(%_loop_count%,1))
    $set(_currentComposerName,$getmulti(%composer%,%_currentIndex%))
    
    $noop(You can modify the sort name here if you wish. For example - swap prefixes etc.)
    
    $if($ne(%_currentComposerSort%,%_currentComposerName%),$set(_atLeastOneComposerSortDiffers,1))
	
    $noop(-- XXX: copymerge doesn't allow duplicate values.
    $copymerge(_fixedComposersSort,_currentComposerSort)
    )
    $set(_fixedComposersSort,%_fixedComposersSort%	%_currentComposerSort%)
  )
  
  $noop(Unset composers_sort if it's not necessary)
  $if($eq(%_atLeastOneComposerSortDiffers%,0),$unset(_fixedComposersSort))
  
  $noop(Map into MP3 / Vorbis / M4A - Picard apparently reads ALLCAPS m4a tags as lower case...)
  $set(_composers_sort_field,composers_sort)
  $noop(Picard is case sensitive, so MP3 TXXX and MP4 tags must be manually handled)
  $if($eq_any($upper(%_extension%),MP3),$set(_composers_sort_field,$upper(%_composers_sort_field%)))
  
  $noop(-- XXX: copymerge doesn't allow duplicate values, so don't join from a multi-value.
  $setmulti(%_composers_sort_field%,$join(%_fixedComposersSort%,	),	)
  )
  $setmulti(%_composers_sort_field%,%_fixedComposersSort%,	)
  
  $noop(Flatten M4A instruments tag: Mutagen writes multi-value tags that can't be read correctly by foobar2000, Mp3tag, etc.)
  $if($eq($upper(%_extension%),M4A),
    $set(%_composers_sort_field%,$join($get(%_composers_sort_field%),; ))
  )

  $unset(composersort)
)

$if($gt($lenmulti(%composer%),1),
  $noop(Map into MP3 / Vorbis / M4A - Picard apparently reads ALLCAPS m4a tags as lower case...)
  $set(_composers_field,composers)
  $noop(Picard is case sensitive, so MP3 TXXX and MP4 tags must be manually handled)
  $if($eq_any($upper(%_extension%),MP3),$set(_composers_field,$upper(%_composers_field%)))
  
  $setmulti(%_composers_field%,$join(%composer%,	),	)
  
  $noop(Flatten M4A instruments tag: Mutagen writes multi-value tags that can't be read correctly by foobar2000, Mp3tag, etc.)
  $if($eq($upper(%_extension%),M4A),
    $set(%_composers_field%,$join(%composer%,; ))
  )

  $unset(composer)
)

* If you don’t change your post to wiki, you will not be able to edit it in the future, because of the post edit time limit.

Is it verified in JASRAC?

How does one do this?

J-WID does not match the same order I see in the booklets in any of the cases I checked where there are 2+ lyricists and 2+ composers. However, booklets trump right societies in the majority of cases, and the order I see in the booklets tends to not change across multiple different kinds of release groups.

1 Like

I agree I have seen the same consistency in order.
But I did not really attach that much importance to it.
But I understand one could want to preserve that… :thinking:

For changing your post to a wiki post, you have to click the ellipsis button, before the Reply button, at the bottom of your post. Then you should see this option (but it is only showing maybe for users with a certain automatic Discourse rank or trust level, not sure):

image
This is the Change post to wiki button

But then anyone can edit the wiki, not only you.

It’s very common to see the same people involved in composition and arrangement, but the order of their names are flipped. (Much more common than seeing it with lyricists and composers.) It’s clearly intentional.

VGMdb preserves the order of the names, to an extent - they are stored at the release-level without duplicates. The notes section allows for track-level credits, thereby restoring the lost duplicate names, but it’s only in text form. (Either way, you don’t get a webservice-driven app like Picard to consume the data and attach it to specific files with the correct scope.)

1 Like