Author Topic: Advanced tag editing - injecting & swapping multiple values ?  (Read 4943 times)

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Heya.
In MusicBee, I have yet to find a way to do some of the following:

- Tag 'inject at position' ?
(
i.e.
- trackA - has genres [Africa; Latin; Afrobeat; Psychedelic]
- trackB - has genres [Africa; Latin; Funk; Psychedelic]
I would now like to add another tag at a given position, for both of them (or the whole album, or 1000s of tracks) at the same time - i.e. insert a new tag at position '3', let's say the inserted value should be 'Nigeria'
So the result should be:
- trackA - has genres [Africa; Latin; Nigeria; Afrobeat; Psychedelic]
- trackB - has genres [Africa; Latin; Nigeria; Funk; Psychedelic]
)



- swap (add & remove) value/s across multiple files that share the same ?
(
i.e.
- trackA - has genres [Africa; Latin; Afrobeat; Psychedelic]
- trackB - has genres [Africa; Latin; Funk; Psychedelic]
I would now like to change, Africa; Latin; to "Afro-Cuban;" (without affecting the other existing & differing tags...)
So the result should be:
- trackA - has genres [Afro-Cuban; Afrobeat; Psychedelic]
- trackB - has genres [Afro-Cuban; Funk; Psychedelic]
)


Is this possible in MusicBee ?

Cheers.
c.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Steven implemented limited functionality for swapping tag positions in the tag inspector at my request, but it only works for one track at a time.
Last Edit: December 14, 2016, 08:55:16 PM by psychoadept
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Thanks for the info!
Bummer, I was hoping there's a way for multi-file edits.
Fair enough though, then this part of my workflow needs to stay in foobar as well.
Cheers.
c.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
This should be possible with the 'Search and Replace' tool, but for some unknown reason it doesn't work with the genre field.
All other fields (except, of course, Artist and Composer where there is a display name option) work and save the changes to the tag but Genre only gets saved to the database and won't update the tags.
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
This should be possible with the 'Search and Replace' tool, but for some unknown reason it doesn't work with the genre field.
All other fields (except, of course, Artist and Composer where there is a display name option) work and save the changes to the tag but Genre only gets saved to the database and won't update the tags.
genre is working fine for me. Are you sure you didnt choose "Genres" (i guess that should be excluded from the list)

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
working fine for me. Are you sure you didnt choose "Genres" (i guess that should be excluded from the list)
My apologies Steven.  I must have been using "Genres" as "Genre" is working perfectly.
MusicBee and my library - Making bee-utiful music together

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Sweet, I'll try search & replace on the weekend on both mp3 & flac files, which have slightly different way to handle multi value tags.
Thanks for the info @everyone!
c.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
working fine for me. Are you sure you didnt choose "Genres" (i guess that should be excluded from the list)
My apologies Steven.  I must have been using "Genres" as "Genre" is working perfectly.
Actually, it's not working perfectly.
If I have two genre tags;
  • Pop Soul
  • Neo-Soul
using Search and Replace;
search: Pop Soul
replace: Pop Soul; Contemporary Pop

when saved I still end up with two tags;
  • Pop Soul; Contemporary Pop
  • Neo-Soul
It's not split at the separator to form 3 tags - even if file is rescanned.
Custom tag for Muscians Credits List and Involved People List will split at separator and form new entry.
MusicBee and my library - Making bee-utiful music together

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
I've also been testing and seen some oddities - or rather, different than I expected behaviour w multi value value field search & replace methods.
This is based on a query w python / mutagen on some files I edited through MusicBee's search & replace...

original MusicBee search string:
Dubstep
Replacement string (some nonsense...):
Stubstep; Dubstep


Result:
--------------------------------------
.mp3:
was:
TCON': TCON(encoding=<Encoding.LATIN1: 0>, text=[u'Metal', u'Drum n Bass', u'Dubstep', u'Breakcore'])
became:
TCON': TCON(encoding=<Encoding.LATIN1: 0>, text=[u'Metal', u'Drum n Bass', u'Stubstep; Dubstep', u'Breakcore'])

.flac
was
[u'Dubstep', u'DMZ', u'Brixton']
became:
[u'Stubstep; Dubstep', u'DMZ', u'Brixton']
--------------------------------------

So on the short test, I have not managed to have MusicBee inject multi value tags correctly, but only as literal string replacements. Which means this could only done via replace 1 genre field at a time.
Correct ?

I'm still in the 'trying to understand ID3' clusterf*ck conventions phase... and how MusicBee or Mutagen for that matter, display those. [one question here - as MusicBee also displays the ID3 single Genre [TCON] as a multi value field - what is the field delimiter we can play with on search & replace ? to re-inject multiple fields for 1 found search string ? i.e. similar to the above... but writing u'Stubstep', u'Dubstep' as mult values instead of u'Stubstep; Dubstep' single value to the 'genre' field) ?]


Whereas flac does internally manage all as single value fields anyway afaik (i.e. similar to how MusicBee portraits it in the TagInspector:
GENRE: genreValueA
GENRE: genreValueB
etc
)

Any input here re the details would bee grand.
Cheers.
c.
Last Edit: December 15, 2016, 11:18:11 AM by alec.tron

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Bump.

As I can remove multi value fields w 'search & replace' in flac & mp3 files (as I would expect this to work):

This:
[u'Metal', u'Drum n Bass', u'Dubstep', u'Breakcore'])
with Search & Replace syntax:
Metal; Drum n Bass
"Replace with" value:
asdfg
correctly produces this:
[u'asdfg', u'Dubstep', u'Breakcore'])

but I have yet to find a way to do the same the other way...

Doing additive Search & replace in turn produces this:
[u'Metal', u'Drum n Bass', u'Dubstep', u'Breakcore'])
with Search & Replace syntax:
Metal
"Replace with" value:
Metal; asdfg
incorrectly produces this, converting what should be multi-values with a delimiter, to a single string injected into a multi-value fueld, i.e.:
[u'Metal; asdfg', u'Drum n Bass', u'Dubstep', u'Breakcore'])


Would be great to know if:
- This is possible (i.e. to use 'search & replace' to inject additional multi-values in Musicbee properly with multi-value field delimiters) ? How so / which delimiter to use ?
- This is not working, but on the to-do list
- This is a no-change / working as intended

Cheerio.
c.

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Bumpety bump.

Since this functionality is half way there, but produces bad tag syntacx the other way around as described above - it would be great to know if:
- This is possible (i.e. to use 'search & replace' to inject additional multi-values in Musicbee properly with multi-value field delimiters) ? How so / which delimiter to use ?
- This is not working, but on the to-do list
- This is a no-change / working as intended

Cheerio.
c.

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Since I now found a satisfactory solution, thanks to Boroda74's help and his
Additional_Tagging_and_Reporting_Tools
http://musicbee.wikia.com/wiki/Additional_Tagging_and_Reporting_Tools
https://getmusicbee.com/forum/index.php?topic=3833

And the - Advanced Search & Replace tool in there, I thought I'd document it here as well as it might help others.
---------------------------------------------
I created a custom preset that (by default, but easily switchable as needed) looks for value 1 and replaces it with value 2, and correctly handles multi-values & separators too.

So, in ASR (= Advanced Search & Replace):
Enable <Tag 1> (as 'Genre' for my use case)
Enable <Custom text 1> (in the preset rules) - and add a default value if you wish, eg "Bass Music; Dubstep;"
Enable <Custom text 2> (in the preset rules) - and add a default value if you wish, eg "Bass Music; UK Garage; UK Funky;"

In the preset rules, fill out FieldName : "value" [without the " ]:
Step 1:
Search for:

"\@1"
Replace With:  
"\@2"

This will look for <Custom text 1> in the files selected defined field, and replace it with <Custom text 2>.
Then preview & apply if it is as expected and multi values will get injected with separators corectly.

Also, more info from boroda74, which as well might help someone as I struggled to find the correct variable names in ASR:
"$1", "$2", etc. can be used *only* for captured substitutions, not for searching. for example: search for "^acdc(.*)", replace by "dcac$1", then "acdc2" will be replaced by "dcac2".

Churs.
c.
Last Edit: June 06, 2017, 04:12:56 AM by alec.tron