Tagging for Noobs

I downloaded Picard and it is matching well … now I want to organize and write out my files but I want specific tagging. I am a noob to this tool and NOT a programmer or scripter. Is there a Dummies guide to tagging or would some kind soul be willing to lend me a hand? :sunglasses:

I am one of those needy audiophiles so I plan to share my library on a DLNA server on my home server but I want to be able to be “picky” depending on how I am listening to the music so I would like top-level folders for music format.

My ideal folder structure would be:
.[Format][Artist][Album][Track #][Song Title]

Format - MP3, FLAC, AIF, WAV, DSD, etc.
I’d like to have “Soundtracks” as an artist as applicable
I’d like to have “Compilations” as an artist as applicable

I also have a bunch of random MP3’s not necessarily grouped in an album or are single songs (aka 1 hit wonders) and not sure what to do here … any suggestions?

I think a file naming script like the following (untested code off the top of my head) will create the directory structure and file naming you are seeking, with the exception that I have included the track number and song title (along with the disc number if it’s a multi-disc album) together as part of the filename.

$if2(%_extension%,[Unknown Format])/
$if($in(%_secondaryreleasetype%,soundtrack),Soundtracks,$if(%compilation%,Compilations,%albumartist%))/
%album%/
$if($gt($if2(%totaldiscs%,0),1),%discnumber%-)$num($if2(%tracknumber%,1),2) %title%

I also encourage you to have a look at the Picard User Guide for more information and beginner tutorials.

6 Likes

I would suggest to include the release year in your structure.
There are cases where the same album from the same artist will be re-released some years (or even 20 years) later.
Without the year it becomes difficult to distinguish between the two releases.

2 Likes

Just I’m wondering, do you want to know the file extension or the type of the sampling with quality ?
AFAIK, .flac and .aif are containers for PCM. .wav is a PCM sampling file. DSD is another technology of sampling with .dsf or .dff files.
You know ie: flac can be 12/44.1 or 24/96, mono or multichannel and +.
I have interest as well to be able to read what is the type/quality of the sampling when I choose or play a track. I am thinking of;
Number of channels (2.0, 2.1, 3.0, 3.1, 4.0, …)
PCM or DSD
When PCM, number of bits (12, 24, … bits) and frequency (44.1, 48, 88, 96, … KHz)
When DSD, multiplier (34, 128, … X)
So far, my files organisation is a directory for CD (2.0/16/44.1), .flac only and another directory for HD (2.0 to 5.1/higher quality), .flac and .dsf, then subdivisions. I don’t have lossy files.
I use Kodi (do you?), so Kodi doesn’t use the physical place nor name of directories/files to populate the database, only metadata.
But what I don’t know, is Kodi able to read the above information directly from the audio part of the file?
Please, let me know what you think, what you use. Thanks

1 Like

Really not interested in year TBH. I don’t have any that would fit this criteria AFAIK.

The initial thought was my MP3’s are just lousy sound quality so I would ignore that entire directory in my good system. Most PCM is either Redbook or better. I guess I would almost want to separate Redbook with HD even though my DAC upsamples. DSD I want separate for sure.

I am experimenting with Foobar due to the plugins and flexibility. But most everything is streamed to my DAC. Foobar I can show bitrate, format, etc. but was hoping to get that level of granularity in the folder structure.

Thanks! This gets me started. I did look at the User Guide but it would be nice if there was examples in it. I.e. _format vs _extension - what does the data look like?

I’ll dig deeper and see if I can use $if to do a _bitrate > x comparison to tag HD vs Redbook.

1 Like

If you want to be picky then you might want to look at MinimServer or AssetUPnP as both will give you format/quality indexing and will make much better use of your tags (assuming you have more than the basic ones) than most.
If however you’re looking for Bios, Reviews, Lyrics e.t.c. then you’re probably better off with foobar, but it’s not a UPnP Server - unless the install the 32bit ‘UPnP/DLNA Renderer, Server, Control Point’ component, the development of which ended back in ~2015.

I already have a server app (Jellyfin) that is doing my DLNA and the files are on my home server as a share. I am just using foobar as a player.

OK … I am struggling a little bit with scripting. Using rdswift’s script above, I’d like to change the 1st $if2 to if the extension is mp3 or m4a then write “MP3”.

I think if I could see a working example of that I could get where I need to be.

Also, if I wanted it to look at all sorts of formats, can I just keep adding sequential $if statements? I.e. if for MP3, if for PCM, if for DSD …

I think you can do this by replacing the first line of the script, currently:

$if2(%_extension%,[Unknown Format])/

with somthing like:

$if($eq($upper(%_extension%),M4A),$set(_extension_type,MP3))
$noop( Add other extension remapping here as required. )
$if2(%_extension_type%,$upper(%_extension%),[Unknown])/

Then you could add other preferred conversion outputs accordingly. Note that you would only have to add the mapping where the desired extension type differs from the actual file extension.

2 Likes

You are the man! :slight_smile:
I am on a roll now … one more quick one. I want the > Redbook PCM folder to be called “PCM (HD)” and I am not sure how to do that as it keeps flagging my parenthesis as code?

That’s an easy one. You need to escape both the opening and closing parentheses with a backslash to prevent them from opening or closing a function. For example, in your case the string would need to be entered as “PCM \(HD\)”.

EDIT: You also need to do that when including dollar signs ($) and percent signs (%) in a string. Also commas (,) if they appear within a function.

2 Likes