It is currently May 4th, 2024, 7:48 pm

Combining Roundline and Bar meters... stuck in the mud!

Get help with creating, editing & fixing problems with skins
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by JoBu »

Awesome work smurfier! That is brilliant. I smacked myself in the forehead a couple times while reading through your work... I can't believe I never thought to hide the songtitle while WA is inactive... that's a great addition. AND THE BARS WORK! Just like I was hoping! Fantastic stuff my friend, thank you so much for all your help, it really helped me to understand min/max and I think I'm starting to grasp calcs and formulas. Cheers mate, thanks a ton!

Cryo - thanks, I think you helped me to wrap my mind around the concepts ;)

Wald - feel free to use as you will mate, no worries :)

Varelse - your formulas are what clicked it for me, I really appreciate you taking the time. Cheers!



Awesomesauce. Thanks everyone for helping me out!

I'll update that post in my junk thread with this great new version soon.

:D
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by Seahorse »

Varelse wrote:Here's a way that I did it on one of my skins:

Code: Select all

[MeasurePositionBar]
Measure=Plugin
Plugin=Plugins\iTunesPlugin.dll
Command=GetPlayerPositionPercent
MaxValue=100

[MeasureTimeP1]
Measure=Calc
Formula=(MeasurePositionBar/100) < 0.125 ? (MeasurePositionBar/100) : 0.125
MinValue=0
MaxValue=0.125

[MeasureTimeP2]
Measure=Calc
Formula=((MeasurePositionBar/100) > 0.125) || ((MeasurePositionBar/100) <0.5) ? (MeasurePositionBar/100) : 0.50
MinValue=0.125
MaxValue=0.50

[MeasureTimeP3]
Measure=Calc
Formula=((MeasurePositionBar/100) > 0.50) || ((MeasurePositionBar/100) <0.625) ? MeasurePositionBar/100 : 0.625
MinValue=0.5
MaxValue=0.625

[MeasureTimeP4]
Measure=Calc
Formula= MeasurePositionBar/100 > 0.625 ? MeasurePositionBar/100 : 0
MinValue=0.625
MaxValue=1.0
The decimals are the percentage that you want the break between meters to be at.
0.25/0.50/0.75/1.0 don't act like 25%, 50%, 75% & 100% in my current experiment:
[MeasurePositionBar]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=POSITION

[MeasureTimeP1]
Measure=Calc
Formula=(MeasurePositionBar/100) < 0.25 ? (MeasurePositionBar/100) : 0.25
MinValue=0
MaxValue=0.25

[MeasureTimeP2]
Measure=Calc
Formula=((MeasurePositionBar/100) > 0.25) || ((MeasurePositionBar/100) <0.5) ? (MeasurePositionBar/100) : 0.50
MinValue=0.25
MaxValue=0.50

[MeasureTimeP3]
Measure=Calc
Formula=((MeasurePositionBar/100) > 0.50) || ((MeasurePositionBar/100) <0.75) ? MeasurePositionBar/100 : 0.75
MinValue=0.50
MaxValue=0.75

[MeasureTimeP4]
Measure=Calc
Formula= MeasurePositionBar/100 > 0.75 ? MeasurePositionBar/100 : 0
MinValue=0.75
MaxValue=1.0
Is it my maths, or am I missing something - they are showing the first 0-10%, 10-20% up to 40%..?
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by smurfier »

Let's try something simple first....

Code: Select all

[MeasurePositionBar]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=POSITION

[MeasureTimeP1]
Measure=Calc
Formula=MeasurePositionBar
MinValue=0
MaxValue=25

[MeasureTimeP2]
Measure=Calc
Formula=MeasurePositionBar
MinValue=25
MaxValue=50

[MeasureTimeP3]
Measure=Calc
Formula=MeasurePositionBar
MinValue=50
MaxValue=75

[MeasureTimeP4]
Measure=Calc
Formula= MeasurePositionBar
MinValue=75
MaxValue=100
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by Seahorse »

That now does 7% per side, i.e 28% = all 4 full... :confused:

