I can live with itdeath.crafter wrote: ↑August 12th, 2021, 10:02 pm Yeah I was talking about this one. It works but still gives error.
It is currently April 27th, 2024, 2:04 am
Adjust Mic Volume Level?
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Adjust Mic Volume Level?
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
It's the plugin. Nothing can be done about that.sl23 wrote: ↑August 12th, 2021, 10:06 pm I was planning on adding the code to another skin if that's ok? Thanks for the help
Is the delay after clicking due to the nature of the plugin? I tried using:
LeftMouseUpAction=[!SetVariable MicVolume "(Floor($MouseX:%$))"][!CommandMeasure MicVolume "Set-MicVolume"] [!UpdateMeter *][!Redraw]
But it no effect.
If you want you can remove the [!UpdateMeter *][!Redraw] from script file and add it yo LeftMouseUpAction.
I made it for you to use lol. Just keep Addons folder intact.I was planning on adding the code to another skin if that's ok?
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Adjust Mic Volume Level?
Ah ok, thought as much.
I did add it to the LeftMouseUpAction, should I delete it from the script then? It doesn't appear to help anyway does it?death.crafter wrote: ↑August 12th, 2021, 10:21 pm If you want you can remove the [!UpdateMeter *][!Redraw] from script file and add it yo LeftMouseUpAction.
Yeah, just best to check though And yes, I'll keep it intact, seeing as I haven't a clue how it worksdeath.crafter wrote: ↑August 12th, 2021, 10:21 pm I made it for you to use lol. Just keep Addons folder intact.
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
Code: Select all
function Set-MicVolume {
Set-AudioDevice -RecordingVolume $RmAPI.Variable('MicVolume')
$RmAPI.Bang('[!CommandMeasure MicVolume Update][!UpdateMeter *][!Redraw]')
}
Code: Select all
function Set-MicVolume {
Set-AudioDevice -RecordingVolume $RmAPI.Variable('MicVolume')
$RmAPI.Bang('[!CommandMeasure MicVolume Update]')
}
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Adjust Mic Volume Level?
OMG! I'm stuck already!
So, I'm trying to convert it into a bar rather than a shape measure, and got this so far:
Isn't this all that's required from that demo skin? This new skin is in the same folder as the original, so it should see the @Resources folder shouldn't it?
EDIT: Does it have anything to do with this file? MicVolume.code-workspace
What about the skinName or it's folderName, can they be changed without affecting the working of this code?
EDIT: Oh crap!!! Sorry, my fault, was working from the wrong folder!
It works, but not very well. Clicking on the left of the bar is ok but 2% shows fine, click 3% and you get 2.999999999%.
Also, as you move up the bar, the place where the cursor is is not where the 'click' activates the bar. eg, click around 80% and you;ll get about 87%
So, I'm trying to convert it into a bar rather than a shape measure, and got this so far:
Code: Select all
[Variables]
MicVolume=
Increment=5
[styleBar]
BarColor=235,170,0,255
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15
[MicVolume]
Measure=Plugin
Plugin=PowershellRM
ScriptFile=#@#Scripts\MicVolume.ps1
[meterBarMic]
Meter=Bar
MeterStyle=styleBar
MeasureName=MicVolume
LeftMouseUpAction=[!SetVariable MicVolume "(Floor($MouseX:%$))"][!CommandMeasure MicVolume "Set-MicVolume"] [!UpdateMeter *][!Redraw]
DynamicVariables=1
X=50
Y=50
W=100
H=8
[MeterString]
Meter=String
MeasureName=MicVolume
MeterStyle=sAllText
X=20
Y=15
Text=%1%
EDIT: Does it have anything to do with this file? MicVolume.code-workspace
What about the skinName or it's folderName, can they be changed without affecting the working of this code?
EDIT: Oh crap!!! Sorry, my fault, was working from the wrong folder!
It works, but not very well. Clicking on the left of the bar is ok but 2% shows fine, click 3% and you get 2.999999999%.
Also, as you move up the bar, the place where the cursor is is not where the 'click' activates the bar. eg, click around 80% and you;ll get about 87%
- MuLab -
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Adjust Mic Volume Level?
Too tired, I need my bed! zzz
Thanks for you assistance death.crafter, I'll be back on this tmrw
EDIT: Here's what I'm working on, so you get a better picture.
Thanks for you assistance death.crafter, I'll be back on this tmrw
EDIT: Here's what I'm working on, so you get a better picture.
Last edited by sl23 on August 14th, 2021, 2:07 pm, edited 3 times in total.
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
Don't know about bars much but you shouldn't get double values. Only integers since floor is used.sl23 wrote: ↑August 12th, 2021, 10:51 pm OMG! I'm stuck already!
So, I'm trying to convert it into a bar rather than a shape measure, and got this so far:Isn't this all that's required from that demo skin? This new skin is in the same folder as the original, so it should see the @Resources folder shouldn't it?Code: Select all
[Variables] MicVolume= Increment=5 [styleBar] BarColor=235,170,0,255 BarOrientation=HORIZONTAL SolidColor=255,255,255,15 [MicVolume] Measure=Plugin Plugin=PowershellRM ScriptFile=#@#Scripts\MicVolume.ps1 [meterBarMic] Meter=Bar MeterStyle=styleBar MeasureName=MicVolume LeftMouseUpAction=[!SetVariable MicVolume "(Floor($MouseX:%$))"][!CommandMeasure MicVolume "Set-MicVolume"] [!UpdateMeter *][!Redraw] DynamicVariables=1 X=50 Y=50 W=100 H=8 [MeterString] Meter=String MeasureName=MicVolume MeterStyle=sAllText X=20 Y=15 Text=%1%
EDIT: Does it have anything to do with this file? MicVolume.code-workspace
What about the skinName or it's folderName, can they be changed without affecting the working of this code?
EDIT? Oh crap!!! Sorry, my fault, was working from the wrong folder!
It works, but not very well. Clicking on the left of the bar is ok but 2% shows fine, click 3% and you get 2.999999999%.
Also, as you move up the bar, the place where the cursor is is not where the 'click' activates the bar. eg, click around 80% and you;ll get about 87%
May be try the same with shape. I prefer shapes because they are like vectors, pixel independent i.e.
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
-
- Rainmeter Sage
- Posts: 7175
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Adjust Mic Volume Level?
For the record, if it's for local use, you can easily set the mic level using Win7Audio measures, assuming you identify your MIC's index in the output device list first.
If intended to be shared, probably some more measures (e.g. AudioLevel, Registry) would be needed to identify the MIC's ID and / or index so you can set it for use with the Win7Audio measure.
Another alternative is to use some NirCmd utilities to do that.
If intended to be shared, probably some more measures (e.g. AudioLevel, Registry) would be needed to identify the MIC's ID and / or index so you can set it for use with the Win7Audio measure.
Another alternative is to use some NirCmd utilities to do that.
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: Adjust Mic Volume Level?
https://docs.rainmeter.net/manual-beta/plugins/win7audio/Yincognito wrote: ↑August 13th, 2021, 10:46 am For the record, if it's for local use, you can easily set the mic level using Win7Audio measures, assuming you identify your MIC's index in the output device list first.
If intended to be shared, probably some more measures (e.g. AudioLevel, Registry) would be needed to identify the MIC's ID and / or index so you can set it for use with the Win7Audio measure.
Another alternative is to use some NirCmd utilities to do that.
Are you sure?
And about nircmd, how would you get the volume?
from the Realm of Death