It is currently April 20th, 2024, 3:46 pm

Adjust Mic Volume Level?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

Hm.. death.crafter, while I like your idea, as it is simpler and more clean, it does't get rid of those "pipeline" errors in the log. Those are super annoying...
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Adjust Mic Volume Level?

Post by death.crafter »

Yincognito wrote: August 13th, 2021, 11:01 pm Of course, it's more obvious in death.crafter's version, as it's based on click and doesn't "refine" the return value through something like [*MeasureInputPercent:%,0*]
If you haven't noticed I use floor on $MouseX:%$. So there is no way you could pass a fractional value, unless Rainmeter got something fishy going on :confused:
from the Realm of Death
User avatar
Yincognito
Rainmeter Sage
Posts: 7134
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Adjust Mic Volume Level?

Post by Yincognito »

jsmorley wrote: August 13th, 2021, 11:04 pmDunno. I just never get a fractional value as the volume, as that is not supported in Windows sound settings.
death.crafter wrote: August 13th, 2021, 11:11 pmSame here. I use floor(), so even if you could, you can't possibly set a double value in the first place. I wonder why they end up getting fractional values.
Don't know if it will work for you, but for me it does:
- set the volume to 1% (you can do that from Windows settings as well)
- temporarily set return $((Get-AudioDevice -RecordingVolume) -replace '%', '') | Out-File -FilePath .\Volume.txt in your scripts, to create a Volume.txt file in the current folder with the output; the above addition might be incorrect, so I would quickly unload the skin afterwards, as I didn't bother with those details

This is how Volume.txt looks for me:

Code: Select all

0,9999989
P.S. And please, try to listen instead of saying things are not possible or that is no way stuff can happen. I'm not lying, you know... :confused: Of course, it's not a big issue, on that I agree, but it DOES happen. There are 2 mentions of it, both mine and sl23's.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Adjust Mic Volume Level?

Post by death.crafter »

jsmorley wrote: August 13th, 2021, 11:15 pm Hm.. death.crafter, while I like your idea, as it is simpler and more clean, it does't get rid of those "pipeline" errors in the log. Those are super annoying...
I know right. I don't have a single idea why they show up at all. I get them at random and they get fixed automatically. Well they did in my other skin's settings menu.

Maybe I will do some trial and error when I have time tomorrow.
Yincognito wrote: August 13th, 2021, 11:21 pm P.S. And please, try to listen instead of saying things are not possible or that is no way stuff can happen. I'm not lying, you know... :confused:
I was not saying you are lying or anyone is. I am just saying that I took measures to prevent that. It's probably some error with the cmdlet.
from the Realm of Death
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

Got it... It was the overkill and redunant $RmAPI.Bang('[!CommandMeasure InputVolume Update][!UpdateMeter *][!Redraw]') calls in the Powershell script. This was causing a recursive re-entry into the plugin. Errors gone...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

As to the fractional numbers, I just don't get that. The only thing I use to set the volume is something like [MeasureOutputPercent:%,0] which I don't at all see how it can be a fractional value.
User avatar
Yincognito
Rainmeter Sage
Posts: 7134
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Adjust Mic Volume Level?

Post by Yincognito »

death.crafter wrote: August 13th, 2021, 11:25 pmI was not saying you are lying or anyone is. I am just saying that I took measures to prevent that. It's probably some error with the cmdlet.
Yep, that definitely comes from PS. Rainmeter has no fault in that indeed (I also tried Floor, Round, Trunc, passing the value to a measure instead, before I realized PS sent it that way - and as my screenshot prove, so does in jsmrley's skin, the only reason why it's not seen is because he rounds the value before showing it). ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

Updated the .rmskin in https://forum.rainmeter.net/viewtopic.php?f=5&t=38135&start=30#p195744

Edit: Updated it again due to a small "oops".
User avatar
Yincognito
Rainmeter Sage
Posts: 7134
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Adjust Mic Volume Level?

Post by Yincognito »

jsmorley wrote: August 13th, 2021, 11:30 pm As to the fractional numbers, I just don't get that. The only thing I use to set the volume is something like [MeasureOutputPercent:%,0] which I don't at all see how it can be a fractional value.
That's true, like I mentioned in the reply to death.crafter as well. The problem is in PS (or in the AudioDeviceCmdlets module?). Your "input" measure is getting the fractional value for me, if I set my mic to 1%, irrespective if I do it from Windows or otherwise:
Fractional.jpg
I'm only saying this to help. If other folks use your skin, they might not realize they have to round the measure's value like you did, e.g. [MeasureOutputPercent:%,0] and look to use it directly. The same for death.crafter's implementation.
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on August 13th, 2021, 11:43 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Adjust Mic Volume Level?

Post by jsmorley »

Yincognito wrote: August 13th, 2021, 11:40 pm That's true, like I mentioned in the reply to death.crafter as well. The problem is in PS. Your "input" measure is getting the fractional value for me, if I set my mic to 1%, irrespective if I do it from Windows or otherwise:
Fractional.jpg
I'm only saying this to help. If other folks use your skin, they might not realize they have to round the measure's value like you did, e.g. [MeasureOutputPercent:%,0] and look to use it directly. The same for death.crafter's implementation.
Ok. I just have yet to ever see a fractional value returned.


1.jpg
You do not have the required permissions to view the files attached to this post.