Advertisement
sanitysama

How to re-tag Vocaloid albums using VocaDB CSV export

Apr 18th, 2017
1,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.33 KB | None | 0 0
  1. ================================
  2. 0. Introduction - How tagging using VocaDB normally works:
  3. ================================
  4.  
  5. Every album page on VocaDB has a "Download track info as CSV" button which allows you to download a CSV file which has all the album information on the page consolidated into this file. You can then use the CSV data to tag your MP3 files with the right software by denoting which fields are being used where, and using a special character to logically separate the fields. For example, the default set of metadata fields you'll receive if you just click the button are:
  6.  
  7. %title%;%title%%featvocalists%;%producers%;%album%;%discnumber%;%track%
  8.  
  9. So just clicking the Download CSV button on (http://vocadb.net/Al/1027) results in:
  10.  
  11. Tell Your World;Tell Your World feat. 初音ミク;kz;Tell Your World;1;1
  12.  
  13. Which you can stick into special tagging software that knows how to split these metadata fields into the proper fields where they're supposed to be (the user will also have to set that part up.) The above fields would be split up in your MP3 tagging software as follows:
  14.  
  15. %title%;%artist%;%performer%;%album%;%discnumber%;%track%
  16.  
  17. A full list of the metadata fields supported by VocaDB are listed on the following page:
  18. http://wiki.vocadb.net/wiki/12/album-track-format-strings-for-the-custom-csv-export
  19.  
  20. A partial list of metadata tags that foobar recognize are listed here (they're usually interpreted literally: COMMENT == %comment%):
  21. http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Titleformat_Reference#Remapped_metadata_fields
  22.  
  23. That is the vanilla process explained, however I can teach you some ways to speed this process up which I use to very nearly automate the lengthy, tiring process of tagging hundreds if not thousands of albums at a time.
  24.  
  25. ================================
  26. 1. Resources
  27. ================================
  28.  
  29. foobar2000 http://www.foobar2000.org/download
  30. Notepad++ (for regular expressions if you deem it necessary) https://notepad-plus-plus.org/download/v7.3.3.html
  31. Greasemonkey or other alternative if you want to use my userscript (speeds things up but I can understand if you don't want to take this step) https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ (obviously requires Firefox)
  32. My userscript adds a custom "Do Something" button to the top of every album page that just downloads album information CSV files directly, so you don't have to keep filling in that field with a custom filter. https://pastebin.com/FUsreQdj
  33.  
  34. Required components
  35. http://www.foobar2000.org/components/view/foo_run
  36. http://www.foobar2000.org/components/view/foo_masstag
  37. Make sure to install all optional components, particularly the File Operations (foo_fileops) component when installing foobar. Then you can open foobar's preferences and add your Vocaloid folder to your library under 'Media Library' if you want to start using fb2k as your main player, or you can just drag and drop all the folders you want to sort in.
  38.  
  39. ================================
  40. 2. Greasemonkey Script [optional but recommended to save some time]
  41. ================================
  42.  
  43. Setting up my userscript: Click the Greasemonkey icon on the top right in Firefox, 'New User Script...' paste https://pastebin.com/FUsreQdj into the box, save, then visit any VocaDB download page to test. A "Do Something" button will be at the top of the screen. Click it and it will download the album information the same as the "Download track info as CSV" button below it, except it will automatically use the following set of delimiters:
  44.  
  45. %artist%¶%discnumber%¶%track%¶%title%¶%album%¶%releaseyear%¶(%releaseevent%) %producers%%featvocalists%
  46.  
  47. Notice that I'm using a different delimiting character than default semi-colon. For some reason those crazy Japanese love to use the semi-colon in their production titles and releases and it occurs quite often in Vocaloid releases. One character I've literally never encountered in all my years of collecting is the pilcrow (¶).
  48.  
  49. Keep in mind if you want to change the above set of fields, add more fields, remove fields, or make any changes whatsoever, you're going to have to edit my userscript and you're going to want to do that right now.
  50.  
  51. ================================
  52. 3. Search for a VocaDB album directly from foobar/How to set up Keyboard Shortcuts in foobar
  53. ================================
  54.  
  55. [[https://i.imgur.com/U3gH7ih.png]]
  56.  
  57. First thing we need to do is set up our foo_run component in foobar.
  58.  
  59. Open foobar preferences and go down to 'Run Services'.
  60. Click "Add" and 'Label' it whatever you want. This command will run an album search using the album tag of the currently selected album.
  61. Path: http://vocadb.net/Search?filter=$replace($replace(%album%, ,+),-,+)&searchType=Album
  62.  
  63. [[https://i.imgur.com/8EEF76v.png]]
  64.  
  65. Then go up to 'Keyboard Shortcuts' in preferences and add a hotkey for it. Filter by whatever you labeled your command and it will show up in the middle panel. Highlight it and give it a good hotkey. I use Ctrl+Alt+Q (as in "query"). Test your hotkey by selecting an album or the entire album, and press the hotkey you assigned. 97% of the time it should go directly to the release page but sometimes you'll have to click the correct one in the search results.
  66.  
  67. ================================
  68. 4. Set up File Operations presets (foo_fileops)
  69. ================================
  70.  
  71. [[https://i.imgur.com/X8VPxAt.png]]
  72. [[https://i.imgur.com/rYhcyI9.png]]
  73.  
  74. Next, right-click any file you have in there and "File Operations > Move to > ..."
  75. Pick a static folder where you want your completed/tagged files to go. Mine is H:\Music\!_mikudb
  76.  
  77. You should set up at least three presets.
  78.  
  79. [Artist - Album\01. title.mp3] Normal albums where all the %artist% fields are the same
  80. File name pattern: %artist% - %album%/%tracknumber%. %title%
  81.  
  82. [Album Title\01. track.mp3] Plain single disc various artist albums where the %artist% fields are all different.
  83. File name pattern: %album%/%tracknumber%. %title%
  84.  
  85. [Album Title\101. track.mp3] Multiple disc various artist albums, if you want all the tracks in the same folder.
  86. File name pattern: %album%/%discnumber%%tracknumber%. %title%
  87.  
  88. For each of these go to the top right Presets field type names for each preset and click Save. Just the same as the last step you should create hotkeys for these presets.
  89.  
  90. ================================
  91. 5. Set up File Operations presets part 2 (foo_fileops)
  92. ================================
  93.  
  94. [[https://i.imgur.com/LPJr1wU.png]]
  95.  
  96. Next click the "Rename" radio tag and we'll set up some more presets for fixing just bad filenames.
  97.  
  98. example of a bad filename "ALBUM_ALBUMTITLE-DISC1_01-ARTIST-TITLE.MP3"
  99.  
  100. This rustles my jimmies and should bother you too. Set up two presets like pic related. I have one for multiple disc sets (which I prefer to see all files in the same folder named 101., 201., etc.)
  101.  
  102. nn.title -> %track%. %title%
  103. [disc]nn. title -> %discnumber%%track%. %title%
  104.  
  105. Give those presets hotkeys. I use Ctrl+Alt+1 for nn.title and Ctrl+Alt+2 for multiple discs because it just makes sense to me (most multi-CD sets are 2CDs)
  106.  
  107. ================================
  108. 6. Fucking Finally
  109. ================================
  110.  
  111. We're going to start tagging. Pick an album you want to tag in your foobar playlist. Click the group title of the album (it should select all the tracks) and hit your hot key to search VocaDB. 97% of the time the album you need tags for pops up immediately, sometimes it doesn't find it right away and you need to search it again, but it's okay because the hotkey brings that search field up for you.
  112.  
  113. Next hit "Do Something" at the top, and it will ask you to save or open with. We don't need this file for long so just open it with Notepad++. It _will_ ask you every time whether you want to open it or save it regardless if you click 'save this option for next time' or not. This is because the server doesn't properly declare MIME/file types so your browser doesn't know what file type it truly is, only its extension.
  114.  
  115. [[https://i.imgur.com/HKVfMEc.png]]
  116.  
  117. Once the file is open in Notepad++, you can click "Edit -> Clear Read only flag" if you want to edit the file.
  118.  
  119. ================================
  120. 7. [OPTIONAL] Wipe out "feat. vocaloid" and those pesky "()" empty event tags.
  121. ================================
  122.  
  123. This next step is controversial and optional, only do this if you're following this tutorial verbatim and didn't modify anything above here: I don't like seeing "featuring artist" in my tags. At this point I hit Ctrl+H to open Find and Replace panel, select the Regex search radio button at the bottom and I use this to remove feat. artists and the (occasionally) empty "event" field at the end of the strings. The event field is just there if you want it to be. You'll have to edit it out of the userscript I wrote earlier if you don't want it.
  124.  
  125. Find " feat.*?(¶[0-9]¶.*[0-9]{4}¶)(\(\) )?(.*$)"
  126. Replace "$1$3"
  127.  
  128. ================================
  129. 8. Mapping the metadata to the files
  130. ================================
  131.  
  132. [[https://i.imgur.com/Qs3BbgF.png]]
  133.  
  134. Next, Ctrl+A the notepad document, Ctrl+C, and go back into foobar. Make sure all the same files are still highlighted, and this part is important: MAKE _DAMN_ SURE the files are in the _CORRECT_ TRACK ORDER. You're about to re-tag them all so it'll be a shit show if the files aren't loaded into foobar in the correct track order. (If you do mess up and re-tag the files in the wrong order: don't try to fix it; just re-download the album! It's not worth your time.)
  135.  
  136. Right click the album group, go down to Tagging > Manage Scripts (protip: you can bind a hotkey to open this "manage Scripts" window for you, too!)
  137.  
  138. You're going to click "Add > Input data (one line per track)" then double click the "Input data (one line per track)" field that is added up above on the left.
  139.  
  140. Scheme: %artist%¶%discnumber%¶%track%¶%title%¶%album%¶%date%¶%comment%
  141. Input data: Ctrl+V paste the album data, click OK
  142.  
  143. Under "Tracks to process" on the right you'll see all the changes it's about to make to your files. If everything looks good, click Run.
  144.  
  145. After you're satisfied with the tags, you can run your File Operations hot keys to rename the files to "01. title.mp3" and rename/move the folder to "album title" or "artist - album title"
  146.  
  147. ================================
  148. 9. Damn this tagging thing is a whole lot easier now
  149. ================================
  150.  
  151. That's all. If you're doing it right at this point it shouldn't take more than 20 seconds to retag an album, which comes out to just over an hour to re-tag as many as 200 albums using this process. It'd take phenomenally less time if Riipah would just fucking add freedb query support to VocaDB but he's openly stated that's never going to happen. Oh well, we work with what we have and this is about as best as I've managed to figure it out.
  152.  
  153. I briefly considered writing my own foobar component just for VocaDB and tagging Vocaloid albums but I can't into programming. It'd be pretty simple. Albums are stored by ID numbers, which are in the URL when you look at the release page, and the same number is used to get the CSV file. All the component would have to do is 1. Find the database ID for the album 2. Grab the album data specified with your own customized delimited set of meta fields 3. Write the tags to the respective files and download cover art (the same number is also used to grab the album cover.) Simple!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement