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

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9445
Wishlist suggestion/enhancement...

Make the ASR drop-downs selection accessible via typing the first letter of the tag. For example, <Tag 1> drop-down field is currently populated with "Comment" and I want to change it to "Title." Using the drop-down I have to scroll from "C" to "T". It would be nice to be able to type "T" with the drop-down dropped down and have it go to the first tag starting with the letter "T."

Thanks for considering.
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

hiccup

  • Hero Member
  • *****
  • Posts: 8014
I'm gonna wait a little while before adding these functions to the Tips&Tricks topic.
This needs some more testing (and bug-hunting?), and карбоск will help me to come up with some good English sentence/title examples for each of the 4 functions.

Here's a challenge for you guys:

Take this title:

Code
an all-in-one, forty-two bar r&b vs. neo-progressive rock medley: a journey (uma viagem) (moby remix)
And have it turn out like this:

An All-in-One, Forty-Two bar R&B vs. Neo-progressive Rock Medley: A Journey (Uma Viagem) (Moby remix)

In case it is helpful, this is a list of words I have assembled for Lower_case_words:

Code
a an and as at but by for if in nor of off on or per so the to up via vs. yet album alternate demo edit extended live mono re-remix remix single stereo version
There may be more that should be in it?

spoiler alert, I think this may be impossible at the moment.
E.g. it looks like the function should not be capitalising the last word when it is at the end, but between round brackets.
Not sure, maybe have some rules that only affect anything that is between round brackets?

Have fun!


PS
@boroda, have you considered having only one $TitleCase function instead of 4 versions?
One that can use any or all of the three parameters?
Maybe have it mandatory for the formula to always contain three comma's, where it is optional for the user to put parameters in any of the three positions?
So:

$TitleCase(mandatory,optional,optional,optional)

So a basic version would look like:
$TitleCase(<Title>,a an and,,)

and something like:
$TitleCase(<Title>,,&,)
would also work?
(pretty useless, but to show what I mean)
Last Edit: April 29, 2024, 04:47:03 PM by hiccup

karbock

  • Sr. Member
  • ****
  • Posts: 376
@boroda, have you considered having only one $TitleCase function instead of 4 versions?
$TitleCase(mandatory,optional,optional,optional)
I was about to propose the same.
Search
  Forum •   Wiki
Tips
MB File Paths •  Update Patches
$Functions() •  Regular Expressions
Tag Symbols •  Tag Mapping

karbock

  • Sr. Member
  • ****
  • Posts: 376
An All-in-One, Forty-Two bar R&B vs. Neo-progressive Rock Medley: A Journey (Uma Viagem) (Moby remix)
Tricky questions are posed here.

HYPHENS
  • According to the MLA Handbook:
    Forty-Two, Neo-progressive (because neo- is a prefix)
  • According to the Chicago Manual of Style:
    Forty-Two, Neo-Progressive

SUBTITLES
To address this topic, TitleCase would need a fifth parameters indicating after what characters a subtitle starts.
Examples:
:(space)
(space)-(space)


I don't think it's necessary to overload the coding (and the coder  :)) for minor cases like that.


There are already cases impossible to solve without AI anyway. Example:
  • Lifting off the Ground
    'off' is a short preposition, and should not be capitalised.
  • Taking Off, No Looking Back
    'off' is an adverb, and should be capitalised.

Moreover, English and French for example have totally different title case rules.

TitleCase4 is already a wonderful tool.
Search
  Forum •   Wiki
Tips
MB File Paths •  Update Patches
$Functions() •  Regular Expressions
Tag Symbols •  Tag Mapping

hiccup

  • Hero Member
  • *****
  • Posts: 8014

According to the MLA Handbook:
Forty-Two, Neo-progressive (because neo- is a prefix)
According to the Chicago Manual of Style:
Forty-Two, Neo-Progressive

