It is currently March 29th, 2024, 6:52 am

Dark Music Player

Media controls, music players, video and animated visualizers
Kmafin
Posts: 29
Joined: March 23rd, 2017, 7:35 am

Re: Dark Music Player

Post by Kmafin »

Thank you for instructions! It's working pretty well. It could be still better, I think? Check it out.
Last edited by Kmafin on March 31st, 2017, 2:13 am, edited 5 times in total.
User avatar
Brian
Developer
Posts: 2674
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Dark Music Player

Post by Brian »

Nice!

It's a little resource intensive for the animation, but looks very nice. I only have 2 gripes. First is forcing the Z position to "Bottom" on refresh, and the second is the !Refresh * after choosing a player which refreshes all skins (which is not necessary). Overall, nice work! :thumbup:

I also wanted to let you know that we made a couple of changes to the Bitmap meter in the 4.1 beta (not released yet), and your skin has shown us a small bug that we have already corrected. So good work!

-Brian
Kmafin
Posts: 29
Joined: March 23rd, 2017, 7:35 am

Re: Dark Music Player

Post by Kmafin »

Brian wrote:Nice!

It's a little resource intensive for the animation, but looks very nice. I only have 2 gripes. First is forcing the Z position to "Bottom" on refresh, and the second is the !Refresh * after choosing a player which refreshes all skins (which is not necessary). Overall, nice work! :thumbup:

I also wanted to let you know that we made a couple of changes to the Bitmap meter in the 4.1 beta (not released yet), and your skin has shown us a small bug that we have already corrected. So good work!

-Brian
Thank you for your feedback. I will fix those instantly.
I appreciate it!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Dark Music Player

Post by balala »

Kmafin wrote:Thank you for instructions! It's working pretty well. It could be still better, I think? Check it out.
In my opinion, the transparency setting (in the Settings skin) should set the transparency of the player, not of the Settings skin itself. At least for now, this gives me the impression that the Settings skin was done, to make the settings of "itself".
And I'd avoid refreshing all (yeah, I know Brian mentioned this before, but a refresh is done not just when the player is chosen, as he said, but after any settings is done), and even more, I'd avoid refreshing the Player skin when any setting is done. In fact I'd add an Ok and a Cancel button, and would do a refresh only when the Ok button is clicked, applying the new settings, just in that moment. Until then, I'd keep the settings dynamically, setting some variables with appropriate !SetVariable bangs. In my opinion, this would be a better approach, because refreshing even just the current skin is usually undesirable: https://forum.rainmeter.net/viewtopic.php?p=119966#p119966
The volume setting still isn't draggable. The progress bar is, the volume isn't. If you've understood what I've described about creating draggable bar meters, you should be able to adapt it to the volume setting. Do you need help with this, or maybe you don't even want to make it draggable?
Kmafin
Posts: 29
Joined: March 23rd, 2017, 7:35 am

Re: Dark Music Player

Post by Kmafin »

balala wrote:In my opinion, the transparency setting (in the Settings skin) should set the transparency of the player, not of the Settings skin itself. At least for now, this gives me the impression that the Settings skin was done, to make the settings of "itself".
And I'd avoid refreshing all (yeah, I know Brian mentioned this before, but a refresh is done not just when the player is chosen, as he said, but after any settings is done), and even more, I'd avoid refreshing the Player skin when any setting is done. In fact I'd add an Ok and a Cancel button, and would do a refresh only when the Ok button is clicked, applying the new settings, just in that moment. Until then, I'd keep the settings dynamically, setting some variables with appropriate !SetVariable bangs. In my opinion, this would be a better approach, because refreshing even just the current skin is usually undesirable: https://forum.rainmeter.net/viewtopic.php?p=119966#p119966
The volume setting still isn't draggable. The progress bar is, the volume isn't. If you've understood what I've described about creating draggable bar meters, you should be able to adapt it to the volume setting. Do you need help with this, or maybe you don't even want to make it draggable?
how can I then adjust the transparency of the Settings -skin in the same way, if not from Settings -skin?
RainFile and RainRGB refresh everything anyway, so what's the point add anywhere else the line: LeftMouseUpAction=[!WriteKeyValue "Variables" Sound "#1#"][!UpdateMeasure *][!UpdateMeter *]? I can add the ability to drag volume bar, no problem! ;-)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Dark Music Player

Post by balala »

