d-uzlov / Rainmeter-Plugins-by-rxtd

A set of plugins for Rainmeter
GNU General Public License v3.0
10 stars 1 forks source link

Amplify FFT bar values based on volume #9

Closed marcopixel closed 3 years ago

marcopixel commented 3 years ago

Hey, first off thank you for your awesome plugin! 👍 It's already creating promising results for me and i love the possibilities to properly adjust the output than just a few simple variables on AudioLevel :)

I have one question though:

Is it possible to amplify FFT bar values based on the volume? Like increasing the value on an exponential scale until it hits the maximum value. On the docs i've found out that there's a handler called ValueTransformer, which sounds like exactly what i'm searching for but i couldn't figure out on how to apply such function.

If you guys could help me out, that would be much appreciated. 🤗

sctanf commented 3 years ago

ValueTransformer is used to map the values from a source range to a target range.

Map[From <min> : <max>, to <min> : <max>] Type ValueTransformer | Source P0H4 | Transform dB Map[From -240 : -6] Clamp

Defining only the From map will map the values to a range of 0 : 1. Removing Clamp will make the target range unlimited, which can be useful in some cases. Changing the source range values should effectively change volume.

If you want to perform math on the values, I'm not sure how to do that with the plugin but I do post processing of the values in a lua script.

d-uzlov commented 3 years ago

marcopixel, did sctanf answer your question, or do you need something else?

marcopixel commented 3 years ago

Yeah, issue can be closed :)