getmusicbee.com

Support => Questions => Topic started by: hamma on December 06, 2012, 07:02:47 AM

Title: Missing leading zero
Post by: hamma on December 06, 2012, 07:02:47 AM
How can i list all tracks with missing zeros in track number?
How do i have to set "organizing files (STRG+R)" to automatically add leading zero to track number?
Title: Re: Missing leading zero
Post by: Zak on December 06, 2012, 04:06:56 PM
How can i list all tracks with missing zeros in track number?
There's no way to test for tag length, so the best I could come up with is the following virtual tag:
$If($Left(<Track#>,1)=$Right(<Track#>,1),Yes,No)
...on the premise that a single digit track number will give the same result if checked from the left as the right. If you display this in a column and sort by it, all of your single digit tracks will appear together (under "Yes"). You'll still have to check the tracks manually though, because this will also match on track numbers 11, 22, 101 etc.

How do i have to set "organizing files (STRG+R)" to automatically add leading zero to track number?
There's actually three ways you can do this. You could create a virtual tag:
$Pad(<track#>,2)
which won't update your tags, but just displays the extra zero when you use it in MusicBee.

To update the value in the tag itself:

You can use Tools > Tagging Tools > Renumber Tracks, which includes an option for including leading zeroes.

Finally, under Preferences > Layout > Configure Fields there is an option for setting the disc-track# formatting. If you use "00" as the track number it will be padded to two digits in at least the File Organiser and probably some other places too.

Hope one of these is useful!
Title: Re: Missing leading zero
Post by: hamma on December 06, 2012, 04:11:09 PM
Thanks alot.
Title: Re: Missing leading zero
Post by: paq on December 06, 2012, 05:49:01 PM
How can i list all tracks with missing zeros in track number?
There's no way to test for tag length, so the best I could come up with is the following virtual tag:
$If($Left(<Track#>,1)=$Right(<Track#>,1),Yes,No)
.

A better virtual tag would be $If($Pad(<Track#>,2)=<Track#>,true,false) which will show true for tracks where <Track#> are padded to 2 digits and false otherwise. Change the number 2 in the virtual tag to check for tracks padded with more zeroes.

But then, this is unnecessary if you go with the first or third option provided by Zak, because then it doesn't matter what is stored in your files, the presentation will be consistent anyways with the setting of your choice.
Title: Re: Missing leading zero
Post by: eugenesv on December 28, 2015, 02:15:04 PM
I know the thread is old, but it's the first oneI found on this topic in Google, so likely other people with the same problem will end up here as well. So I'd like to propose a better solution.
... You'll still have to check the tracks manually though, because this will also match on track numbers 11, 22, 101 etc.
There is a direct route to get leading zeros that would also avoid the issue you describe with 11, 22 etc. Just use the following virtual tag
$If($Left(<Track#>,1)=0,z,n)
It simply checks if the first symbol from the left in the track number is 0 and if it is, returns 'z', otherwise returns 'n' (of course, you can change return code to whatever you like)
Title: Re: Missing leading zero
Post by: eugenesv on December 28, 2015, 02:17:46 PM
A better virtual tag would be $If($Pad(<Track#>,2)=<Track#>,true,false) which will show true for tracks where <Track#> are padded to 2 digits and false otherwise. Change the number 2 in the virtual tag to check for tracks padded with more zeroes.
Unfortunately, your proposal will fail if there is a two-digit number in the track number (e.g. 12), since the padded function will return the same value (12) as the tag itself.
Title: Re: Missing leading zero
Post by: TomRowly on May 20, 2016, 11:54:10 PM
Just FYI for those who don't want to faff around:

 You can go into your Music and show all music. Sort by Track#. Select the first instance of track 1, scroll down until you start seeing track 2. Hold down shift and click on the final instance of track 1. Now you can right click and edit the files and change the track number of all of your highlighted tracks to 01 instead of 1.

You only have to do this 9 times (one for each of the numbers 1 - 9) and you'll have it done. I know it's a bit long-winded but it's simple and will work 100% with no checking etc.
Title: Re: Missing leading zero
Post by: Freddy Barker on March 02, 2017, 11:46:00 AM
Hi.....

I tried renaming all the Tracks '1' to '01' and '2' to '02' etc. by using EDIT for the appropriate track list, thinking it would just update the MB library, but the changes updated the M4A music file as well, meaning a lot of backups for the newly amended files...also not sure what was being changed.

Would like to try the Virtual or Custom TAG to pull in the Track# and add 0 if < 10 but having no luck thus far.

Any tips would be much appreciated...

Cheers.......
Title: Re: Missing leading zero
Post by: vincent kars on March 02, 2017, 06:03:16 PM
Quote
but the changes updated the M4A music file as well

Normal behavior
The Library reflects the values ot the tags in the audio files.
If you change (edit) anything this will be written to the tags as well

If this would not be the case, all your edits are lost the moment you loose the libray
Likewise they won't show up the moment you move your files to e.g. a portable, other computer, etc.
Title: Re: Missing leading zero
Post by: hiccup on March 02, 2017, 06:15:45 PM
Would like to try the Virtual or Custom TAG to pull in the Track# and add 0 if < 10 but having no luck thus far.

Have you tried a virtual tag like: $Pad(<Track#>,2)

Explained here: http://musicbee.wikia.com/wiki/Functions
Title: Re: Missing leading zero
Post by: Freddy Barker on March 02, 2017, 07:51:29 PM
Quote
but the changes updated the M4A music file as well

Normal behavior
The Library reflects the values ot the tags in the audio files.
If you change (edit) anything this will be written to the tags as well

If this would not be the case, all your edits are lost the moment you loose the libray
Likewise they won't show up the moment you move your files to e.g. a portable, other computer, etc.

Thanks very much Vincent, now that you've explained it, I get it...

Much obliged to you!
Title: Re: Missing leading zero
Post by: Freddy Barker on March 02, 2017, 07:54:18 PM
Would like to try the Virtual or Custom TAG to pull in the Track# and add 0 if < 10 but having no luck thus far.

Have you tried a virtual tag like: $Pad(<Track#>,2)

Explained here: http://musicbee.wikia.com/wiki/Functions

Cheers Hiccup(s)

I have the "$Pad(<Track#>,2)" thing on a Notepad, but wasn't quite sure where to place it!!

I'll have a read of the link you kindly provided and see what I can do with it!!

Cheers  ::) 
Title: Re: Missing leading zero
Post by: hiccup on March 02, 2017, 08:13:31 PM
You'll figure it out.
Otherwise the night-shift will probably be able to help you out.
No iSupport here  ;-)
Title: Re: Missing leading zero
Post by: Freddy Barker on March 03, 2017, 03:04:42 PM
You'll figure it out.
Otherwise the night-shift will probably be able to help you out.
No iSupport here  ;-)


Hi again Hiccup(s) and thanks for the reply...

I'm not completely technophobic, and I did understand most of those instructions, but not the HOW to start the process off with the Virtual TAG thing or where EXACTLY to insert the "$Pad(<Track#>,2)" part, so any assistance from the night or day shift would be most appreciated!!

Thanks very much  ;D
Title: Re: Missing leading zero
Post by: hiccup on March 03, 2017, 03:24:55 PM
Go to Preferences > Tags (1) > and click: [Define New Tags]
Enter a label name for your virtual tag and it's formula:

(http://i.imgur.com/UDzSsSF.png)

Save and close.
After that you should find the (name of your) new virtual tag available in drop-down menu's.
Title: Re: Missing leading zero
Post by: Freddy Barker on March 03, 2017, 03:39:00 PM
Now that is exceptional fast service!

Thank you so much  :o
Title: Re: Missing leading zero
Post by: Freddy Barker on March 03, 2017, 03:55:35 PM
Hi Hicupp(s)

Awesomeness!!

Worked great!

Thanks so much!!

 ;D