Kmafin wrote:how can I then adjust the transparency of the Settings -skin in the same way, if not from Settings -skin?
The question is which skin would you like to set the transparency of: the player skin, or the settings skin. I thought (at least for me would be much logical) to use the settings skin to set up the main (player) skin, not the settings skin itself. However, you know what you want to achieve...
Kmafin wrote:RainFile and RainRGB refresh everything anyway, so what's the point add anywhere else the line: LeftMouseUpAction=[!WriteKeyValue "Variables" Sound "#1#"][!UpdateMeasure *][!UpdateMeter *]?
Probably none, the new value of a variable written with the !WriteKeyValue bang won't be used anyway, without a refresh of the current skin, so you have to refresh it. But even in this case, you don't have to refresh all, just the current skin.
And maybe there is another approach, too. You can write the new value of the variable (with the !WriteKeyValue bang, as you already did) and, in paralel, you could also set it dynamically, with a !SetVariable bang. In this way, you can avoid refreshing the skin (!SetVariable doesn't require a refresh, and even more: refreshing the skin makes the !SetVariable bang useless, destroying the dynamically set variables), but if somehow a refresh is done, the skin will use the set new value of the variable, because it is written to the [Variables] section: https://forum.rainmeter.net/viewtopic.php?p=120238#p120238
Kmafin wrote:I can add the ability to drag volume bar, no problem! ;-)
Ok, let me know if you have any further question.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Dark Music Player

Post by balala »

And here are the modifications to the Settings skin, which I talked about a while ago: instead of write each setting immediately to the Variables.inc file (with the appropriate !WriteKeyValue bangs), I would set them dynamically in the memory. for this, replace the following options, as it follows (leave untouched the unmentioned options):

Code: Select all

[METER_AIMP_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "Aimp"]

[METER_FOOBAR_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "CAD"]

[METER_ITUNES_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "iTunes"]

[METER_RIVERMEDIA/JUKEBOX_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "CAD"]

[METER_MEDIAMONKEY_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "MediaMonkey"]

[METER_MUSICBEE_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "CAD"]

[METER_WINAMP_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "Winamp"]

[METER_WMP_TITLE]
...
LeftMouseUpAction=[!SetVariable Player "WMP"]

[METER_SOUNDS_ON]
...
LeftMouseUpAction=[!SetVariable Sound "#1#"]

[METER_SOUNDS_OFF]
...
LeftMouseUpAction=[!SetVariable Sound "#0#"]

[CONFIG_INPUT]
...
Command1=[!SetVariable "BG_Transparency" "$UserInput$"] X=70 Y=303 W=81 H=12 DefaultValue="#BG_Transparency#"
Command2=[!SetVariable "BG2_Transparency" "$UserInput$"] X=172 Y=303 W=81 H=12 DefaultValue="#BG2_Transparency#"
Just mention, that the last two options of the [CONFIG_INPUT] measure have a small issue. The Command1 is correct, but according to the manual:
If the macro string $UserInput$ is repeated in a command series, multiple input boxes will be created in sequence. However, a single value input by the user can be used multiple times in different bangs in the same command series by using the string value of the InputText [MeasureName] as a section variable.
This means that the Command2 option should be modified to:

Code: Select all

[CONFIG_INPUT]
...
Command2=[!SetVariable "BG2_Transparency" "[CONFIG_INPUT]"] X=172 Y=303 W=81 H=12 DefaultValue="#BG2_Transparency#"
or to:

Code: Select all

[CONFIG_INPUT]
...
Command2=[!WriteKeyValue Variables "BG2_Transparency" "[CONFIG_INPUT]" "#SKINSPATH#Dark Music Player\@Resources\Variables.inc"][!Refresh *] X=172 Y=303 W=81 H=12 DefaultValue="#BG2_Transparency#"
After all this, you can add two buttons:

Code: Select all

