getmusicbee.com

Support => Questions => Topic started by: garbanzo on August 03, 2017, 08:55:38 PM

Title: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: garbanzo on August 03, 2017, 08:55:38 PM
Can someone help me with this? I could probably figure it out eventually, but it would take a lot of trial-and-error.

What I want is to split a duration like 356:25 into 5 hours, 56 minutes, 25 seconds, including some conditional checks to only display the hours bit if the duration is actually greater than an hour.

Huge thanks hanks to anyone who offers to help me out 8)
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Droppisalt on April 18, 2018, 10:59:44 PM
Hello,

Have you figured it out?
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: redwing on April 19, 2018, 01:39:59 AM
Additional Tagging Tools plugin now supports arithmetic operations. Check out the wiki for the list of supported functions.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: boroda on April 19, 2018, 01:35:19 PM
there is ASR preset for this. you can use any ASR preset as virtual tag function.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Droppisalt on April 19, 2018, 03:38:56 PM
I have no idea how this works. I tried looking at the wiki and I still don't get how this works.
I installed ATT and I'm trying to figure it out.

Also
there is ASR preset for this. you can use any ASR preset as virtual tag function.
I can't find ASR presets :/

If anyone knows how to do it quickly, please let me know.
Any help is appreciated
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: boroda on April 19, 2018, 04:59:06 PM
its "Convert 'mmm:ss' or 'mmm.ss' in '<Tag 1>' to 'hh:mm:ss' in '<Tag 2>'" preset. to make it to work as virtual tag function select it, then enter some word in "assign virtual tag function id" field, click 'save all' button and restart mb.

use function $ASR(<URL>,your_id) in virtual tag.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: redwing on April 19, 2018, 05:43:13 PM
Also you can use this, modifying the format to your liking:

Code
$If($Div($Split(<Album Duration>,:,1),60)<1,<Album Duration>,$RoundDown($Div($Split(<Album Duration>,:,1),60),0):$Pad($Mod($Split(<Album Duration>,:,1),60),2):$Split(<Album Duration>,:,2))
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Droppisalt on April 24, 2018, 12:58:15 AM
its "Convert 'mmm:ss' or 'mmm.ss' in '<Tag 1>' to 'hh:mm:ss' in '<Tag 2>'" preset. to make it to work as virtual tag function select it, then enter some word in "assign virtual tag function id" field, click 'save all' button and restart mb.

use function $ASR(<URL>,your_id) in virtual tag.

For some reason, I can't import any presets. I just get the "No presets were imported." error
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: boroda on April 25, 2018, 10:57:38 AM
check if there are xml files in 'musicbee\plugins\asr presets' folder.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Droppisalt on April 25, 2018, 01:36:44 PM
Oh wow, it was in a subfolder. Just moved it and now it works!

Thanks everyone!
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Boll Weevil on October 14, 2021, 06:30:24 PM
its "Convert 'mmm:ss' or 'mmm.ss' in '<Tag 1>' to 'hh:mm:ss' in '<Tag 2>'" preset. to make it to work as virtual tag function select it, then enter some word in "assign virtual tag function id" field, click 'save all' button and restart mb.

use function $ASR(<URL>,your_id) in virtual tag.
Hi!
I have spent entire evening yesterday but didn't succeed to make it work. What do I do wrong? I need help.
This is what I made. First I installed ATT and unsuccesfully tried to find a 'musicbee\plugins\asr presets' folder, because I had MS Store version installed, so I deleted it and installed a version from site. Then I checked and found that folder, installed ATT and imported ASR scripts. This is what I made next:

(https://i115.fastpic.org/big/2021/1014/da/7aefaf334bcacad1ca9ad145a5a847da.png)

Not sure if I dealed right with <Tag 2> Maybe I should have input something there?
Then I defined a virtual tag <Duration> with formula you posted above:

(https://i115.fastpic.org/big/2021/1014/6c/c7ef4e6b8c32bdb9bdd92055811c4a6c.png)

Then customized panel this way using virtual tag <Duration>:

(https://i115.fastpic.org/big/2021/1014/77/4457d64e72212c8e4db2cfc21b5cc577.png)

The result is:

(https://i115.fastpic.org/big/2021/1014/bc/cb69716e6d7e8f4890317044bf6afabc.png)

Instead of album duration it shows just duration of first track.
I'm sure I did something wrong, please help to find error
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: The Incredible Boom Boom on October 14, 2021, 07:38:47 PM
Looks to me like <Time> is the track time tag. Is there an <Album Duration> one in the drop-down list? If not, you can use @redwing's Virtual Tag.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Boll Weevil on October 14, 2021, 07:45:54 PM
No such tag in menu, and afaik <Album Duration> isn't tag, it is an MB embedded function

I tried your suggestion: SYNTAX ERROR.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: The Incredible Boom Boom on October 15, 2021, 12:43:55 AM
No such tag in menu, and afaik <Album Duration> isn't tag, it is an MB embedded function

I tried your suggestion: SYNTAX ERROR.

@redwing's Virtual Tag is standalone, like your first three tags. Assuming you're using the Additional Tagging and Tools plugin still, it should work as copy/pasted.
Title: Re: Virtual tag to split <album duration> into hours, minutes, seconds
Post by: Boll Weevil on October 15, 2021, 11:00:15 AM
I tried that way also and it didn't work for me. I'm pretty sure that I do something wrong. Maybe somebody who did it successfully could post a step by step guide for idiots, please)

Update:

redwing's code finally worked! Thanks