It is currently May 21st, 2024, 2:18 pm

autoShow music cover when music plays and autohide it when..

Get help with creating, editing & fixing problems with skins
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

autoShow music cover when music plays and autohide it when..

Post by apit23 »

Hi,
how to make autoShow music cover when music plays and autohide it when music is closed.
i want to make it like this:

When music not playing /closed
Capture.JPG
when music plays
Capture2.JPG
and how to add fade effect in it?
You do not have the required permissions to view the files attached to this post.
Last edited by apit23 on September 9th, 2012, 4:52 am, edited 1 time in total.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: autoShow music cover when music plays and autohide it wh

Post by KreAch3R »

You will need the PlayerType=STATUS from the NowPlaying plugin (if you are using another plugin for music, really consider changing to NowPlaying) and you can use Kaelri's script for the fade effects.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

i don't understand much. do you mean this?
[Player]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=TITLE
DisableLeadingZero=0
Substitute="":" "
and what to add?
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: autoShow music cover when music plays and autohide it wh

Post by MerlinTheRed »

Without the fading script you might do something like this:

Code: Select all

[Player]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=STATUS
IfAboveValue=0
IfAboveAction=!ShowMeterGroup Cover
IfBelowValue=1
IfBelowAction=!HideMeterGroup Cover
Of course this is not all. You probably need to move some meters as well etc. but it's the basic idea.

If you want to use the Fade script, you'll have to add a Script measure and call it's functions like described in Kaelri's post.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

the code works for iTunes. But for the WMP, after WMP closed, it still reading the ID3 tags. is it bugs?

and for the transition effect,
why !Hide/ShowFade not working for me? i used FadeDuration=100 (is it correct?)
i want to use the Kaelri's but i'm confused.can you some example of using FadeIn/Out
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: autoShow music cover when music plays and autohide it wh

Post by MerlinTheRed »

!Hide/ShowFade are bangs that apply to whole skins, not meters. If you want to fade in single meters you need to use Kaelri's script. I've never used it so I'm not the ideal person to tell you how it works.

For WMP: are you sure it's actually closed and not hidden into the system tray or something like that? I don't use WMP so I've no experience with it.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

oh, i hope someone could show some examples.

the WMP is closed and i very sure about that.
usually it was not like that,but it happens when i used the PlayerType=STATUS.
I think so.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: autoShow music cover when music plays and autohide it wh

Post by KreAch3R »

Check InterfaceLIFTer Smooth for a skin example. I 've never used it either, so I can't be more specific, sorry.

As for the WMP, I sometimes get that "bug", too. Check if wmplayer.exe is still running in the background, when that occurs. In my case, it's a WMP hiccup I have to endure (and it is solved only after restarting Rainmeter).
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: autoShow music cover when music plays and autohide it wh

Post by Kaelri »

Using the Transitions script takes some setup. I'll try to boil the steps down as best I can:

1) Download the script from this thread. Put the "Transition.lua" file in your skin folder, and add the script measure:

Code: Select all

[Transition]
Measure=Script
ScriptFile=Transition.lua
2) Set your skin's Update speed to about 50. This will affect the entire skin, so you need to add a corresponding UpdateDivider to all meters and measures that are not part of the fade effect. The easiest way to do this is with a variable. For example:

Code: Select all

[Rainmeter]
Update=#UpdateSpeed#

[Variables]
UpdateSpeed=50

[Player]
Measure=Plugin
Plugin=NowPlaying
PlayerName=WMP
PlayerType=STATUS
UpdateDivider=(1000/#UpdateSpeed#)
Again, the UpdateDivider=(1000/#UpdateSpeed#) option must be added to everything except the meters that you want to fade in/out.

3) Create a variable for the transparency of your meters, starting at 255 (fully opaque).

Code: Select all

[Variables]
CoverTransparency=255
How you use this in each meter depends on the meter type. For example, if you have an image from a file, you would use ImageAlpha=#CoverTransparency#. A solid-color image meter would be more like SolidColor=128, 192, 217, #CoverTransparency#. For a string meter, you'd want to change the font color transparency, like FontColor=128, 192, 217, #CoverTransparency#. (Reminder: these are all just examples. You will need to use values appropriate to the meters in your skin.)

You also need to add DynamicVariables=1 to those same meters.

4) You can now add the FadeIn/FadeOut command to your Player measure, like Merlin showed you.

Code: Select all

