Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kwonnie

Pages: 1
1
Questions / Re: Hard Search Values with Functions
« on: March 31, 2019, 05:51:53 PM »
The following code will return "T" only when one of the genre tag's whole value is "Pop", otherwise it will return "F".

Code
$If($IsMatch(<Genre>,"^(.*;)?\s*Pop(;.*)?$")="T",T,F)
Hope you can achieve what you want using this example.

This did exactly what I needed it to, thank you! I can't parse the Regex at all, but I'll try becoming more acquainted with it going forward~

2
Questions / Re: Hard Search Values with Functions
« on: March 31, 2019, 03:55:31 PM »
Can you give the full context of what you're trying to do? I don't think I'm grasping the problem.


If you want to identify a track that contains 'Pop' but NOT 'Dream Pop', you can do this:

$If($Contains(<Tag>,Pop)="T",$If($Contains(<Tag>,Dream Pop)="T",False,True),False)


If you want to identify a track that contains both 'Pop' and 'Dream Pop', that's a little tougher but doable (if that's a little hard to read, it checks for 'Dream Pop', then removes 'Dream Pop' from the tag and checks again for 'Pop'):

$If($Contains(<Tag>,'Dream Pop')="T",$If($Contains($Replace(<Tag>,'Dream Pop',),Pop)="T",True,False),False)

It's not so important, but specifically, I was looking for a method of grouping tracks in the sidebar while avoiding the hassle of superfluous tags in cases where multiple values arose. So say, hypothetically, I had split "Pop" and "Rock" between two tabs and I didn't want "Rock" to display in the pop tag for tracks that share both the allotted tag for rock and pop as well as not displaying the pop tag while in the rock tab.

The solution I came up with (the fourth embedded code in my original post) worked exactly how I wanted it to, by (albeit inelegantly) listing each qualifier for the list that applied as desired.

As for the problem, looking at this hypothetically,

Code
$If($Contains(<Grouping>,Rock)="T",Rock,)$If($Contains(<Grouping>,Hardcore)="T",Hardcore,)$If($Contains(<Grouping>,Metal)="T",Metal,)

would display exactly how I want it to (all tracks with Rock, Hardcore, and Metal groupings would display in the sidebar when organized by the virtual tag in question). In a situation where a track had something like "Dream Pop; Rock", it would still display as "Rock" and Dream Pop would not appear, the way it would if I organized by Grouping instead of the virtual tag.



To this end, I had no issue. However, in situations where a search value in the $Contains function (i.e. Dream Pop) contained the value of another listed search value (i.e. Pop), I would get this issue:



This is due to the fact that the string "Dream Pop" also contains the search value "Pop".

This would happen similarly if I made a search value like "Hard Rock"; I'd get a display of "RockHard Rock". I understand why it happens, but I can't find a solution.

This is why I asked if there's any way to make an $If function read values independently when a tag contains multiple values. That way I can go from the code above to something more direct like this:

Code
$If(<Grouping>=Pop,Pop,)$If(<Grouping>=Dream Pop,Dream Pop,)

In situations where the tag only contains one value, this is fine. When it contains multiple values (i.e. "Dream Pop; Rock"), it fails to detect it, because it reads the whole string instead of the independent values.

That's why I also asked if there was a way to make $Contains or $IsMatch just pick up exactly what's listed as the search value and ignore others. Or any other solution, that is.

3
Questions / Re: Hard Search Values with Functions
« on: March 31, 2019, 02:37:04 AM »
Are you aware of the $And and $Or subfunctions?

Yes, and from what I understood of the documentation, they generally function as "meets all of these criteria" and "meets any of these criteria" respectively, which I can't imagine would help me unless I'm missing something.

4
Questions / Hard Search Values with Functions
« on: March 30, 2019, 11:12:24 PM »
I'll try to make this as straightforward as possible.

When trying to create a rule with an $If statement, and the <Tag> in question has multiple values, it fails to detect any single value independently.

For example,
<Tag> = "Dream Pop; Rock"

Code
$If(<Tag>=Dream Pop,True,False)

In such a case, it would print False because (I assume) the function reads the written string instead of independent values. It does this with or without quotation marks.