/me SMASHES HEAD ON KEYBOARD

Before:

[MeasurePositionBar]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=POSITION

After:

[MeasurePositionBar]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=PROGRESS

Both calcs good, however yours makes way more sense to my tiny brain and is now in use. Wrong measure replacement fixes it totally... :D
Last edited by Seahorse on May 9th, 2011, 4:25 pm, edited 2 times in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by smurfier »

Could you please post your entire code so I may test.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by Seahorse »

Current iteration below Trying to understand why the repeat/shuffle button have vanished - got to read up on "GROUP" from the "Group=Player" in [MeterToggleRepeat] & [MeterToggleShuffle] and see if that is the cause...
Capture2.JPG
[Rainmeter]
Author=Seahorse
;Inspired/copied/helped by by Jobu, Poiru, Smurfier with assitance form other geniuses at http://rainmeter.net/forum/index.php
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
Blur=1
BlurRegion=2,0,0,210,350,15


[Metadata]
Name=WinAmp Player
Config=
Description= WinAmp remote control with aero Blur & cover art. Requires nowplaying.dll
Instructions=You MUST DEFINE the player in mPlayer Section or Rainmeter crashes
Version=1.2
;1.2 Replaced nowplaying.dll with 0.95 - added rating & voloume controls
;1.1 Stripped all Winamap calls where possible, added 4 line meter surrounding coverart.
;1.0 Test of nowplaying.dll in place of Winamp media calls

;Todo:
;Read up on Group
;Fix repeat & shuffle
;Respace/resize buttons and/or replace them - also experiment with other tints - Blue.
;Work out whether or not "State" Meter worth putting in

;===============================================================================================
;Variables
;===============================================================================================

[Variables]

;Colours
;White Solid
Colour1=255,255,255,255
;Blue Solid
Colour2=0,223,223,255
;Grey Feint
Colour3=255,255,255,40
;White Feint
Colour4=255,255,255,200

UpdateSpd=5
WAPATH=C:\Program Files (x86)\Winamp\winamp.exe

;===============================================================================================
;Measures
;===============================================================================================

