It is currently October 6th, 2024, 12:28 pm

Windows main audio volume per channel?

Get help with creating, editing & fixing problems with skins
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Windows main audio volume per channel?

Post by rbriddickk84 »

That sounds very cool then, mainly the NirCMD part. I will try to code things then and see what the road takes me. :D
ZXCVBOT wrote: November 7th, 2023, 3:15 pm You are a Sage - now act like one!
:lol: I'm a burned out John McClane who tries to return to some bloody coding :D
ZXCVBOT

Re: Windows main audio volume per channel?

Post by ZXCVBOT »

Good! Very good! :thumbup:
Post some code whenever you want or if you get confused.
User avatar
Yincognito
Rainmeter Sage
Posts: 8358
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows main audio volume per channel?

Post by Yincognito »

I like the path this discussion has taken - being positive is a good thing... :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Windows main audio volume per channel?

Post by rbriddickk84 »

Okay, with all of your kind helping helps i cooked together some achievement :D

It probs needs lot of polishing (it is late in here), i will do that later i think, when i will have the time. :)

Here is the bakery:

Code: Select all

[Rainmeter]
Update=15
DynamicWindowSize=1
AccurateText=1

[Variables]
@include=sett.inc
dotL=99
dotR=99
outL=#LAuPos#
outR=#RAuPos#

[SliderDetectorLeft]
Meter=Image
SolidColor=100,200,200
X=4
Y=0
W=100
H=12
LeftMouseDownAction=[!SetVariable dotL $MouseX$][!SetVariable outL (($MouseX$/100)*65535)][!UpdateMeterGroup vis][!Redraw]["#@#Addons\nircmd.exe" setvolume 0 #outL# #outR#]
LeftMouseDoubleClickAction=[!SetVariable outL 65535][!SetVariable dotL 99][!UpdateMeterGroup vis][!Redraw]["#@#Addons\nircmd.exe" setvolume 0 65535 #outR#]
DynamicVariables=1

[SliderDetectorRight]
Meter=Image
SolidColor=200,100,200
X=4
Y=16
W=100
H=12
LeftMouseDownAction=[!SetVariable dotR $MouseX$][!SetVariable outR (($MouseX$/100)*65535)][!UpdateMeterGroup vis][!Redraw]["#@#Addons\nircmd.exe" setvolume 0 #outL# #outR#]
LeftMouseDoubleClickAction=[!SetVariable outR 65535][!SetVariable dotR 99][!UpdateMeterGroup vis][!Redraw]["#@#Addons\nircmd.exe" setvolume 0 #outL# 65535]
DynamicVariables=1

[BalanceVolShapeLeft]
Meter=Shape
Shape=Ellipse 2,2,4,6
X=#dotL#
Y=4
UpdateDivider=-1
DynamicVariables=1
Group=vis

[BalanceVolShapeRight]
Meter=Shape
Shape=Ellipse 2,2,4,6
X=#dotR#
Y=20
UpdateDivider=-1
DynamicVariables=1
Group=vis
Explanations:
- In the Variables there are two vars: "outL=#LAuPos#" and "outR=#RAuPos#". I just had the thought that i should save that in a settings file on the case of refreshing the skin to remember the dots positions. Basically the LAuPos and RAuPos are both 65535.

- I downloaded and placed the nircmd.exe file in the "@Resources\Addons\" folder, it did the job.

- First i started to make a one line classic balance, but then i thought it's easier to just make 2 separate lines for the channels.

:)

So thank you again both of you the helps! :cheers:
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Windows main audio volume per channel?

Post by rbriddickk84 »

Additional note:

I found NirCMD a littlebit glitchy, sometimes the volume just resets on the channel to max even when it's not in that position and the value is not max.
Also sometimes it didn't change the volume at all, it is like 3 times out of 10 when it happened. But mainly it does its job. :)
User avatar
balala
Rainmeter Sage
Posts: 16632
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows main audio volume per channel?

Post by balala »

rbriddickk84 wrote: November 8th, 2023, 9:37 am I found NirCMD a littlebit glitchy,
Apart from this, NirCmd, at least if you intend to distribute your skin, should be avoided, because many times it is detected as being infected, even if in fact it's not. Virus Total for instance reports it. So if you distribute your skin, there will be users who will not download your package, due to this fact. I know, because I tried...
ZXCVBOT

Re: Windows main audio volume per channel?

Post by ZXCVBOT »

Then are all .exe files detected as malicious? I know it's a false-positive, but just wanted to know for the sake of curiosity.
User avatar
balala
Rainmeter Sage
Posts: 16632
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows main audio volume per channel?

Post by balala »

ZXCVBOT wrote: November 8th, 2023, 1:59 pm Then are all .exe files detected as malicious? I know it's a false-positive, but just wanted to know for the sake of curiosity.
Even if not all of them, many are. Me personally just try to avoid using them in my skins.
ZXCVBOT

Re: Windows main audio volume per channel?

Post by ZXCVBOT »

Okay. Got it.
ZXCVBOT

Re: Windows main audio volume per channel?

Post by ZXCVBOT »

Just tested out the skin posted above, have to say - it works, but the values are wayy toooo off.


I think, you might need some help in making a formula. As, sometimes setting one-side to lower-number, sets it to higher instead. It is however a rainmeter issue, which someone can solve here.

I can think of something like this:

Code: Select all

[SomeMeasure]
...
IfCondition=<AConditionThatTellsIfCurrentValueIsGreaterThan/EqualTo65535-OrNot>
IfTrueAction=<SetCurrentMaxValueTo65535>
IfFalseAction=<SetToLowestPossible>
...
[SliderDetectorLeft]
...
MouseScrollDownAction=[!SetVariable outL ((<SomeVariableThatRecoversTheCurrentValue>-<SomeFixedVariable>)]
MouseScrollUpAction=[!SetVariable outL ((<SomeVariableThatRecoversTheCurrentValue>+<SomeFixedVariable>)]
...
Waiting for the below part to be verified:
Got this limit of Rainmeter brackets while testing a workaround: Formula: Internal error I think, it can't handle more than 256 characters.