[Player]
Measure=Plugin
Plugin=NowPlaying
PlayerName=WMP
PlayerType=STATUS
UpdateDivider=(1000/#UpdateSpeed#)
IfAboveValue=0
IfAboveAction=!CommandMeasure Transition "FadeIn('Cover', 'CoverTransparency')
IfBelowValue=1
IfBelowAction=!CommandMeasure Transition "FadeOut('Cover', 'CoverTransparency')
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

i've tried , but i didn't understand it fully.

So here my .ini
[Rainmeter]
Author=AeriusExodus
Update=#UpdateSpeed#

[Variables]
UpdateSpeed=50

[Transition]
Measure=Script
ScriptFile=Transition.lua

[Variables]
CoverTransparency=255

[mStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=STATUS
IfAboveValue=0

IfAboveAction=!Execute [!HideMeter Show][!ShowMeterGroup Music][!ShowMeterGroup Control][!ShowMeter Hide][!Redraw]
IfBelowValue=1
IfBelowAction=!Execute [!HideMeter Hide][!HideMeterGroup Music][!HideMeterGroup Control][!ShowMeter Show][!Redraw]

[BG]
Meter=Image
ImageName=#CURRENTPATH#\BG.png
ImageEffect=Shadow
X=20
Y=0
UpdateDivider=(1000/#UpdateSpeed#)


[MeasureState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=STATE
Measure=Plugin;
UpdateDivider=(1000/#UpdateSpeed#)

[Player]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=TITLE
DisableLeadingZero=0
UpdateDivider=(1000/#UpdateSpeed#)


[mCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=COVER
Substitute="":"#CURRENTPATH#\Default.png"
UpdateDivider=(1000/#UpdateSpeed#)

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=ARTIST
Substitute="":" "
UpdateDivider=(1000/#UpdateSpeed#)

[mPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=POSITION


[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=PROGRESS
MinValue=0
MaxValue=100
UpdateDivider=(1000/#UpdateSpeed#)

[Status]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Status]
PlayerType=STATUS
UpdateDivider=(1000/#UpdateSpeed#)

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=DURATION
UpdateDivider=(1000/#UpdateSpeed#)



;-----------------------------------------------------------------------------------------------------

[Show]
Meter=IMAGE
ImageName=anim0.png
X=23
Y=71
AntiAlias=1
ToolTipText=Show Music
ImageAlpha=255
LeftMouseDownAction=!Execute [!HideMeter Show][!ShowMeterGroup Music][!ShowMeterGroup Control][!ShowMeter Hide][!Redraw]
DynamicVariables=1


;-----------------------------------------------------------------------------------------------------

[Hidden]
Meter=IMAGE
ImageName=Panel.png
X=r
Y=r
AntiAlias=1
Hidden=1
Group=Music
;-----------------------------------------------------------------------------------------------------

[Hide]
Meter=IMAGE
ImageName=hide.png
X=r
Y=261
AntiAlias=1
Hidden=1
ToolTipText=Hide Music
LeftMouseDownAction=!Execute [!HideMeter Hide][!HideMeterGroup Music][!HideMeterGroup Control][!ShowMeter Show][!Redraw]
DynamicVariables=1


-----------------------------------------------------------------------------
---Music----

[Cover]
Meter=IMAGE
MeasureName=mCover
X=26
Y=108
W=150
H=150
SolidColor=FFFFFF10
Hidden=1
Group=Music
DynamicVariables=1

[Overlay]
Meter=Image
ImageName=backcoveroverlay.png
X=r
Y=r
W=150
H=150
Hidden=1
Group=Music
DynamicVariables=1



[Bar]
Meter=Bar
MeasureName=mProgress
BarImage=Fill.png
X=55
Y=85
W=91
H=7
Hidden=1
Group=Music
BarOrientation=HORIZONTAL
DynamicVariables=1

[Knob]
Meter=Image
-ImageName=
SolidColor=75a534
W=4
H=3
X=(54+(87 *([mProgress] / 100)))
Y=87
Hidden=1
Group=Music
DynamicVariables=1

---------------------------------------------------------------------

--------ARTIST and TRACK------------

[Artist]
Meter=String
MeasureName=mArtist
X=100
Y=38
W=150
H=15
FontFace=Segoe UI Light
FontSize=9
FontColor=363636
StringStyle=Bold
-StringEffect=Shadow
ClipString=1
AntiAlias=1
Text="%1"
StringAlign=Center
UpdateDivider=(1000/#UpdateSpeed#)

[Track]
Meter=STRING
MeasureName=Player
X=r
Y=15r
W=150
H=15
FontSize=8
FontFace=Segoe UI Light
FontColor=363636
-StringEffect=Shadow
ClipString=1
AntiAlias=1
Text="%1"
StringAlign=Center
UpdateDivider=(1000/#UpdateSpeed#)


-----------------------------------------------------------------------------
---CONTROL----

[Next]
Meter=Image
ImageName=next.png
X=182
Y=78
Hidden=1
Group=Control
ToolTipText=Next
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Next"][!ShowMeterGroup Control][!Redraw]


[Previous]
Meter=Image
ImageName=prev.png
X=4
Y=r
Hidden=1
Group=Control
ToolTipText=Previous
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Previous"][!ShowMeterGroup Control][!SetOption #CURRENTSECTION# ImageName "prev1.png"][!Update][!Redraw]


------------------------------------------

[Elapsed]
Meter=STRING
MeasureName=mPosition
X=102
Y=-2
W=100
H=40
StringAlign=CENTER
-StringStyle=Bold
FontFace=Segoe UI Light
FontSize=22
FontColor=303030
AntiAlias=1
ClipString=1
Text="%1"
Substitute="":" "
UpdateDivider=(1000/#UpdateSpeed#)
the red is the meter needed to be fade in/out.

so, can you please help me figure it? sorry if it quite confusing. :(