Normally, one would think to use $Contains or $IsMatch in such a situation. However, these functions don't check the string with hard search values. In other words,

Code
$If($Contains(<Tag>,Pop)="T",True,False)

and

Code
$If($Contains(<Tag>,Dream Pop)="T",True,False)

both return True with or without the search value contained in quotation marks. Likewise, $IsMatch returns the same. My problem arises when trying to use the same function to detect whether or not a tag contains x or y when either values contain one another. For example:

Code
$If($Contains(<Tag>,Pop)="T",True,False)$If($Contains(<Tag>,Dream Pop)="T",True,False)

In such a case, it would return "TrueTrue". The functionality I wish to achieve is simply printing only one value based on what's contained, regardless of how many values it has.

So my question is this:

1. Is there any way to elegantly make $If read values contained in a <Tag> independently when there's multiple values? Or,
2. Alternatively, make $Contains or $IsMatch search for an exact, hard value? Or,
3. Is there any way to do what I want through some other means? It otherwise does what I need when the search value of one $If statement is not contained in another.

5
Questions / Re: MusicBee formatting semicolons as colons
« on: March 30, 2019, 09:41:52 PM »
To replace the delimiter for display only, use a virtual tag instead of the default tag containing this line

Code
$Replace(<Tag>,"; ",:)

It's the only workaround, though it's hacky and not very intuitive. But if you only need to reformat a few tags with semicolons it might do the trick for you.

6
Questions / Multi-value Field Virtual Tag Return
« on: March 12, 2019, 03:57:22 PM »
Need help with this extremely specific problem.

I'd like my virtual tag to print the value of two custom tags (<Composition>,<Arrangement>) when the <Artist> field is empty. However, in cases where the <Composition> and <Arrangement> fields share a value, I'd like it to only print this value once, regardless of how many entries the (multi-value) tag contains.

For example:

Composition: x; y
Arrangement: x; z

Result: x; y; z


To do this, I attempted at the code below:

Code
$IsNull(<Artist>,$Replace(<Composition>,;,",")$IsNull(<Arrangement>,,$If($Contains(<Composition>,<Arrangement>)="T",$Replace(<Arrangement>,<Arrangement>,),", "<Arrangement>)),<Artist>)$IsNull(<Artists: Remixer>,,", "$Replace(<Artists: Remixer>,;,","))

However, it's unwieldy and inelegant and needless to say, it falls apart whenever the <Arrangement> tag holds more than one entry. Previously, I had it check if <Arrangement> contained <Composition> and got virtually the same result with the same problem whenever <Composition> had more than one entry... if both contained more than one entry, it simply wouldn't work properly at all (I assume because it registers the entire string instead of each entry independently).

Is there a simpler solution to printing this how I'd like?

7
Questions / Re: Unique Panel Content
« on: December 01, 2018, 09:02:21 PM »
In the library, each custom filter has the option of their layouts being individually customized.

That's called "custom views" and that only saves the layout of the main panel. To save other elements/panels as well, you need to use "custom layouts" and it works per tab. Right click on the tab header and you will see the option. You can combine the two if you want to customize everything and you could also pin your favorite tabs not to repeat the set up process every time.

Thank you, I think that's what I needed. I kind of wish this kind of customization was "window-inherent", but MusicBee suits my needs as well as I could imagine so I guess I can't complain.

8
Questions / Unique Panel Content
« on: December 01, 2018, 08:27:35 PM »
Thanks in advanced to anyone that can help me with this, if there's a solution at all.

In the library, each custom filter has the option of their layouts being individually customized. For example, I can make a filter each for Rock and Pop. In one I could customize the layout to display certain panels and change headers and track listing while customizing the other to hide those same functions; and this works perfectly fine, as long as I save the layouts individually and enable each filter to use a specific layout.

However, the categorical contents of these panels remain the same across all filters. For example, if I want the left main panel in the Rock filter to display just Composers and the left main panel in the Pop filter to display just artists, I could not do this. If I change the way any of these panels are organized for any one filter, it changes across all filters. The same goes the column browser and right sidebar, etc.

Is there any way at all to enable individual filters to utilize these panels differently?

Pages: 1