[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=WINAMP
MediaType=TRACK

[MeasurePositionBar]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=PROGRESS

[MeasureTimeP1]
Measure=Calc
Formula=MeasurePositionBar
MinValue=0
MaxValue=25

[MeasureTimeP2]
Measure=Calc
Formula=MeasurePositionBar
MinValue=25
MaxValue=50

[MeasureTimeP3]
Measure=Calc
Formula=MeasurePositionBar
MinValue=50
MaxValue=75

[MeasureTimeP4]
Measure=Calc
Formula= MeasurePositionBar
MinValue=75
MaxValue=100

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=ARTIST

[mAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=ALBUM

[mCover]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=COVER
Substitute="":"Default.png"

[mPosition]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=POSITION

[mDuration]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=DURATION

[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=PROGRESS

[mRating]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=RATING

;===============================================================================================
;Meters
;===============================================================================================

[MeterProgBarTopBG]
Meter=Image
SolidColor=#Colour3#
X=14
Y=10
W=190
H=4
AntiAlias=1

[MeterProgBarTop]
Meter=Bar
MeasureName=MeasureTimeP1
BarColor=#Colour2#
BarOrientation=HORIZONTAL
Flip=0
X=14
Y=10
W=190
H=4
AntiAlias=1

[MeterProgBarRightBG]
Meter=Image
SolidColor=#Colour3#
X=200
Y=14
W=4
H=190
AntiAlias=1

[MeterProgRight]
Meter=Bar
MeasureName=MeasureTimeP2
BarColor=#Colour2#
BarOrientation=VERTICAL
Flip=1
X=200
Y=14
W=4
H=190
AntiAlias=1

[MeterProgBarTBottomBG]
Meter=Image
SolidColor=#Colour3#
X=10
Y=200
W=190
H=4
AntiAlias=1

[MeterProgBarBottom]
Meter=Bar
MeasureName=MeasureTimeP3
BarColor=#Colour2#
BarOrientation=HORIZONTAL
Flip=1
X=10
Y=200
W=190
H=4
AntiAlias=1

[MeterProgBarLeftBG]
Meter=Image
SolidColor=#Colour3#
X=10
Y=10
W=4
H=190
AntiAlias=1

[MeterProgLeft]
Meter=Bar
MeasureName=MeasureTimeP4
BarColor=#Colour2#
BarOrientation=VERTICAL
Flip=0
X=10
Y=10
W=4
H=190
AntiAlias=1

[MeterCover]
Meter=IMAGE
MeasureName=mCover
X=14
Y=14
W=186
H=186
SolidColor=FFFFFF10
LeftMouseDownAction=!Execute ["#WAPATH#"]

[Stars]
Meter=BITMAP
X=80
Y=205
MeasureName=mRating
BitmapImage=Rating.png
BitmapFrames=6
BitmapZeroFrame=1

[SetRating1]
Meter=IMAGE
X=81
Y=206
W=13
H=10
SolidColor=00000001
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetRating 1"]

[SetRating2]
Meter=IMAGE
X=13r
Y=206
W=13
H=10
SolidColor=00000001
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetRating 2"]

[SetRating3]
Meter=IMAGE
X=13r
Y=206
W=13
H=10
SolidColor=00000001
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetRating 3"]

[SetRating4]
Meter=IMAGE
X=13r
Y=206
W=13
H=10
SolidColor=00000001
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetRating 4"]

[SetRating5]
Meter=IMAGE
X=13r
Y=206
W=13
H=10
SolidColor=00000001
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetRating 5"]

[Track]
Meter=STRING
MeasureName=mPlayer
X=10
Y=10r
W=200
H=16
FontColor=#Colour1#
ClipString=1
Text="Track: %1"

[Artist]
Meter=STRING
MeasureName=mArtist
X=10
Y=16r
W=190
H=16
FontColor=#Colour1#
ClipString=1
Text="Artist: %1"

[Album]
Meter=STRING
MeasureName=mAlbum
X=10
Y=16r
W=190
H=16
FontColor=#Colour1#
ClipString=1
Text="Album: %1"

[Progress]
Meter=STRING
MeasureName=mPosition
MeasureName2=mDuration
MeasureName3=mProgress
X=10
Y=16r
W=190
H=16
FontColor=#Colour1#
ClipString=1
Text="Progress: %1/%2 (%3%)"

[mRating]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=RATING

[mState]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=STATE
Substitute="0":"Stopped","1":"Playing","2":"Paused"

[mStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=STATE
Substitute="0":"4","1":";","2":"4"

[mVolume]
Measure=Plugin
Plugin=NowPlaying.dll
MediaPlayer=[mPlayer]
MediaType=VOLUME

;===============================================================================================
;Meter Controls
;===============================================================================================

[MeterPrevious]
Meter=IMAGE
ImageName=prev.png
X=10
Y=20r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterPreviousHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterPreviousHigh][!RainmeterRedraw]

[MeterPreviousHigh]
Meter=IMAGE
ImageName=prev.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer Previous"]
Hidden=1

[MeterPause]
Meter=IMAGE
ImageName=paus.png
X=34r
Y=r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterPauseHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterPauseHigh][!RainmeterRedraw]

[MeterPauseHigh]
Meter=IMAGE
ImageName=paus.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer PlayPause"]
Hidden=1

[MeterStop]
Meter=IMAGE
ImageName=stop.png
X=34r
Y=r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterStopHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterStopHigh][!RainmeterRedraw]

[MeterStopHigh]
Meter=IMAGE
ImageName=stop.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer Stop"]
Hidden=1

[MeterPlay]
Meter=IMAGE
ImageName=play.png
X=34r
Y=r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterPlayHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterPlayHigh][!RainmeterRedraw]

[MeterPlayHigh]
Meter=IMAGE
ImageName=play.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer PlayPause"]
Hidden=1

[MeterNext]
Meter=IMAGE
ImageName=next.png
X=34r
Y=r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterNexColour1][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterNexColour1][!RainmeterRedraw]

