Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using album art/genre color in other skins #43

Closed
TheMannager opened this issue Apr 18, 2017 · 6 comments
Closed

Using album art/genre color in other skins #43

TheMannager opened this issue Apr 18, 2017 · 6 comments
Assignees

Comments

@TheMannager
Copy link

Hello, I am trying to use this skin in conjunction with another. All I want to do is have the other skin pull the text color the song data. I got this working simply by including MeasureStyling.inc. This works except that it does not change when the song ends and the next one begins. I deduced that the refresher script may be related. I was wondering if you had an idea as to how to get my other skin to update its color when the visualizer and song data change color.
Thanks

@tjhrulz
Copy link
Collaborator

tjhrulz commented Apr 18, 2017

Alright it has been a while since I touched that section of the skin so it may have changed but I will warn you it does not scale well. Basically the way rainmeter works once you set up a measure or meter it never checks if any variables have changed unless dynamic variables is turned on and then it check it on every run which is computationally expensive.

Your options are as follows:

  1. Turn on dynamic variables on whatever meter is using the styling (Worst performance)
  2. Add an OnChangeAction to the measure that set DynamicVariables=0 on the meters that you use (I would recommend using a group for them). How DynamicVariables=0 works is it essentially refetches the variables values. (Much better performance however each skin you use it in gets its own color generation)
  3. Have a master skin that sets the colors for the rest of the skins, this will be hard to write and in most cases you wont need this kind of performance.

I recommend option number 2, its performant and easy to write.

Edit: Looking at it some more I am not sure how you are having it not update as all the genres have DynamicVariables=1 by default, did you correctly set the style/group and could you post the code for this?

@tjhrulz
Copy link
Collaborator

tjhrulz commented Apr 18, 2017

Alright so I just got in touch with Marco. Right now I am working on some performance improvements and as a part of this I am going to rewrite the dynamic color system. This will make it easier for you to use them as all you will have to do is the the dynamic color variable as your color and add your meter to the updater group.

So if you wait a couple days what you wanna do will get easier to do.

@TheMannager
Copy link
Author

TheMannager commented Apr 18, 2017 via email

@tjhrulz
Copy link
Collaborator

tjhrulz commented Apr 27, 2017

All the code relating to the new color system has been implemented and can be found here: https://github.com/MarcoPixel/Monstercat-Visualizer/tree/Performance
You will need to click clone or download then download zip on the right hand side. Once it is downloaded just extract the zip contents over your current monstercat setup (You should not need to delete anything just overwrite all files).

To take advantage of the new color is pretty simple. You will need to include the MeasureStyling.inc as before. Then whenever you want to use the color from MV you will need to either use the #color# or #textColor# variables. Text color can be the same as color if dynamic font colors is turned on in the settings.

Also if the meter you are using is does not have dynamic variables turned on you will want to add to its list of group GroupDynamicColors. This will ensure that you get the new song color on song change without wasting CPU the rest of the time. If you do have dynamicVariables=1 then do not add this as it will turn dynamic variables off.

So two quick examples

[MeterText]
Meter=String
X=0
Y=0
FontColor=#TextColor#
FontSize=12
AntiAlias=1
Text=This text uses the text color from Monstercat Visualizer!
Group=GroupDynamicColors

And one that uses the normal color

[MeterBackground]
Meter=Image
X=0
Y=0
W=200
H=200
SolidColor=#Color#
Group=GroupDynamicColors

Also I should note that these colors can not be use in the [Rainmeter] section as it does not support dynamic variables, so if you want to add a background to your whole skin you will have to use a background image instead.

Also remember in the same meter section do not use both Group=GroupDynamicColors and DynamicVariables=1, the group setting will override DynamicVariables=1. Just use one or the other.

@tjhrulz tjhrulz changed the title Detecting when a track changes Using album art/genre color in other skins May 1, 2017
@tjhrulz
Copy link
Collaborator

tjhrulz commented May 4, 2017

Since you have not responded that you needed further help I am gonna go on ahead and close this issue.

@tjhrulz tjhrulz closed this as completed May 4, 2017
@TheMannager
Copy link
Author

TheMannager commented May 4, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants