Regarding new Bit-Depth Information field

With audio info fields, there are suffixes added (kBit/s, Hz, etc.).
This is fine because all audio files read by Mp3tag have these values.

For the new Bit-Depth info field, I have %_bitspersample%-bit, which works great.
However, there is no Bit-Depth info available from MP3's as far as I know, so for all my MP3's, I just see "-bit" in this field (it's the same in foobar2000 BTW).

Is there any way to customize it so it only shows the suffix IF a value is present?

Thanks!

Yes, you can use

$if(%_bitspersample%,%_bitspersample%-bit,)

in the column configuration.

Kind regards
Florian

Great! Thank you and Happy Holidays!

Actually, thinking about this further, would it be possible to do this:

if there is no bit-depth show "N/A"
if there is bit-depth, append "-bit" to the value.

Sure, just change it to

$if(%_bitspersample%,%_bitspersample%-bit,N/A)

in the column configuration.

Happy Holidays to you too!

Florian

OK I see how that works - I was concerned about having the "/" in there.
Now I just need to do the same thing in foobar.
Thanks again!

I modified a column so that it reads shows "16 bits" rather than "16-bit". The column name is BITDEPTH.

Is it possible to create a FLAC tag with this information? I tried to do it by adding the tag in the Tag Panel configuration, but it doesn't show up in the tag panel.

[Never mind the question above. I was able to create an Action Item that writes the BITDEPTH tag in the file. However, the preferred information in the "P.S" below is still an ideal goal.]

Dennis...

P.S. I would prefer a FLAC tag like the example below if it were possible to extract this information from the file, where FORMAT is the FIELDNAME, A is the encoded file format, F is the sample rate, W is the bit depth or word length and M is the music format in the payload. Other values for M might be values like 5+1, 7+1, etc. Obviously media players should be able to handle whatever format they are designed to play, but it would be very handy to be able to display this information as metadata.

FORMAT=A=FLAC; F=44100; W=16; M=Stereo

FORMAT <== 'A='$regexp(%_codec%,'[\U\D]',)'; F='%_samplerate%'; W='%_bitspersample%'; M='%_mode%

... or ...

FORMAT <== 'A='$regexp(%_codec%,'[\U\D]',)'; F='%_samplerate%['; W='%_bitspersample%]'; M='%_mode%

... or ...

Format <== ['A='$regexp(%_codec%,'[\U\D]',)]['; F='%_samplerate%]['; W='%_bitspersample%]['; M='%_mode%]

DD.20151222.0755.CET, DD.20151222.1833.CET,

I have no idea how you came up with this, but the second version works perfectly. Thank you very much.

I never would have been able to figure this out without your help.

Dennis...aka "d2b"

I Agree! However, I would like to ask what your setup is like that you would want that info embedded in the file tag, when most software (at least the stuff I use, dbPowerAMP, foobar2000, SqueezeBox) is capable of giving me this info. Not challenging your need for it, just curious. :wink:

One other thing I thought might be cool, can we put a multiplier in for the Frequency column?

Right now, it is %_samplerate%Hz, which displays 44100Hz, or 4800Hz.

I would like to display it as 44.1kHz or 48kHz

$cutRight(%_samplerate%,3)$trimRight('.'$right(%_samplerate%,3),'.0')' kHz'

48000 ==> 48 kHz
44100 ==> 44.1 kHz
22050 ==> 22.05 kHz
12000 ==> 12 kHz

Merry Christmas!
DD.20151225.0831.CET

Nice! Thanks so much for this. Merry Christmas to you too!

Sorry to have taken so long to reply. I like the idea of the multiplier but it is not critical to our mission. We will probably standardize on the "kHz" suffix even though the actual number represents "samples per second" rather than "frequency."

The reason for wanting this FORMAT information as a FLAC tag is to simplify the management of a very large collection of FLAC files in the form of a media collection on a file server used for personal libraries as well as libraries or FLAC archives for professional uses. In our specific case, we want to allow for users that may have multiple versions of a particular recording with different formats (sample rate, word length or bit depth, stereo vs. surround sound, etc.)

We believe it preferable to search the metadata (FLAC tags, an extended set of Vorbis comments) for all of the different search criteria one might wish to specify regarding the payload, including the FORMAT tag's values.

What we really need is a dedicated search tool with a simple GUI for searching a large collection of FLAC files for desired content stored in a library comprising several layers of nested folders, with the capability of using several criteria at the same time, something like this:

Search --> ARTIST and/or/not TITLE and/or/not FORMAT and/or/not --> Results

where each of the several criteria are selected from a wide range of tags, such as ALBUMARTIST, ARTIST, ALBUM, COMPOSER, TITLE, PERFORMER, FORMAT, LOCATION, etc.

A typical application might be a search for all of the content with songs composed by Paul McCartney or perhaps those performed by Bob Dylan at a specific venue in a given year. The search tool should continuously index the content of the entire library and yield near-instantaneous results, listing the results by directory paths (folder names) as well as the file name(s). The resulting links should open the file for playing in the default FLAC media player when double-clicked or permit dragging the resulting file into a media player playlist folder or window.

Note that we expect the world to soon gravitate to FLAC as the file format for choice for downloads and streams. No other choice seems reasonable to us, as we anticipate the demise of optical discs in all forms. Optical discs don't make any sense to us as they are nothing but relatively costly digital media storage devices that are fragile and clumsy to handle and to search for desired content on shelves or in boxes. They are also costly to ship and to hold in inventory for retail purposes. Naturally, there are numerous market-driven factors that interfere with the time line for accomplishing what we view as a no-brainer. :astonished:

Does this make sense to you?

I've attached an earlier screen shot from mp3tag to illustrate the length to which we wish to embed metadata in our files here at radio station KVMR-FM radio here in Nevada City, California.


I cannot make this work. I keep getting this message: [SYNTAX ERROR IN FORMATTING STRING]. I must not understand what you have written or perhaps I am making a typographical error.

Is it possible for you to write out the entire sub-string beginning with "F=" and ending with the semicolon ";" that precedes the W in the complete FORMAT string?

Thanks...

Dennis, aka "d2b"

Not sure where you're entering the string, but I have entered it in the "Value" field for "Frequency" via the Customize Columns dialog box, copied and pasted exactly from DetlevD's post.

Thanks for taking the time to explain. For a radio station, I can appreciate how having that info embedded in separate, searchable tags would be useful.

For me, with albums in my library in lossy and lossless formats, I denote them in the Album tag.
For MP3 or other lossy files, the album title will just be the original. For Lossless, I will include the format and possibly some other details. For example:

"Album Title" (no other info if lossy format)
"Album Title [Vinyl]"
"Album Title [FLAC]"
"Album Title [24-96 Vinyl] [FLAC]"
"Album Title [WAV]"
"Album Title [AIF]"

etc.

This will also be the name of the actual album folder under the artist folder.

This makes it easy for me to do an album search via my Squeezebox server to find lossless albums. It was also an effort to keep the amount of metadata/tags to a minimum for the SQL database used by Squeezebox. I don't have a need for finer granulation (yet. lol)...

You mentioned live stuff, which I have kind of obsessed over and came up with my own system based on reading threads here and at MusicBrainz.org. If the album does not have a proper title (i.e., bootlegs), I just use the gig info for the album title:

"Venue Name [City, State] [MM.DD.YY]"

(or "Venue Name [City, State] [MM.DD.YY] [FLAC]", etc.)

[City, State] is replaced by [City, Country] for shows overseas.

If there is no venue info available, it becomes:

"City, State [MM.DD.YY]"

City is always spelled out, State or Country is always abbreviated.

As for the shortening of 44100 to 44.1, etc., that was merely a request to DetlevD so I could make the columns narrower and display the sample rate how I'm used to seeing it.

Have a Happy New Year! :music:

Format <== ['A='$regexp(%_codec%,'[\U\D]',)]['; F='$cutRight(%_samplerate%,3)$trimRight('.'$right(%_samplerate%,3),'.0')' kHz']['; W='%_bitspersample%]['; M='%_mode%]

Example output ...

DD.20151230.2057.CET


I prefer to add it as part of an Action Item that post-proccesses the files after ripping and tagging. What i don't know is the text of the full string, as I indicated in my last post.

I had it working earlier without the Hz or kHz suffix. I copied and pasted exactly from DetlevD's post at 19:50 CET with the same failed result.

Dennis, aka "d2b"

See attachment png image.

Dennis, aka "d2b"


Dennis, please have a closer look into your example string, at the right side of 'kHz', there is one closing square bracket ] too much, how got it there?

DD.20151230.2147.CET