All true, but before making this some deep discussion on what proper capitalisation for English is (which doesn't have a singular answer to begin with), allow me to present a couple of real-world titles that each has its own challenges.
These may help with testing this some more.

act I: a gentleman's honor (vocal)

merry christmas mr.lawrence - theme - (live)

it better end soon - 3rd movement (guitar solo) (live)

chalk dust - the umpire strikes back

1st of tha month (k&d session™)


Of course it will be impossible to cover all cases and preferences, but it would be good to strive to get some basics right?
(until somebody creates an LLM AI plugin that will properly capitalise anything that is thrown at it, irrespective of the language)
Last Edit: April 29, 2024, 09:27:53 PM by hiccup

boroda

  • Hero Member
  • *****
  • Posts: 4748
Using AT&RT v8.1.8885.8927 I select a track and open ASR  via a toolbar button and this error gets thrown. But not every time I try. Clicking "OK" doesn't close the error window. Clicking "OK" a second time does. But at that point the all the toolbar button is inactive, As are all other toolbar buttons. I close MB via the X and restart and it runs and I can use ASR again. But at some point withing the next five minutes, it errors again.

Code
MusicBee v3.6.8884.15285P  (Win10.0), 29 Apr 2024 6:48:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.get_FrameDimensionsList()
   at System.Drawing.ImageAnimator.CanAnimate(Image image)
   at System.Drawing.ImageAnimator.ImageInfo..ctor(Image image)
   at System.Drawing.ImageAnimator.Animate(Image image, EventHandler onFrameChangedHandler)
   at System.Windows.Forms.PictureBox.Animate(Boolean animate)
   at System.Windows.Forms.PictureBox.Animate()
   at System.Windows.Forms.PictureBox.InstallNewImage(Image value, ImageInstallationType installationType)
   at System.Windows.Forms.PictureBox.set_Image(Image value)
   at MusicBeePlugin.AdvancedSearchAndReplace.initializeForm()
   at MusicBeePlugin.PluginWindowTemplate.PluginWindowTemplate_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@phred, try to use this version for a while. it's debug version, the error messages will be more detailed, they will contain the line number in the code where the exception is thrown:

https://www.mediafire.com/file/odmp6wgn9hg7hfi/mb_TagTools_debug.zip/file

boroda

  • Hero Member
  • *****
  • Posts: 4748
Hello!

I've kept an Excel file which has hundreds of songs with custom tags. I'd like to import the custom tag values into MusicBee. I've tried:

1) Copying cells from the Excel file, pasting into a text file -> Additional Tagging & Reporting Tools > Copy Tags > Copy from <text file>, as well as <clipboard>.
-> This says I have 1 too many tracks than I actually had in the text file, and says "Number of tags in text file (X) doesn't correspond to number of selected tracks (Y)"

2) AT&RT > Paste Tags from Clipboard - Having included the names of the tags in the clipboard. I copied from the Excel file. This again says I have 1 too many tracks in my clipboard.

3) AT&RT > Paste Tags from Clipboard - Not including the names of the tags. This says "Unknown tag name in clipboard".

Could you please advise what I need to do to make this work?
Not sure if this is the right place to post this - sorry if it's not!

could you pm me your excel file, so i can take a look at it?

boroda

  • Hero Member
  • *****
  • Posts: 4748
Wishlist suggestion/enhancement...

Make the ASR drop-downs selection accessible via typing the first letter of the tag. For example, <Tag 1> drop-down field is currently populated with "Comment" and I want to change it to "Title." Using the drop-down I have to scroll from "C" to "T". It would be nice to be able to type "T" with the drop-down dropped down and have it go to the first tag starting with the letter "T."

Thanks for considering.

do you mean typing anything in the read-only tag combo box? if you want to search the tag by the first letter only, then i could see what i can do for this.

boroda

  • Hero Member
  • *****
  • Posts: 4748
I'm gonna wait a little while before adding these functions to the Tips&Tricks topic.
This needs some more testing (and bug-hunting?), and карбоск will help me to come up with some good English sentence/title examples for each of the 4 functions.

Here's a challenge for you guys:

Take this title:

Code
an all-in-one, forty-two bar r&b vs. neo-progressive rock medley: a journey (uma viagem) (moby remix)
And have it turn out like this:

An All-in-One, Forty-Two bar R&B vs. Neo-progressive Rock Medley: A Journey (Uma Viagem) (Moby remix)

In case it is helpful, this is a list of words I have assembled for Lower_case_words:

Code
a an and as at but by for if in nor of off on or per so the to up via vs. yet album alternate demo edit extended live mono re-remix remix single stereo version
There may be more that should be in it?

spoiler alert, I think this may be impossible at the moment.
E.g. it looks like the function should not be capitalising the last word when it is at the end, but between round brackets.
Not sure, maybe have some rules that only affect anything that is between round brackets?

Have fun!

ohh, no, hiccup! isn't it too complicated?  ;)

boroda

  • Hero Member
  • *****
  • Posts: 4748
@boroda, have you considered having only one $TitleCase function instead of 4 versions?
One that can use any or all of the three parameters?
Maybe have it mandatory for the formula to always contain three comma's, where it is optional for the user to put parameters in any of the three positions?
So:

$TitleCase(mandatory,optional,optional,optional)

So a basic version would look like:
$TitleCase(<Title>,a an and,,)

and something like:
$TitleCase(<Title>,,&,)
would also work?
(pretty useless, but to show what I mean)

this is what i've tried to make initially. but it turned out that this is not supported by MB for custom functions. though, i'm sure, MB supports this internally. at least .NET allows this style of coding. i can't make this without Steven's support. we've pm'ed each other about adding support for this style to MB, but i'm still waiting for his answer. at least the answer "i won't do this".

EDIT:

sorry, i actually meant this style of code:

$TitleCase(<Title>)
$TitleCase(<Title>,text1)
$TitleCase(<Title>,text1,text2)

as for this style:

$TitleCase(mandatory,optional,optional,optional)
$TitleCase(<Title>,a an and,,)
$TitleCase(<Title>,,&,)

it should be very easy for Steven to add support for this. all custom function parameters have type "string". MB could just pass empty strings as literally empty strings to the plugin.
Last Edit: April 30, 2024, 05:36:41 AM by boroda

boroda

  • Hero Member
  • *****
  • Posts: 4748
Using AT&RT v8.1.8885.8927 I select a track and open ASR  via a toolbar button and this error gets thrown. But not every time I try. Clicking "OK" doesn't close the error window. Clicking "OK" a second time does. But at that point the all the toolbar button is inactive, As are all other toolbar buttons. I close MB via the X and restart and it runs and I can use ASR again. But at some point withing the next five minutes, it errors again.

Code
MusicBee v3.6.8884.15285P  (Win10.0), 29 Apr 2024 6:48:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.get_FrameDimensionsList()
   at System.Drawing.ImageAnimator.CanAnimate(Image image)
   at System.Drawing.ImageAnimator.ImageInfo..ctor(Image image)
   at System.Drawing.ImageAnimator.Animate(Image image, EventHandler onFrameChangedHandler)
   at System.Windows.Forms.PictureBox.Animate(Boolean animate)
   at System.Windows.Forms.PictureBox.Animate()
   at System.Windows.Forms.PictureBox.InstallNewImage(Image value, ImageInstallationType installationType)
   at System.Windows.Forms.PictureBox.set_Image(Image value)
   at MusicBeePlugin.AdvancedSearchAndReplace.initializeForm()
   at MusicBeePlugin.PluginWindowTemplate.PluginWindowTemplate_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@phred, try to use this version for a while. it's debug version, the error messages will be more detailed, they will contain the line number in the code where the exception is thrown:

https://www.mediafire.com/file/odmp6wgn9hg7hfi/mb_TagTools_debug.zip/file

@phred, i'm not able to reproduce this bug, but i've made some tweaks which could fix it. re-download debug version from the same link if you've already downloaded it.

hiccup

  • Hero Member
  • *****
  • Posts: 8014
Take this title:
Code
an all-in-one, forty-two bar r&b vs. neo-progressive rock medley: a journey (uma viagem) (moby remix)
And have it turn out like this:
An All-in-One, Forty-Two bar R&B vs. Neo-progressive Rock Medley: A Journey (Uma Viagem) (Moby remix)
ohh, no, hiccup! isn't it too complicated?  ;)

Yes, absolutely. And not something realistic that should be asked for to be possible to achieve.
It was meant as both some fun challenge, and for me to learn better how the function works and what it can (and can not) do.

The five other examples I presented later are probably better to test things though. They are actual titles, each with one or two realistic challenges:

Quote from: hiccup
act I: a gentleman's honor (vocal)
merry christmas mr.lawrence - theme - (live)
it better end soon - 3rd movement (guitar solo) (live)
chalk dust - the umpire strikes back
1st of tha month (k&d session™)

boroda

  • Hero Member
  • *****
  • Posts: 4748
The five other examples I presented later are probably better to test things though. They are actual titles, each with one or two realistic challenges:

Quote from: hiccup
act I: a gentleman's honor (vocal)
merry christmas mr.lawrence - theme - (live)
it better end soon - 3rd movement (guitar solo) (live)
chalk dust - the umpire strikes back
1st of tha month (k&d session™)

my english is too poor for such challenges. could you post the right casing for these titles?

boroda

  • Hero Member
  • *****
  • Posts: 4748
Wishlist suggestion/enhancement...

Make the ASR drop-downs selection accessible via typing the first letter of the tag. For example, <Tag 1> drop-down field is currently populated with "Comment" and I want to change it to "Title." Using the drop-down I have to scroll from "C" to "T". It would be nice to be able to type "T" with the drop-down dropped down and have it go to the first tag starting with the letter "T."

Thanks for considering.

if i correctly understood you, then not skinned combo boxed always supported searching for first letter on typing. i've added support to the skinned combo boxes (to read-only combo boxes only, when you actually can't type text). this is a bit extended support. if the combo box can't find an item begging with typed letter, then it searches for items begging with symbol (e.g. "<"), and having the typed letter as the second character.

https://www.mediafire.com/file/odmp6wgn9hg7hfi/mb_TagTools_debug.zip/file
Last Edit: April 30, 2024, 10:35:28 AM by boroda

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9445
@phred, try to use this version for a while. it's debug version, the error messages will be more detailed, they will contain the line number in the code where the exception is thrown:
Will do, boroda. It's installed and will be working with it in a few hours and will report back. Thanks.
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