Hello,
I am under Windows10.
I would like to display in text format, the sound level in percentage for example, indicating: 40% for example or mute.
I searched a little but I did not find, in the doc, it indicates how to increase or decrease the sound but not display it.
Can you help me
It is currently May 2nd, 2024, 10:27 pm
Volume level display
-
- Posts: 10
- Joined: December 6th, 2020, 2:56 pm
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Volume level display
Try this thread https://forum.rainmeter.net/viewforum.php?f=136 it should have some examples and skins you can modify.
But this might help
But this might help
Code: Select all
[MeasureVolume]
Measure=Plugin
Plugin=Win7AudioPlugin
[MeterVolume]
Meter=String
MeasureName=MeasureVolume
X=103
Y=53
Text=%1#CRLF#[MeasureVolume:]%
DynamicVariables=1
FontColor=255,255,255,255
StringAlign=CenterCenter
AntiAlias=1
MouseScrollUpAction=!CommandMeasure "MeasureVolume" "ChangeVolume +5"
MouseScrollDownAction=!CommandMeasure "MeasureVolume" "ChangeVolume -5"
ToolTipText=Mouse scroll to adjust player volume
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Rainmeter Sage
- Posts: 16195
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Volume level display
Beside CyberTheWorm's reply, here is what exactly should you do:Fatichti wrote: ↑April 9th, 2021, 6:47 pm I would like to display in text format, the sound level in percentage for example, indicating: 40% for example or mute.
I searched a little but I did not find, in the doc, it indicates how to increase or decrease the sound but not display it.
Can you help me
- First you need a Win7audio plugin measure, which will be used to get the volume level. Add the following measure to your code (create a new skin if you don't have one):
Code: Select all
[MeasureWin7Audio] Measure=Plugin Plugin=Win7AudioPlugin
- Now you'll need a String meter, to show the percentage returned by the above [MeasureWin7Audio] measure. Add this as well:
Code: Select all
[MeterVolLevel] Meter=STRING X=0 Y=0 Padding=15,5,15,5 FontColor=220,220,220,220 FontEffectColor=0,0,0 StringEffect=Shadow SolidColor=0,0,0,150 FontSize=8 FontFace=Segoe UI StringStyle=BOLD StringAlign=LEFT AntiAlias=1 Text=Volume level: [MeasureWin7Audio:]% DynamicVariables=1 Hidden=0
- An improvement: you can add the following two options to the above [MeterVolLevel] meter, in order to can change the volume through mouse scrolling:
Code: Select all
[MeterVolLevel] ... MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume +#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw] MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
- In order to get this working, you have to add to the [Variables] section a Step variable, which is the volume changement level when you are scrolling. Add it:
Code: Select all
[Variables] Step=3
Code: Select all
[Rainmeter]
Update=1000
[Variables]
Step=3
[MeasureWin7Audio]
Measure=Plugin
Plugin=Win7AudioPlugin
[MeterVolLevel]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Volume level: [MeasureWin7Audio:]%
DynamicVariables=1
Hidden=0
MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume +#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -#Step#"][!UpdateMeasure "MeasureWin7Audio"][!UpdateMeter "MeterVolLevel"][!Redraw]
-
- Posts: 10
- Joined: December 6th, 2020, 2:56 pm
Re: Volume level display
Hi forum,
That's fine, thank you, it works!
That's fine, thank you, it works!
-
- Rainmeter Sage
- Posts: 16195
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Volume level display
I'm glad, especially if you're talking about my code. However if you do, some improvements are still needed, as said in the last paragraph of my reply. Interested?