[METER_OK]
Meter=String
X=110
Y=400
W=81
H=10
StringAlign=Center
StringStyle=Normal
FontFace=hooge 05_53
FontColor="#Font_Color#,#Font_Opacity#"
FontSize=6
Text=OK
AntiAlias=0
ClipString=1
MouseOverAction=[!SetOption "#CURRENTSECTION#" FontColor "#Meter_Color#,#Meter_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" FontColor "#Font_Color#,#Font_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!WriteKeyValue Variables Player "#Player#" "#@#Variables.inc"][!WriteKeyValue Variables Sound "#Sound#" "#@#Variables.inc"][!WriteKeyValue Variables BG_Transparency "#BG_Transparency#" "#@#Variables.inc"][!WriteKeyValue Variables BG2_Transparency "#BG2_Transparency#" "#@#Variables.inc"][!Refresh "#ROOTCONFIG#\Player"][!DeactivateConfig]
DynamicVariables=1

[METER_OK_FRAME]
Meter=Image
ImageName="#@#Images\Choose.png"
X=-42r
Y=-2r
ImageTint="#Meter_Color#,#Meter_Opacity#"
MouseOverAction=[!SetOption "#CURRENTSECTION#" ImageTint "#Font_Color#,#Font_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" ImageTint "#Meter_Color#,#Meter_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]

[METER_CANCEL]
Meter=String
X=210
Y=400
W=81
H=10
StringAlign=Center
StringStyle=Normal
FontFace=hooge 05_53
FontColor="#Font_Color#,#Font_Opacity#"
FontSize=6
Text=CANCEL
AntiAlias=0
ClipString=1
MouseOverAction=[!SetOption "#CURRENTSECTION#" FontColor "#Meter_Color#,#Meter_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" FontColor "#Font_Color#,#Font_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!DeactivateConfig]

[METER_CANCEL_FRAME]
Meter=Image
ImageName="#@#Images\Choose.png"
X=-42r
Y=-2r
ImageTint="#Meter_Color#,#Meter_Opacity#"
MouseOverAction=[!SetOption "#CURRENTSECTION#" ImageTint "#Font_Color#,#Font_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" ImageTint "#Meter_Color#,#Meter_Opacity#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
When clicked, the OK button will write the variables to the Variables.inc file, will refresh the Player skin and will deactivate the Settings skin. The Cancel button will simply deactivate the Settings skin, without writing anything to the Variables.inc and without refreshing the Player skin (if anything was written, there's no need to refresh the skin).
I also removed the [METER_UPDATE_1.3] meter, to have place for the Ok and Cancel buttons, but you can redesign your skin, placing these buttons in a proper place.
Also take care the followings:
  • I positioned the Image meters relatively to the string meters. It's more convenient, because if you change the position of the string meter, the image meter will "follow" the previous string meter (see the relative positioning here).
  • I also added some !UpdateMeter bangs, to update the appropriate meters, once I'm hovering the mouse over or leaving them. Without these bangs, redrawing the meter, is completely useless.
  • In the above code instead of the precisely named sections, I've used the #CURRENTSECTION# variable. With this trick, copying and pasting the code become much easier.
And one more: NEVER, but NEVER do something like this:
LeftMouseUpAction=["#@#Addons\RainFile\RainFile.exe" "File" "Variables" "Path" "[color=#FF0000]#SKINSPATH#Dark Music Player\@Resources\Variables.inc[/color]" "#Path#"] (you've used this in the [METER_PATH] meter, but you have more this kind of mistakes in your skin). Instead of this path, you should use this: LeftMouseUpAction=["#@#Addons\RainFile\RainFile.exe" "File" "Variables" "Path" "#@#Variables.inc" "#Path#"]. Not because is shorter, but because we don't refer to @Resources folder with its path, but with the #@# variable (read the second paragraph here).

I know this reply is a bit long, but I hope I succeeded covering everything I wanted to talk about. Please let me know what you think about all these.
Kmafin
Posts: 29
Joined: March 23rd, 2017, 7:35 am

Re: Dark Music Player

Post by Kmafin »

Firstly I would like to say that, thank you very much for all the effort and help! :thumbup: I got everything working well, except "BG2_Transparency", but I dont even need it. Both of these commands caused the problem that the value between "1-255" disappeared, but it does not matter, I removed this completely.

Code: Select all

[CONFIG_INPUT]
...
Command2=[!SetVariable "BG2_Transparency" "[CONFIG_INPUT]"] X=172 Y=303 W=81 H=12 DefaultValue="#BG2_Transparency#"

Code: Select all

[CONFIG_INPUT]
...
Command2=[!WriteKeyValue Variables "BG2_Transparency" "[CONFIG_INPUT]" "#SKINSPATH#Dark Music Player\@Resources\Variables.inc"][!Refresh *] X=172 Y=303 W=81 H=12 DefaultValue="#BG2_Transparency#"
I didn't add (yet) to volume bar the draggable feature, this was enough for one day. Hard day at work behind. :thumbdown: The skin is updated to v1.4.
Last edited by Kmafin on March 31st, 2017, 2:48 am, edited 1 time in total.
Kmafin
Posts: 29
Joined: March 23rd, 2017, 7:35 am

Re: Dark Music Player

Post by Kmafin »

-