Author Topic: Additional Tagging & Reporting Tools  (Read 931863 times)

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Hi,
re this:
https://getmusicbee.com/forum/index.php?topic=3833.msg140371#msg140371

Does arithemtic operations work with Search & Replace ?

I'm attempting (on Tag1 = 160)
Step 1
Search for:
^(.*)
Replace with:
$Div($1,2)

Results in:
"$Div($1,2)"
not
80
which I was attempting for...

Where's my brainfart here... does S&R not work with the arithmetic operations...? or is my syntax messed...?
Churs.
c.
this won't work directly, but you can define virtual tag with any formula and use this virtual tag in asr.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Ah!

Since you're back, what does ASR stand for?
I asked this on the forum a while back, and nobody knew the answer…
ASR is "Advanced Search & Replace" (plugin command). MSR is "Multiple Search & Replace" (multi-step search & replace, another plugin command).

hiccup

  • Sr. Member
  • ****
  • Posts: 7868
ASR is "Advanced Search & Replace" (plugin command). MSR is "Multiple Search & Replace" (multi-step search & replace, another plugin command).
I'm sorry, I was confused.
(a bit tired and having a drink ;-)

I meant to say: what does TOY mean?

boroda

  • Sr. Member
  • ****
  • Posts: 4595
EDIT: Disregard.

For the last few days, I've been trying to use the plugin's $Len() function with the built-in $If() function and have been running into an issue.

Let's say $Len(<Composer>) is 8.
Code
$If($Len(<Composer>)=8,T,F)
$If($Len(<Composer>)>0,T,F)
$If($Len(<Composer>)>7,T,F)
...all should return "T," which they do.


Code
$If($Len(<Composer>)>9,T,F)
...correctly returns "F."


Code
$If($Len(<Composer>)>10,T,F)
...incorrectly returns "T." From then on, all numbers up to 79 return "T" when then they should be false. If I insert a leading zero ahead of $Len()...


Code
$If(0$Len(<Composer>)>79,T,F)
...I get the correct result "F."

Is $Len() is returning the number as a string?
it's strange. $Len() returns just number without leading zeros and it works fine for me. but $If(0$Len(<Composer>)>10,T,F) alway results in F in my case.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
I meant to say: what does TOY mean?
it's for historical reasons. initially ASR had no auto-applying capability and some asr presets like "copy tag", "swap tags" seemed to be toys, because corresponding dedicated plugin commands were much more powerful. all these presets were created just for demonstration of ASR capabilities. now only "swap tags" asr preset is just a useless toy, while other "toy" resets may be useful.

hiccup

  • Sr. Member
  • ****
  • Posts: 7868
it's for historical reasons.
Ah! So it literally means toy.
Me (and everybody else) were searching for the meaning behind it as it being some acronym.
Just so you know, some brain-cells have been sacrificed because of this ;-)
Last Edit: July 09, 2021, 07:54:54 PM by hiccup

boroda

  • Sr. Member
  • ****
  • Posts: 4595
I think I have a bug with $Random? It keeps adding a prefix and suffix segment when I ask for a number.

If I do anything 2 or lower, it will print D0#5 (# being the random number)
If I do anything up to 30 it will print D1<number>5.
If I do anything up to 315 it will print D2<number>5.
etc.

So for example, if I do "$Random(100) and the value is 57, it will print "D2575"

What's going on here?
thanks for bug report. it' fixed. i'll upload fixed version later.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9349
it's for historical reasons.
Ah! So it literally means toy.
Me (and everybody else) were searching for the meaning behind it as it being some abbreviation.
Just so you know, some brain-cells have been sacrificed because of this ;-)
Thanks for ending the mystery boroda. I'm one of the "everybody else" who lost brain cells trying to figure out what T O Y meant.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

boroda

  • Sr. Member
  • ****
  • Posts: 4595
it's for historical reasons.
Ah! So it literally means toy.
Me (and everybody else) were searching for the meaning behind it as it being some abbreviation.
Just so you know, some brain-cells have been sacrificed because of this ;-)

by the way, you are not the only guy who asked why these presets are named "toy" :) . i  want to change prefix for these presets (which duplicate other plugin commands) to something else, while keeping them together in preset list (presets are sorted alphabetically, that's why i need prefix). could you suggest something other than "toy: "?

hiccup

  • Sr. Member
  • ****
  • Posts: 7868
could you suggest something other than "toy: "?
I think I'd better leave that to native English speakers…?

edit
Who am I kidding, I have an opinion on everything ;-)
Maybe something like 'basic'?

Or an alternative starting with the letter 'a', so they are top of the list?
Last Edit: July 09, 2021, 08:16:34 PM by hiccup

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Would this plugin have the capability of combining two different play counts? I've spent time between foobar and iTunes and it's not looking good on finding a way to combine the two diff play count tags.



Edit: So I found this option here:



but this doesn't actually combine (add one into the other, 1+2=3) it just takes both of the tags and incorporates them into 1 tag. Would it be possible to get an option to do this?

edit: if anyone ever comes across this, you can use a program titled Mp3Tag to combine two different play counts.
you can use arithmetic functions in virtual tags.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Let's hope he's OK...

On another bug note - I'm using the latest portable build of Musicbee (3.4.7764) and every time I try to enable the latest version of mb_tagtools  I get an error telling me: "Unable to initialise plugin: mb_TagTools.dll Exception has been thrown by the target of an invocation." - anyone know how to get round this and get the tools working again? I miss the support it gives!
i wish i could pin this advice on the topic: try to close mb, delete file <mb appdata folder>\mb_TagTools.Settings.xml and start mb again.
Last Edit: July 09, 2021, 09:41:34 PM by boroda

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
i wish i could pin this advice on the topic: try to close mb, delete file <mb appdata folder>\mb_TagTools.Settings.xml and start mb again.

Me too.
That simple trick immediately fixed my months-long issue of the "Create" and "Edit" popups in the ASR window opening silently and the only way of closing them being SHIFT + ALT + F4.  ???

Another thing, is there a tutorial available somewhere for the Library Reports feature? I think I can use it to automatically rate albums based on the number of tracks (by taking the album <Track Count> divided by the number of <Love>d tracks), but I haven't been able to quite figure out how to use them.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
the only tutorial is readme on add-on page. i'm too lazy to write complete tutorial, but i'm ready to help you here.

i think you need the opposite to what you wrote. grouping fields must be <album artist>,<album>,<loved> and calculated field must be 'average count(<loved>/<url>)'. save 'average count' to custom tag (or assign virtual tag function id) only if <loved>='L'

boroda

  • Sr. Member
  • ****
  • Posts: 4595
new version of plugin is available:

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

* fixed $Random() function
* 'change case' command now has no button for setting asr default excepted words, because asr presets anyway use explicit list of excepted words.
* 'TOY: *' presets are renamed to 'Example: *' presets. also, i've changed their descriptions. import new presets after installing new plugin version. 'TOY: Swap tags' preset is removed from plugin package (because it's completely useless), but you need to manually delete it (it won't be automatically deleted on importing new presets).