[MeterNexColour1]
Meter=IMAGE
ImageName=next.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer Next"]
Hidden=1

[MeterVolumeDn]
Meter=IMAGE
ImageName=voldn.png
X=10
Y=34r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterVolumeDnHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterVolumeDnHigh][!RainmeterRedraw]

[MeterVolumeDnHigh]
Meter=IMAGE
ImageName=voldn.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer SetVolume -25"]
Hidden=1

[MeterVolumeUp]
Meter=IMAGE
ImageName=volup.png
X=34r
Y=r
w=25
h=25
Antialias=1
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterVolumeUpHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterVolumeUpHigh][!RainmeterRedraw]

[MeterVolumeUpHigh]
Meter=IMAGE
ImageName=volup.png
X=0r
Y=r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "mPlayer SetVolume +25"]
Hidden=1

[MeterToggleShuffle]
Group=Player
Meter=IMAGE
ImageName=shuf.png
X=34r
Y=r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterToggleShuffleHigh][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterToggleShuffleHigh][!RainmeterRedraw]
Hidden=1

[MeterToggleShuffleHigh]
Meter=IMAGE
ImageName=shuf.png
X=0r
Y=0r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "MeasureWinampPlaying SendMessage 273 40023 0"]
Hidden=1

[MeterToggleRepeat]
Group=Player
Meter=IMAGE
ImageName=peat.png
X=34r
Y=0r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterToggleRepeaColour1][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterToggleRepeaColour1][!RainmeterRedraw]
Hidden=1

[MeterToggleRepeaColour1]
Meter=IMAGE
ImageName=peat.png
X=0r
Y=0r
w=25
h=25
ImageTint=#Colour1#
LeftMouseDownAction=!Execute [!RainmeterPluginBang "MeasureWinampPlaying SendMessage 273 40022 0"]
Hidden=1

[MeterEject]
Meter=IMAGE
ImageName=open.png
X=34r
Y=0r
w=25
h=25
ImageTint=#Colour4#
MouseOverAction=!Execute [!RainmeterShowMeter MeterEjecColour1][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter MeterEjecColour1][!RainmeterRedraw]

[MeterEjecColour1]
Meter=IMAGE
ImageName=open.png
X=0r
Y=0r
w=25
h=25
ImageTint=#Colour1#
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mWA SendMessage 273 40029 0"]
Hidden=1
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by smurfier »

Are you intending to use WinAmp or iTunes? iTunes seems to be working just fine.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by Seahorse »

Foobar for me, but the plugin should mean works with all once I strip the last of the winamp specific bits. Going to sort the buttons next... O.O
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by smurfier »

My favorite way to do buttons right now...

Code: Select all

[NormalState]
Group=Button
MouseOverAction=!Execute [!RainmeterToggleMeterGroup Button][!RainmeterRedraw]

[HoverState]
Group=Button
;Use the Up action so your mouse action doesn't interfere with dragging the skin.
LeftMouseUpAction=Whatever
MouseLeaveAction=!Execute [!RainmeterToggleMeterGroup Button][!RainmeterRedraw]
Hidden=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: Combining Roundline and Bar meters... stuck in the mud!

Post by JoBu »

You can probably get rid of the Group=Player tags without hurting the skin... I just had those in there because I was hiding the entire 'music' skin when the 'system' skin or other was activated.

I think the source of your main problem with those buttons is their Hidden=1 status.

If you use Groups to Toggle and Hide certain elements, you have to make sure you're not bugging the skin when you redraw (refresh) it.

With Repeat and Shuffle, since those two require that the music player is active so as to measure their state, they can get a little buggy (at least for WinAmp). Double-check the Measures with !Rainmeter actions to insure the Repeat/Shuffle buttons are active when they're supposed to be, and verify that WinAmp is being measured for Repeat/Shuffle status.

You might find a better way to implement those buttons with the new Plugin... but those are the issues I ran into.

Hope it works out for you!

Cheers,

//JoBu