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 - Maxo

Pages: 1
1
I'll jump in.  I have some time to kill this morning.
What I recommend, for anyone new to programming, is to write them out as separate macros and then combine them later.
Funny enough with your explanation of what you wanted you already provided it.

Macro1: $IsNull(<Album Library>,,Macro2)
Macro2: $If(<Album Library>=1,<Publisher> - <Genre>,Macro3)
Macro3: $If(<Album Library>=2,<Developer> - <Console> - <Sound Team> - <Original Album>,Macro4)
Macro4: $If(<Album Library>=3,<Comment> - <Publisher>,Macro5)
Macro5: $If(<Album Library>=4,<Work> - <Original Year>,)

First check if <Album Library> is null.  If so output nothing.  This takes care of the "unknown" problem.  As you can see, highlighted in red, the false portion of each statement leads down to the next macro.  This way all the different cases are checked.  This is called nesting and is how you can arrange a binary output into a multiple output format.

From here you just have to combine them into the single statement it should be.  For this step I prefer to work backwards.  Cut-n-paste all of Macro5 into Macro4 at the appropriate spot and work your way up the chain until you are done.

$IsNull(<Album Library>,,$If(<Album Library>=1,<Publisher> - <Genre>,$If(<Album Library>=2,<Developer> - <Console> - <Sound Team> - <Original Album>,$If(<Album Library>=3,<Comment> - <Publisher>,$If(<Album Library>=4,<Work> - <Original Year>,)))))

This would be the final product.  Call it something useful like TrackInfo and save it.  Now you can add this to your header and remove all the other fields this handles.  Hopefully I explained how to do this in a manner that will allow you to make any needed changes.

This is incredibly helpful and works super well.  I really appreciate you taking the time to lay this out for me!

One small caveat though, in regard to the $IfNull function, I'm not so much concerned about whether or not the macros in question would display with "Unknown" if the Album Library field is empty, and am more concerned with the fields included *within* the macro returning empty fields as "Unknown".. and of course the formatting of the result in question.  

For example, if I have an album in Album Library = 2 that doesn't include fields like Original Album or Sound Team, with this code it would return, say:
"HAL Laboratory - Super Nintendo - Unknown Sound Team - Unknown Original Album"
If I want to make the unknowns in these specific fields vanish, alongside the displayed text preceding them: " - ", how would I need to amend $IfNull for these macros?  
Again, I want to make sure that the end result doesn't look like:
"HAL Laboratory - Super Nintendo -  - "
and instead, would look like:
"HAL Laboratory - Super Nintendo"
Thank you so much again!

2
If you can specify in more detail what you want A and B to do, I'm sure you will get some useful replies and more specific suggestions or solutions.
Or, do a forum search and take a look at some posted virtual tags and try to learn from those.
(it's more rewarding ;-)

Well, I'll do both!

What I'd love is something like (explaining in layman's terms)
if Album Library is 1, output Publisher - Genre
if Album Library is 2, output Developer - Console - Sound Team - Original Album
if Album Library is 3, output Comment - Publisher
if Album Library is 4, output Work - Original Year

I should also mention that I'd like the output to display nothing if the field is empty, rather than "Unknown _____".  I know that requires the $Trim and $IfNull functions.

3
Yes, the $If function is available for that.
See the MusicBee functions for virtual tags cheatsheet.

But you will need to create your own custom and/or virtual tags for what you consider to be a category, since <Category> is an already existing internal MusicBee tag.
(music/audiobook/podcast, etc.)

Awesome, this is very helpful!  Thanks so much for the quick reply.  I actually have a separate tag I'm gonna use for these categories called "Album Library" with values from say, 1-4 referencing each category I'm describing here.  I found a reference for a $if true/false function.. I'm not too great with coding in this way, how would I set up a function with more than just a binary output?

4
Apologies if this has been asked before, it's been a bit hard finding a specific answer here.  

A little background first, I have a big library that's split into different sections, specifically Video Game Music, Film / Series Scoring, Classical, and Everything Else.  I use Album Cover display for all of these with drop down panels.

I'm curious if, using virtual tags, I can have different tags displayed in the header based on which category these albums fall under.  

For example, for my video game music collection, I'm currently displaying the tags, "Developer" "Console" "Original Album" and "Sound Team" (3 of 4 of which are custom tags, btw).  I have a virtual tag that combines Developer and Console since all albums in the library include them, while Original Album & Sound Team are only featured for selections that include these fields.

However, if I flip over to my other playlists with any material without these fields, I have pretty much no remaining space in the panel preferences to display other fields like "Genre" or "Publisher" or anything else, since they're all being taken up by tags that only pertain to other parts of my library.

Is there a possible $if function that would help set up conditions that would change the displayed fields based on which category the files in question fall under?  For example, something like $If(<Album Library>="1" etc etc.

Any tailored info on this would be helpful.  I'm finding that combining tags in a virtual tag is a bit too cumbersome to account for what I'd like to display in 4 or more different ways while still keeping it looking visually clean and uniform between all my categories.

EDIT:
What I'd love is something like (explaining in layman's terms)
if Album Library is 1, output Publisher - Genre
if Album Library is 2, output Developer - Console - Sound Team - Original Album
if Album Library is 3, output Comment - Publisher
if Album Library is 4, output Work - Original Year

I should also mention that I'd like the output to display nothing if the field is empty, rather than "Unknown _____".  I know that requires the $Trim and $IfNull functions.

5
Hey Maxo, welcome to the forum.

This was recently discussed on this topic: https://getmusicbee.com/forum/index.php?topic=42019.0
Have you experimented with restricting the column number found on this setting?
Thanks so much for the reply!

Yes, I have "3" checked for the column restriction, and it's applied for seemingly all albums, except for these two in question.  I tried changing it to 2, 1 and non-restricted again to see if it changed anything, and all it did was adjust the space between the title and the duration, no change to the single-column w/ big line breaks look.

EDIT: I found the problem.. for whatever reason the track number metadata was copied into the disc number metadata, it eluded my eye!  Feel free to close the thread!

6
Questions / Improper track spacing in under-album listing in Albums view
« on: December 15, 2024, 07:49:03 PM »
Hey all, been using MusicBee for the first time this year and it's great!  Ran into a weird lil quirk or bug while updating the metadata in my library.  For some reason both The Argument & Instrument Soundtrack (top image, shown album & the album to its left) have the tracks weirdly spaced out and don't fold into new columns as I have in my preferences for this orientation & view (bottom image).  No other albums seem to be acting this way and I can't seem to find anything unusual in the metadata (like weird unicode or lots of spaces etc.) to account for it. Was wondering if anyone else has encountered this type of issue or has any solutions, thank you!

By the way, I'm running MusicBee Vers. 3.5.8447 on a Mac through Parallels & Windows 11 if that's needed info or relevant in any way



Pages: 1