Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Georgia: A dynamically generated fb2k theme (Read 96388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Georgia: A dynamically generated fb2k theme

Reply #125
Yeah, I saw that the eCover option didn't have any supporting code in Common.js.  I also couldn't find any reference to it with Google.  In case anyone might be interested, I added the following links.  The All Music links just perform a search and can return a lot of hits, but usually list the desired artist at the top.  I couldn't figure out how to go directly to the desired page because All Music appends a unique code to the link.
       
            case 'wikipediadisc':
                site = (artist ? 'http://en.wikipedia.org/wiki/' + artist.replace(/\+/g, '_') + '#Discography' : null);               
                break;
             case 'lastfm':
                site = (search_term ? 'http://www.last.fm/music/' + search_term.replace('/', '%252F') : null);
                break;
            case 'lastfmalbum':
                site = (search_term || album ? 'http://www.last.fm/music/' + search_term.replace('/', '%252F') + '/' + album : null);
                break;                       
            case 'allmusic':
                site = (artist ? 'https://www.allmusic.com/search/artist/' + artist.replace(/\+/g, '+') : null);
                break;
            case 'allmusicalbum':
                site = (search_term || album ? 'https://www.allmusic.com/search/album/' + search_term + '+' + album : null);
                break;  

There is probably a better solution, but I fixed the volume tooltip issue by just adding this.show_tt = true; to each of the three functions where it's checked.  Quick and dirty, but it seems to work.

When adding the caption buttons, you might want to consider also adding transport buttons for mute and console.  I find these very useful.


 
          
           
         

Re: Georgia: A dynamically generated fb2k theme

Reply #126
Hi, sorry to bother you again.  I was wondering why you changed how the playlist row height is calculated.  I personally like a larger album art and like the option to adjust it.  Fortunately I got it back by just commenting out one statement.  I'm not asking you to change it, but please don't remove this option from properties as it would just add to my already considerable retrofit woes.  For others who like to do their own customizing, I strongly recommend the freeware compare/merge program Diffuse.  Thank you again for this great theme.  To show my appreciation, I'll be making another PayPal donation when I get my next SS check and encourage others who appreciate your efforts as much as I do to do the same.

Re: Georgia: A dynamically generated fb2k theme

Reply #127
Did some fiddling on the theme since I'm liking it :-) I owned mostly Anime/VGM and since I had previously did a massive Hyperspin project , I decided to pull out the logo from it and show it in this theme instead. I reckon this theme will look awesome if I could ever convert those franchise/logo for all my VGM collection and disc art.

Mod 1:
The logo changes whenever the %genre% has Game to show the franchise/series logo. The original implementation is show artist logo. Added some custom path too for those franchies logo.

Mod 2:
Show platform (if any) on the bottom right.

Mod 3:
Also implemented a simple SpinningCDArt using setInterval to mimic my XBMC setup, which can display the spinning art with fluid animation. Strangely setting it to too frequenty (e.g 16ms) in foobar causes spectrograph to stutter. Perhaps it's not well threaded. Can't really find any other way to optimize it. Right now I'm just going to settle at 1000ms, since I don't have much good transparent disc art to begin with.

Video demo:
https://youtu.be/QB4GqJHCTY4

Note: Most of my disc art is in .jpeg with nontranparent background. The disc art demonstrated is from my custom PS skill to crop the original disc to fit it. It's going to take a lot of time to manually did all this labor. I tried various AI Background removal tool and color key but the end result is not as good, most causes uneven trim at the CD edge. So the best way is still to manually crop them and fit them in a CD art template. Couldn't find any good website for these VGM disc art with transparent BG like fanart TV. Shout me out if you want to embark on these ambitious VGM Disc Art project, or know of any!

Not sure how often will Mordred change the revision. I'm still using the version I cloned last week.

Possible next mod I'm going to do:
- Show Disc Icon instead of CD text at the top right.
- Show and fit more tags since most of my VGM include the original album and title (to include both EN and JP language)

Re: Georgia: A dynamically generated fb2k theme

Reply #128
v1.1.8-beta2 available now.

Changes since beta1:
- Really fixed tooltips now
- New functions under the Help menu with a setup verification check.
- Hovering over timeline gives you tooltips about plays (and non-plays!)
- Fixed another random crash

Re: Georgia: A dynamically generated fb2k theme

Reply #129
Hi, sorry to bother you again.  I was wondering why you changed how the playlist row height is calculated.  I personally like a larger album art and like the option to adjust it.  Fortunately I got it back by just commenting out one statement.  I'm not asking you to change it, but please don't remove this option from properties as it would just add to my already considerable retrofit woes.  For others who like to do their own customizing, I strongly recommend the freeware compare/merge program Diffuse.  Thank you again for this great theme.  To show my appreciation, I'll be making another PayPal donation when I get my next SS check and encourage others who appreciate your efforts as much as I do to do the same.
I have to recalc the row_h whenever the row font size changes, otherwise things look terrible, and I didn't want to also add menu options for that as well, so I just do 1.667*row font size which was the same as the default 12 to 20. I wanted to remove the property, but it's used in a bunch of other files, and leaving it as a property seemed safest.

Depending on how large the Header font is, the playlist album art might take up 3 or 4 rows, so you can get larger art by playing around with the header size. That might be a simpler solution and remove one less diff.

Re: Georgia: A dynamically generated fb2k theme

Reply #130
Mod 1:
The logo changes whenever the %genre% has Game to show the franchise/series logo. The original implementation is show artist logo. Added some custom path too for those franchies logo.

Mod 2:
Show platform (if any) on the bottom right.

Mod 3:
Also implemented a simple SpinningCDArt using setInterval to mimic my XBMC setup, which can display the spinning art with fluid animation. Strangely setting it to too frequenty (e.g 16ms) in foobar causes spectrograph to stutter. Perhaps it's not well threaded. Can't really find any other way to optimize it. Right now I'm just going to settle at 1000ms, since I don't have much good transparent disc art to begin with.
I like your ideas for Mod 1/2. I probably won't implement them by default as then I need to keep up with more artwork and I rarely listen to VGM, but it's still a cool idea.

Spinning art. That's pretty cool. I'm honestly surprised at how smooth it is. Unfortunately I can't see your menus so it's hard to tell what's going on, or whatever, but it's still awesome.

To get smooth artwork spinning you'd need to do the following (which you might already be doing some or all of):
Take your cdArt, and draw it rotated into a bitmap. Save that rotated bitmap image to a cache with X number of rotated images (18 or 36 seems best). Cycle through the cached rotated images when drawing.

If you're using my CreateRotatedCDImage() method, it's be pretty easy to modify it to create an array of multiple images. It'll be slow on first call though as drawing rotated 1000x1000 pngs takes time.

I'll probably have a crack at this since you proved how easy it was to do and I just talked myself through all the steps required. :D

Re: Georgia: A dynamically generated fb2k theme

Reply #131
Mod 1:
The logo changes whenever the %genre% has Game to show the franchise/series logo. The original implementation is show artist logo. Added some custom path too for those franchies logo.

Mod 2:
Show platform (if any) on the bottom right.

Mod 3:
Also implemented a simple SpinningCDArt using setInterval to mimic my XBMC setup, which can display the spinning art with fluid animation. Strangely setting it to too frequenty (e.g 16ms) in foobar causes spectrograph to stutter. Perhaps it's not well threaded. Can't really find any other way to optimize it. Right now I'm just going to settle at 1000ms, since I don't have much good transparent disc art to begin with.
I like your ideas for Mod 1/2. I probably won't implement them by default as then I need to keep up with more artwork and I rarely listen to VGM, but it's still a cool idea.

Spinning art. That's pretty cool. I'm honestly surprised at how smooth it is. Unfortunately I can't see your menus so it's hard to tell what's going on, or whatever, but it's still awesome.

To get smooth artwork spinning you'd need to do the following (which you might already be doing some or all of):
Take your cdArt, and draw it rotated into a bitmap. Save that rotated bitmap image to a cache with X number of rotated images (18 or 36 seems best). Cycle through the cached rotated images when drawing.

If you're using my CreateRotatedCDImage() method, it's be pretty easy to modify it to create an array of multiple images. It'll be slow on first call though as drawing rotated 1000x1000 pngs takes time.

I'll probably have a crack at this since you proved how easy it was to do and I just talked myself through all the steps required. :D

Yea really appreciate the amazing work that you did on this theme, and I'm just refreshing my JS programming skill.

Strangely OBS didn't record the Option menus when I am choosing different options. The cursor you saw is merely me trying to select different options.

How silly am I didn't thought about the cache. I simply refer to your RotateCDImage function and modified it as follows. Not sure whether the delay is the constant redraw or the setInterval function itself. But having a cache that stores up to [360/rotation_degree] copies makes sense instead of redrawing and rotate on every call, especially at 16ms. The only question I have is how to store the bitmap of the rotated DrawImage. I think that is a void function?

Code: [Select]
function spinningCDImage() {
rotatedCD2 = disposeImg(rotatedCD2);
if (pref.display_cdart) { // drawing cdArt rotated is slow, so first draw it rotated into the rotatedCD image, and then draw rotatedCD image unrotated in on_paint
        if (cdart && cdart_size.w > 0) { // cdart must be square so just use cdart_size.w (width)
               
            if (!rotatedCD2) {
rotatedCD2 = gdi.CreateImage(cdart_size.w, cdart_size.w);
rotCDimg = rotatedCD2.GetGraphics();
            }

            rot_amt = (rot_amt + pref.spin_rotation_amt) % 360;
            // console.log("rotamt=" + rot_amt);

rotCDimg.DrawImage(cdart, 0, 0, cdart_size.w, cdart_size.h, 0, 0, cdart.Width, cdart.Height, rot_amt , 255);
// rotatedCD2.ReleaseGraphics(rotCDimg);
           
}
}
    RepaintWindow();
}

Re: Georgia: A dynamically generated fb2k theme

Reply #132
A cache function that I did using the path+rotation_amt as the key. Seems to work fine now, not sure whether it is the optimal way without memory leak haha.

Just found that this and the code in line 486 has to be together to draw the disc art. Not sure why we need to have 2 DrawImage function call?

Code snippet on line 486, found on function draw_ui(gr)
Code: [Select]
			if (!pref.cdart_ontop || displayLyrics) {
if (rotatedCD && !displayPlaylist && !displayLibrary && pref.display_cdart) {
if (showExtraDrawTiming) drawCD = fb.CreateProfiler('cdart');
gr.DrawImage(rotatedCD, cdart_size.x, cdart_size.y, cdart_size.w, cdart_size.h, 0, 0, rotatedCD.width, rotatedCD.height, 0);

Code: [Select]
// Spin CD Image with Cache
function spinningCDImage() {
    var temp_cdart;
    rot_amt = (rot_amt + pref.spin_rotation_amt) % 360; // use this as key
    key = cdartPath + '' + rot_amt;
if (pref.display_cdart) { // drawing cdArt rotated is slow, so first draw it rotated into the rotatedCD image, and then draw rotatedCD image unrotated in on_paint
        if (cdart && cdart_size.w > 0) { // cdart must be square so just use cdart_size.w (width)
               
            // check if rotated disc art exist in cache
            if (spinning_cdart_cache.getImage(key)) { // if this art at this rotation was cached
                rotatedCD2 = spinning_cdart_cache.getImage(key);
                console.log('cache hit!');
            }
           
            else {
                rotatedCD2 = gdi.CreateImage(cdart_size.w, cdart_size.w);
                rotCDimg = rotatedCD2.GetGraphics();
                rotCDimg.DrawImage(cdart, 0, 0, cdart_size.w, cdart_size.h, 0, 0, cdart.Width, cdart.Height, rot_amt , 255);
                // store the rotated bitmap as cache
                spinning_cdart_cache.encache(rotatedCD2, key);
                console.log("encache...");
                rotatedCD2 = spinning_cdart_cache.getImage(key);
                rotatedCD2.ReleaseGraphics(rotCDimg);
               
            }   
}

    RepaintWindow();
}

Another demo video with cache and showing the options. Notice how the timer stopped when I set the update interval in setInterval to 16ms. Not sure how to circumvene this.
https://youtu.be/jchpoe_I53s

Re: Georgia: A dynamically generated fb2k theme

Reply #133
Yeah, you're doing things the right way now. You just need to make sure that spinning_cdart_cache has a size >= 360/rotation degrees. Otherwise you'll continually overwrite cache entries.

The image is drawn twice because the first time you're drawing the rotated CD into a square bitmap which you then store in the cache. The 2nd time you just draw the square cached image.

It might not be obvious but this is potentially 20x faster than just drawing a rotated image. When I first did the cdArt and added a rotation, I found that it would take about 20ms to draw the rotated image at first, but it would get progressively slower until it was around 300ms. This is because as you rotate a square image (for example 45degrees) it's now occupying a diamond shape portion of screen real estate. Windows has no idea that everything outside the boundary circle of the cd is transparent and so it needs to calculate the update region of every line (i.e. when rotated 45degrees, first line is 1 pixel wide, then 3, then 5, then 7, etc..... full width of the rotated image .... then 5, then 3, then 1). This is incredibly computationally intensive. So we create a square bitmap, draw the rotated image into that (takes 16ms or so), then draw that square bitmap to the screen which takes 2-3ms.

Re: Georgia: A dynamically generated fb2k theme

Reply #134
I just tried out your new menu resizing option.  It works great, one less line to retrofit.  I also eliminated my dependence on the properties user row height to get larger album art, although I did have to increase your multiplier from 1.667 to 2.15 to get the results I wanted.  After reading your recent discussion on CD art I decided to give it a try and was very impressed, although I did add a couple of higher rotation amounts.  I love eye candy.  I was also very impressed with what D.Sync did with the spinning.  Maybe you could consider adding it in the future.  I'm afraid it's way above my head to try adding it myself.  Thank you again for everything.

Re: Georgia: A dynamically generated fb2k theme

Reply #135
Just to give you guys an idea of roadmap, as soon as 1.1.8 is released, I'm going to switch to editing foo_spidermonkey_panel to add my invertColors method there. Once @TheQwertiest is able to merge that, I'm going to take on the Herculean task of trying to convert everything over to use SMP instead of foo_jscript_panel. Once that happens I'll most likely stop updating Georgia for JSP and everybody will have to switch over to SMP if they want the latest changes.

It's time to start converting this theme into something that's a little more maintainable with an ES6+ compatible engine. Unfortunately that means a substantial rewrite of 10k lines of code written over the past 9 years... half of which before I was a professional JS developer :)

Anyway this is part of the reason I'm trying to cram as much goodness as I can into 1.1.8, since it might be the only feature release for the next couple months. Thanks everybody for testing the betas to work out the kinks.

Re: Georgia: A dynamically generated fb2k theme

Reply #136
1.1.8 is now officially released. Thanks for everybody beta testing, providing feedback and making requests. I tried to fit in as many as I could.

Final changelog:
- Random now actually randomizes playlist
- Fixed volume control issues
- Improved tooltip handling for buttons
- Fixed issues with expanded volume bar disappearing and it's appearance in 4k mode
- Fixed crash when deleting last playlist
- CD Rotation values were bogus
- Refactored all menus using new Menu helper class, which cut menu code length in half and made adding new options much easier
- Fixed crash when using weblinks
- Playlist row and header fonts are scalable through Options >> Playlist settings
- Option to move transport controls below artwork
- Visual improvements in 4k mode (ensuring spacing between elements is scaled correctly)
- Adding Georgia entries to "Help" menu to quickly debug if the theme is installed correctly
- Added tooltips on hovering over timeline
- Adjust menu font sizes through options menu
- Adjust transport button sizes through options menu

Re: Georgia: A dynamically generated fb2k theme

Reply #137
Thank you so much for all of your hard work.  It is greatly appreciated.  All of your new sizing options will be a great help when I copy this over to my backup PC which has a non-4K display.

Re: Georgia: A dynamically generated fb2k theme

Reply #138
As well from my side: thanks very much, the resizing works great and now the theme looks really great on my surface go!

Re: Georgia: A dynamically generated fb2k theme

Reply #139
I have a open PR for transport control sizing controls and making user defined row height that is greater than the calculated one now override. I have other ideas too I can try to make upstream, mainly hiding the lyrics button, and leaving a space there, and optionally hiding the properties button as well. The settings button seems to be an anchor to the whole thing, so yeah.  There's already a menu stub to get started (font size) so, let me know if you want me to fiddle.

Re: Georgia: A dynamically generated fb2k theme

Reply #140
I have a open PR for transport control sizing controls and making user defined row height that is greater than the calculated one now override. I have other ideas too I can try to make upstream, mainly hiding the lyrics button, and leaving a space there, and optionally hiding the properties button as well. The settings button seems to be an anchor to the whole thing, so yeah.  There's already a menu stub to get started (font size) so, let me know if you want me to fiddle.
Left some comments on your PR.

Next version will probably be 2.0.0 since I'll be porting this to SMP. As part of that release, or 2.0.1, I'll be adding some options to what the Right side icons to show, what size they are, and what they look like. All in due time though :)

Re: Georgia: A dynamically generated fb2k theme

Reply #141
Hello,

I have finally setup the theme, but I think I did it incorrectly.
However, old bars are still showing up.
The logos of artists bands and flags are not found when checking theme status, yet they are here :
C:\Users\xxxxx\AppData\Roaming\foobar2000\georgia\images

How to hide then ?
Is there anything I can do ?


Re: Georgia: A dynamically generated fb2k theme

Reply #142
Hello,

I have finally setup the theme, but I think I did it incorrectly.
However, old bars are still showing up.
The logos of artists bands and flags are not found when checking theme status, yet they are here :
C:\Users\xxxxx\AppData\Roaming\foobar2000\georgia\images

How to hide then ?
Is there anything I can do ?


Copy Artist/label/flags to C:\Users\xxxxx\AppData\Roaming\foobar2000\images. Don't put them inside the Georgia folder.

Re: Georgia: A dynamically generated fb2k theme

Reply #143
Records label are still not shown, (some are in folders, is that okay?, beause I downloaded them that way)
I can't change anything in column UI.. I don't see "layout"
Maybe that's why I don't see the label panel?

Re: Georgia: A dynamically generated fb2k theme

Reply #144
Records label are still not shown, (some are in folders, is that okay?, beause I downloaded them that way)
I can't change anything in column UI.. I don't see "layout"
Maybe that's why I don't see the label panel?
To see labels, your music has to be tagged with values in either %publisher% or %label% (or both!)

Re: Georgia: A dynamically generated fb2k theme

Reply #145
In theme status the record labels pngs are not checkmarked.
They are installed here : C:\Users\Decim\AppData\Roaming\foobar2000\images\recordlabel

Re: Georgia: A dynamically generated fb2k theme

Reply #146
In theme status the record labels pngs are not checkmarked.
They are installed here : C:\Users\Decim\AppData\Roaming\foobar2000\images\recordlabel

That's the correct path. Did you install recordlabel.zip or recordlabel-2020-04.zip there? It currently looks for "Republic.png" to determine if the images were correctly installed in that location and if it can't find that image, the box won't be checked. Not sure if I should just check for the folder or not.

 

Re: Georgia: A dynamically generated fb2k theme

Reply #147
Hey, just made an account to say that it's a pretty great skin, but I have a couple of things that aren't showing up for some reason.

Sometimes I will get the record label logo in the corner, but it's never listed along with the other metadata on the left. Neither is the catalog number. I've been storing this information for years on my own, so it should show up. I have the fields named "PUBLISHER" and "LABELNO" (just like CUETools), so I don't see why it won't show. Sometimes the RELEASETYPE field shows, oddly enough. I'm on a 720p monitor, so maybe there's not enough room?

Also I get no hyperlinks. I can't click on anything like it said in the features. And there's no volume bar, but that's not terrible.

Everything else looks pretty cool. One minor thing I would change is to have the Library list display by folder structure and not artists. This way I won't get artists from one-off compilation albums mixed in with the others. Also I have multiple different pressings of the same album sometimes, and it can't differentiate between them.


Re: Georgia: A dynamically generated fb2k theme

Reply #148
In theme status the record labels pngs are not checkmarked.
They are installed here : C:\Users\Decim\AppData\Roaming\foobar2000\images\recordlabel

That's the correct path. Did you install recordlabel.zip or recordlabel-2020-04.zip there? It currently looks for "Republic.png" to determine if the images were correctly installed in that location and if it can't find that image, the box won't be checked. Not sure if I should just check for the folder or not.

Yes I did installed the zip you mentioned, but the "republic.png" is not present. I wonder also how to select several tracks like I was doing in the original default theme of foobar ? Because I must select them all with CTRL and for multi tagging this is not very easy.

Same as samsara the publisher and label fields are here but are not showing either, I have reinstalled everything to see if there was something wrong I did on my end, but no.. So I don't know how to display LYRICS when I tried to add it as a field, it says "LYRICS is not a valid field name" same when I try to add Publisher and Label, if we forget the small issues I have the theme is so freaking awesome, I can't imagine how much time you gave for it ! congrats

Re: Georgia: A dynamically generated fb2k theme

Reply #149
Yes I did installed the zip you mentioned, but the "republic.png" is not present. I wonder also how to select several tracks like I was doing in the original default theme of foobar ? Because I must select them all with CTRL and for multi tagging this is not very easy.
Then something didn't get fully extracted. Delete the recordlabel folder, download this archive and extract to the same location.

Same as samsara the publisher and label fields are here but are not showing either, I have reinstalled everything to see if there was something wrong I did on my end, but no.. So I don't know how to display LYRICS when I tried to add it as a field, it says "LYRICS is not a valid field name" same when I try to add Publisher and Label
I do not understand what you mean when you say you want to display LYRICS or add Publisher and Label. Where exactly are you adding these? Screenshots could be helpful.