Closed jacklul closed 7 years ago
Hey, thanks for your request.
On first glance your code seems pretty cool, but it's limited to Spotify. The big problem is player support right now, where not every player supports the volume variable and also not every player outputs the same value. So it's quite hard to do it consistently.
I'm gonna keep this issue open for now but if i can't find a proper solution in the next few days i will close this issue. Maybe someone with some more Rainmeter knowledge can jump in here and propose a proper solution.
I know my plugin supports volume, but I am not sure what how many of the NowPlaying players support it and what the default value is in the ones that dont. If the default value is 100 then we can safely add it. The bigger issue will be potentially when the player is closed.
Edit: looking closer at it all but WLM players support volume.
Ok, thats one first thing but how consistent are those values between the players? Because for example 50 in AIMP is not the same as 50 in Spotify.
Updated to better way of doing this:
[Rainmeter]
Update=1000
[Variables]
MinSensitivity=30
MaxSensitivity=120
[Dummy]
Meter=STRING
[getSpotifyVolume]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=Volume
[calculateVisualizerSensitivity]
Measure=Calc
Formula=((100 - [getSpotifyVolume]) / 100) * #MaxSensitivity#
DynamicVariables=1
[adjustVisualizerSensitivity]
Measure=Calc
Formula=([calculateVisualizerSensitivity] >= #MinSensitivity#) ? (([calculateVisualizerSensitivity] <= #MaxSensitivity#) ? [calculateVisualizerSensitivity] : #MaxSensitivity#) : #MinSensitivity#
DynamicVariables=1
OnChangeAction=[!WriteKeyValue Variables Sensitivity "[adjustVisualizerSensitivity]" "#SKINSPATH#\Monstercat-Visualizer\@Resources\variables.ini"][!RefreshGroup "Spectrum"]
MaxSensitivity = set at volume 0, kinda pointless MinSensitivity = as the volume goes up makes sensitivity never go below this value
I have decided to close this issue for now, because there is sadly no constant way to dynamically adjust the sensitivity via volume for now. If you want to use it for Spotify, use the code from @jacklul above.
I will reopen the issue if there will be an easier way to do this in the future.
It would be cool feature if the sensitivity could adjust itself depending on player's set volume.
Currently using this to achieve something similar with Spotify:
(This also disables visualizer when Spotify is not running - might also consider a feature like this?)
But it would be cool if user could specify 'min' and 'max' value and it would autoscale depending on volume!
And thanks for making this visualizer skin, it's awesome. 👍