It is currently March 28th, 2024, 12:07 pm

VU Level Metres in Rainmeter?

Get help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: VU Level Metres in Rainmeter?

Post by eclectic-tech »

@sl23

Did you get balala's second suggestion to "hold peak RMS for a set time" working? It gives a different peak display holding the peak RMS for a set time...

In regard to the Invalid PlayerType= that I am seeing, you could eliminate both that error and the conflict of your process checking by modifying the [mPlayer] section to show/hide the level meters based on whether the playername is active, rather than testing if foobar2000 is active (tested with winamp, foobar2000, and musicbee).

Code: Select all

[mPlayer]
Measure=Plugin
Plugin=NowPlaying
PlayerName=CAD
;winamp
PlayerType=STATUS
IfCondition=(mPlayer=1)
IfTrueAction=[!ShowMeterGroup Foobar] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!HideMeterGroup Foobar] [!UpdateMeter *] [!Redraw]

User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

Upon reading the docs again about the Peak and RMS settings, I understand now why they work as they do, they emulate an analogue VU Metre, not a digital one. Which is where the peaks would hold. So settings here would be something like:

Code: Select all

PeakType=Digital
PeakHold=1000
PeakAttack=50
PeakDecay=500
PeakGain=2.5
Maybe this could be added as a feature request?
I'll keep my fingers crossed, but won't hold my breath! :uhuh: :D
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

No I probably did something wrong? Wouldn't work for me.

Re:[mPlayer]
But wouldn't that only check for compatible players? In other words Mulab, which isn't a player but a DAW, wouldn't get picked up as being open or closed.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

Also, what is the Sensitivity=2 in my skin for? I copy/pasted it so unsure exactly what it is.
The manual states only about it's use in an FFT context, is it the same?
In the manual it says:
Increasing this value will cause the measure to respond to quieter sounds, decreasing it will only trigger the measure on louder sounds.
But to me, it seems to be the reverse is true?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: VU Level Metres in Rainmeter?

Post by eclectic-tech »

sl23 wrote:No I probably did something wrong? Wouldn't work for me.

Re:[mPlayer]
But wouldn't that only check for compatible players? In other words Mulab, which isn't a player but a DAW, wouldn't get picked up as being open or closed.
Yes, all NowPlaying compatible players should work. You have separate measures for the player (foobar2000) and Mulab. With the suggested change any compatible player will respond (you would not need to test for every player), but would for other programs you want the skin to respond to, such as Mulab.

Here is your code with the changes balala suggested; works here. The "Sensitivity=2" was in your original code, didn't really look at what it's purpose was.

Code: Select all

[Rainmeter]
Update=25
Background=1. VU Off.png
BackgroundMode=0
AccurateText=1

[Metadata]
Author=sl23 (credits: eclectic-tech, Mixx Beatz, OcenAudio)
Description=VU Metre

[Variables]
VolLow=40
VolMax=100
ResetTime=2

[mPlayer]
Measure=Plugin
Plugin=NowPlaying
PlayerName=CAD
;winamp
PlayerType=STATUS
IfCondition=(mPlayer=1)
IfTrueAction=[!ShowMeterGroup Foobar] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!HideMeterGroup Foobar] [!UpdateMeter *] [!Redraw]

; ========================================
; ; FOOBAR
; ========================================
; [mProcessFoobar]
; Measure=Plugin
; Plugin=Process
; ProcessName=winamp.exe
; ;foobar2000.exe
; IfCondition=mProcessFoobar=1
; IfTrueAction=[!ShowMeterGroup Foobar] [!UpdateMeter *] [!Redraw]
; IfFalseAction=[!HideMeterGroup Foobar] [!UpdateMeter *] [!Redraw]

========================================
; MULAB
========================================
[mProcessMuLab]
Measure=Plugin
Plugin=Process
ProcessName=mulab.exe
IfCondition=mProcessMuLab=1
IfTrueAction=[!ShowMeterGroup Foobar] [!UpdateMeter *] [!Redraw]
;IfFalseAction=[!HideMeterGroup Foobar] [!UpdateMeter *] [!Redraw]

========================================
; VOLUME
========================================
[sVol]
FontFace=Corbel
StringStyle=Bold
FontSize=8
FontColor=175,175,175,110
SolidColor=0,0,0,1
AntiAlias=1
X=2
Y=4

[mWin7Vol]
Measure=Plugin
Plugin=Win7AudioPlugin
IfAboveValue=49
IfAboveAction=[!HideMeter "VolMax"] [!ShowMeter "VolLow"] [!Redraw]
IfBelowValue=50
IfBelowAction=[!HideMeter "VolLow"] [!ShowMeter "VolMax"] [!Redraw]
DynamicVariables=1
UpdateDivider=4

[VolLow]
Meter=Button
ButtonImage=VolLow.png
MeterStyle=sVol
LeftMouseUpAction=[!CommandMeasure "mWin7Vol" "SetVolume 40"] [!UpdateMeasure mWin7Vol] [!UpdateMeter *] [!Redraw]
UpdateDivider=-1

[VolMax]
Meter=Button
ButtonImage=VolMax.png
MeterStyle=sVol
LeftMouseUpAction=[!CommandMeasure "mWin7Vol" "SetVolume 100"] [!UpdateMeasure mWin7Vol] [!UpdateMeter *] [!Redraw]
DynamicVariables=1
UpdateDivider=-1

[VolLevel]
Meter=String
MeterStyle=sVol
StringAlign=Center
Text=[mWin7Vol:]
DynamicVariables=1
X=10r
Y=16r

========================================
; VU METRE
========================================

[mAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=100
RMSDecay=150
RMSGain=2.0
PeakAttack=100
PeakDecay=3000
PeakGain=2.0

[mdb]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=Sum

[mLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=L

[mRight]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=R

[mPeakLeft]
Measure=Calc
Formula=( Max ( mPeakLeft, mLeft ))
OnChangeAction=[!DisableMeasure "MeasureTimeLeft"][!UpdateMeasure "MeasureTimeLeft"][!EnableMeasure "MeasureTimeLeft"]

[mPeakRight]
Measure=Calc
Formula=( Max ( mPeakRight, mRight ))
OnChangeAction=[!DisableMeasure "MeasureTimeRight"][!UpdateMeasure "MeasureTimeRight"][!EnableMeasure "MeasureTimeRight"]

[mClipLeft]
Measure=Plugin
Plugin=AudioLevel
Port=Output
Sensitivity=2
Channel=L
RMSAttack=600
RMSDecay=500
RMSGain=2.0

[mClipRight]
Measure=Plugin
Plugin=AudioLevel
Port=Output
Sensitivity=2
Channel=R
RMSAttack=600
RMSDecay=500
RMSGain=2.0

[MeasureTimeLeft]
Measure=Calc
Formula=( MeasureTimeLeft + 1 )
IfCondition=(#CURRENTSECTION#=#ResetTime#)
IfTrueAction=[!DisableMeasure "mPeakLeft"][!UpdateMeasure "mPeakLeft"][!EnableMeasure "mPeakLeft"]
UpdateDivider=40

[MeasureTimeRight]
Measure=Calc
Formula=( MeasureTimeRight + 1 )
IfCondition=(#CURRENTSECTION#=#ResetTime#)
IfTrueAction=[!DisableMeasure "mPeakRight"][!UpdateMeasure "mPeakRight"][!EnableMeasure "mPeakRight"]
UpdateDivider=40

[sVU]
BarImage=OcenVUMetre
BarOrientation=Horizontal
Group=Foobar

[sPeakL]
SolidColor=235,70,0,255
DynamicVariables=1
Group=Foobar
X=(26+200*[mPeakLeft])
DynamicVariables=1

[sPeakR]
SolidColor=235,70,0,255
DynamicVariables=1
Group=Foobar
X=(26+200*[mPeakRight])
DynamicVariables=1

[sClip]
BitMapImage=OcenClip.png
BitmapFrames=2
Group=Foobar
X=234

[dbMetre]
Meter=Bar
MeasureName=mdb
BarImage=OcendbMetre
BarOrientation=Horizontal
Group=Foobar
X=18
Y=36

[PeakLeft]
Meter=Image
;MeasureName=mPeakLeft
MeterStyle=sPeakL
Y=5
W=1
H=10

[Left]
Meter=Bar
MeasureName=mLeft
MeterStyle=sVU
X=26
Y=5

[PeakRight]
Meter=Image
;MeasureName=mPeakRight
MeterStyle=sPeakR
Y=7R
W=1
H=10

[Right]
Meter=Bar
MeasureName=mRight
MeterStyle=sVU
X=26
Y=r

[ClipLeft]
Meter=BitMap
MeasureName=mClipLeft
MeterStyle=sClip
Y=5

[ClipRight]
Meter=BitMap
MeasureName=mClipRight
MeterStyle=sClip
Y=7R
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

Wow! Perfection! :lol:

That's how a digital VU should work, thanks for all your help :D
Hopefully this will become an integral part of the plugin one day! :rosegift:

Thanks for all your efforts, I'll post the finished product when done.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

I see you changed the way the process detection is working. Disabling Mulab's !HideMeter bang means that opening Mulab will show the meters but not hide on closing it. Perhaps this was just while you were testing?

I know there's probably a way round it by detecting if either is open not to hide, which is essentially the problem. If one is open and then closed, then open the other, all is good. The conflict arises when you have one open, open the other, then close one of them and the skin is refreshed, it hides the metres when they shouldn't be hidden.

Probably a math thing, but I'm not going to worry about that, I'll just remove the Mulab detection and use only the player one. Not really necessary to have Mulab anyway.

FAO jsmorley:
For other users/situations, shouldn't there be a simple way to avoid this conflict? Perhaps by specifying a line:

Code: Select all

ProcessName=foobar.exe | mulab.exe
Maybe this should tell Rm that if either process is open NOT to hide the metre's, only hide the metre's if BOTH are closed.
No doubt there's a better way than my suggestion, but just to give you the idea.

I do have this issue on my MediaStatBar skin I have on my taskbar. There's a lot of metre's, so some are shown/hidden when either VLC or foobar is open. But if both apps are opened then one closed, there's conflict again. But it's rare to have both of these apps open so it's not a problem so much for me as I understand why it causes conflict and just put up with. It works for me and I haven't shared for this reason.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

Ok, here's the final version, should anyone like it.
OcenVUMetre_1.7.rmskin
(15.53 KiB) Downloaded 54 times
I have kept the original two skins with the original Peak Metre's and also added another two skins identical, but with the newer Peak measurements.

Thanks and credit to balala and eclectic-tech for all their help :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: VU Level Metres in Rainmeter?

Post by eclectic-tech »

Happy if I helped! :great:

Yeah, I did comment out the Mulab line... You could probably put all the conditons for processes you want to check in the [mPlayer] section using OR in the IfCondition to show if any are active and hide if not. That should avoid conflicts...
IfCondition=(mPlayer=1)||(mProcessMuLab=1)||(Someother1=1)
You would still need separate measures for each external process (Mulab, etc.), but it should let you only show the meters when apps you want the meters to respond to are active.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: VU Level Metres in Rainmeter?

Post by sl23 »

Oh wow! That was simpler than I expected, thanks, I'll give it a try. :thumbup:
Post Reply