It is currently April 19th, 2024, 10:11 am

System volume plugin idea for Rainmeter - Need feedback

Share and get help with Plugins and Addons
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: System volume plugin idea for Rainmeter - Need feedback

Post by Chewtoy »

I'm on XP sp2 and I get as far as [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\ and 0000 got no subfolders.
In the folder is 9 REG_SZ files and one REG_BINARY. All about drivers.
I don't think, therefore I'm not.
User avatar
UNleash
Posts: 50
Joined: December 13th, 2009, 4:28 am
Location: North-West Germany

Re: System volume plugin idea for Rainmeter - Need feedback

Post by UNleash »

Not existing on Win7 x64bit.
Even made what you did, and it showed me like 20 entrys changed after change of volume.
Image
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: System volume plugin idea for Rainmeter - Need feedback

Post by dragonmage »

I know the dev of 3RVX I'll see if I can contact him and find out how he measures the volume level.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: System volume plugin idea for Rainmeter - Need feedback

Post by JpsCrazy »

I'll be blunt. I know nothing about how to make any of these 'programs' (can't think of a better word) for Rainmeter, or anything in fact.
But I do know software.
There are programs/applications that let you control the volume without using the normal sndvol.exe.
Can't you basically find a way to dissect such a program and use just the essential uses of it. So basically use the volume changer code and just change the icons, slider, etc.

Isn't this possible?
nasasempai
Posts: 4
Joined: January 6th, 2010, 7:20 am

Re: System volume plugin idea for Rainmeter - Need feedback

Post by nasasempai »

Dear Rainmeter Community,
Here is my code, posted this weekend as I promised. ^_^

Respectfully,
nasasempai

Code: Select all

[Rainmeter]
Update = 100
Author = nasasempai

[Variables]
RotationAngle = -6.2832
Color1 = 255,255,255,80
	; Gray
Color2 = 255,255,255,180
	; White
Color3 = 0,0,0,80
	; Black
RegPath = SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\Settings\filter\Speaker1

;COMMENTS------------------------------------------------------------------------------------------
; The Windows system volume can be found in the system registry and can be read with the Registry 
; Measure. The registry for your machine is most likely different from mine. I found my registry by
; using a program called RegistryWorkshop found at 
; http://www.torchsoft.com/en/rw_information.html . RegistryWorkshop is not a freeware but it has a
; 30-day-free trial. I set the volume to 0 and, with RegistryWorkshop, took a snapshot of the 
; registry. I then set the volume to 100 and to another snapshot of the registry. In 
; RegistryWorkshop, under Tools, I used the Compare Registries tool to compare the two snapshots.
; RegistryWorkshop will give you a list of registries that have changed. Go through each one until 
; you have found one that changes when you change the volume. To refresh RegistryWorkshop, press 
; F5. You will need to refresh RegistryWorkshop everytime you change the volume. 1 or all of the
; registries in the list may read the system volume. Simply choose one. The Ouput values from this
; registry may be confussing. I plotted them on a speedsheet where the y-axis was volume from 0 to 
; 100 and the x-axis was the registry values that corresponded to the volume from 0 to 100.
; For me, the pattern was exponential in the form of y = ab^x.
;
; I tried to use the same method to measure the MasterMute Registry. However, currently, only 
; string and long values (ex: DWORD) are supported by the Registry Measure. The MasterMute Registry
; is a Binary data type, and therefore, not supported by the Registry Measure. Using the Registry
; Measure on a Binary Registy, just gave me a value of 0 constantly, all the time.   
;
; PS: The way this skin dispalys is with a donut chart or circles. I simply like them, but the
; meter that you should focus on is Meter_Vol_Text. 

;MEASURES------------------------------------------------------------------------------------------
[Measure_Calc1]
Measure = Calc
Formula = 1

[Measure_VolRegKey]
Measure = Registry
RegKey = #RegPath#
RegHKey = HKEY_LOCAL_MACHINE
RegValue = MasterVolume

[Measure_Vol]
Measure = Calc
Formula = ( ((SGN((TRUNC((FRAC((Measure_VolRegKey)/100000000))*10000))-8872))=(-1)) ? (100) : (ROUND(((0.167214*1.010333**((TRUNC((FRAC((Measure_VolRegKey)/100000000))*10000))-8872))/100.896625)*99)) )
MaxValue = 100
MinValue = 0

;METERS--------------------------------------------------------------------------------------------
[Meter_Vol_Total]
Meter = RoundLine
MeasureName = Measure_Calc1
Solid = 1
X = 0
Y = 0
W = 200
H = 200
LineLength = 80
LineColor = #Color3#
LineStart = 55
StartAngle = 0
RotationAngle = #RotationAngle#
AntiAlias = 1

[Meter_Vol]
Meter = RoundLine
MeasureName = Measure_Vol
Solid = 1
X = 0
Y = 0
W = 200
H = 200
LineLength = 80
LineColor = #Color1#
LineStart = 55
StartAngle = 0
RotationAngle = #RotationAngle#
AntiAlias = 1

[Meter_Vol_Text]
Meter = String
MeasureName = Measure_Vol
X = 148
Y = 52
W = 200
H = 15
FontColor = #Color2#
AutoScale = 1
Text = "Volume: %1%"
StringStyle = BOLD
NumOfDecimals = 0
AntiAlias = 1
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: System volume plugin idea for Rainmeter - Need feedback

Post by Chewtoy »

Yeah. Didn't work. Just says 100% no matter the volume.
Not all to surprising as I don't have that Registry item where it's pointed to.
I don't think, therefore I'm not.
MetallicCharles
Posts: 1
Joined: April 29th, 2010, 11:00 pm

Re: System volume plugin idea for Rainmeter - Need feedback

Post by MetallicCharles »

I'm also currently working on a volume meter and so far the best way I've found to retrieve the current volume is using this method, but the little program gets run every 10 seconds creating problems... Has anyone found a better way to get this yet??
User avatar
Samus Aran
Posts: 86
Joined: August 7th, 2009, 11:23 pm

Re: System volume plugin idea for Rainmeter - Need feedback

Post by Samus Aran »

Work is progressing...
I have a way to read and set the system volume using VB.NET, now I need your help, developers. :D
What's the best way to make a Rainmeter-usable DLL in VB.NET?
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: System volume plugin idea for Rainmeter - Need feedback

Post by dragonmage »

Moved to Plugins and Addons. I should have done this a while ago.
mhinckley3
Posts: 13
Joined: May 28th, 2010, 11:03 pm
Location: Georgia

Re: System volume plugin idea for Rainmeter - Need feedback

Post by mhinckley3 »

I was able to get nasasempai's code working for Windows 7 Professional x64. It doesn't show the exact volume all the time but is only off by 1 to 3 percent at most at a quick glance. I set RegPath = SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\GlobalSettings\RearLineOut\Node000 and changed RegValue=MasterVolume to RegValue=Chan000. I used Registry Workshop as well and I also ended up with around 20 keys showing after changing the volume from 0 to 100. If I am not mistaken this should be normal especially if you have a sound card with more than a L and R output as the master volume controls the registry keys for all audio out channels. Very cool skin nasasempai. I plan on adding it to my desktop configuration and hope there is a way to allow the skin to adjust the volume.
[hsimg]http://dl.dropbox.com/u/9795054/desktop.jpg[/hsimg]