Page 1 of 3

Is it possible to rotate audiobars?

Posted: June 30th, 2016, 12:16 am
by Owlbear
Iam fairly new to Rainmeter and wondered if it is possible to rotate Audiolevelbars to fit a certain angle. It would not be a problem if I had to do it for everysingle one individually. Thanks for the help in advance :welcome:

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 12:07 pm
by balala
Owlbear wrote:Iam fairly new to Rainmeter and wondered if it is possible to rotate Audiolevelbars to fit a certain angle. It would not be a problem if I had to do it for everysingle one individually. Thanks for the help in advance :welcome:
Surely it is. You'll have to use the TransformationMatrix option on, as you said, each bar meter. Here you can find an extremely good description of how this option works. For rotations, read especially the Transformations and the What the heck is Rainmeter doing?! sections. But applying it, is not easy. If you can't figure out how to do it, for further help, please post your code.

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 12:45 pm
by Owlbear
gonna get right at it. :D Thanks for the reply.

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 1:10 pm
by jsmorley
Owlbear wrote:gonna get right at it. :D Thanks for the reply.
I like to keep this handy when working with TransformationMatrix... ;-)

Image

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 2:08 pm
by balala
jsmorley wrote:I like to keep this handy when working with TransformationMatrix... ;-)

Image
You don't have to. TransformationMatrix is a very powerful tool:

Code: Select all

[Rainmeter]
update=50
BackgroundMode=2
SolidColor=0,0,0,120
SkinWidth=305
SkinHeight=365

[Variables]
Angle=-45

[BarStyle]
W=20
H=200
BarColor=213,182,31
BarOrientation=Vertical
DynamicVariables=1
Group=Bars
TransformationMatrix=(Cos(Rad(#Angle#)));(-Sin(Rad(#Angle#)));(Sin(Rad(#Angle#)));(Cos(Rad(#Angle#)));(-200*Sin(Rad(#Angle#)));(200-200*Cos(Rad(#Angle#)))

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=1024
FFTAttack=15
FFTDecay=250
Bands=10

[MeasureBand0]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=0
Group=AudioLevel

[MeasureBand1]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=1
Group=AudioLevel

[MeasureBand2]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=2
Group=AudioLevel

[MeasureBand3]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=3
Group=AudioLevel

[MeasureBand4]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=4
Group=AudioLevel

[MeasureBand5]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=5
Group=AudioLevel

[MeasureBand6]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=6
Group=AudioLevel

[MeasureBand7]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=7
Group=AudioLevel

[MeasureBand8]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=8
Group=AudioLevel

[MeasureBand9]
Measure=Plugin
Plugin=AudioLevel
Parent=MeasureAudio
Type=Band
BandIdx=9
Group=AudioLevel

[MeterBand0]
Meter=Bar
MeasureName=MeasureBand0
MeterStyle=BarStyle
X=0
Y=0
DynamicVariables=1
Group=Playing

[MeterBand1]
Meter=Bar
MeasureName=MeasureBand1
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand2]
Meter=Bar
MeasureName=MeasureBand2
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand3]
Meter=Bar
MeasureName=MeasureBand3
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand4]
Meter=Bar
MeasureName=MeasureBand4
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand5]
Meter=Bar
MeasureName=MeasureBand5
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand6]
Meter=Bar
MeasureName=MeasureBand6
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand7]
Meter=Bar
MeasureName=MeasureBand7
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand8]
Meter=Bar
MeasureName=MeasureBand8
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing

[MeterBand9]
Meter=Bar
MeasureName=MeasureBand9
MeterStyle=BarStyle
X=3R
Y=0r
Group=Playing
Angle is the rotation angle, in degrees. It must be negative if you want to rotate the bars clockwise and positive if you want to rotate them anticlockwise.

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 3:38 pm
by balala
And another example of how the TransformationMatrix can be used:
https://forum.rainmeter.net/viewtopic.php?p=125361#p125361

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 9:30 pm
by Owlbear
I would not go as far as suicide but ripping out eyebrows is appropriate in this case fitting each audio bar to the the specific angle is a pain in the butt,especially since I have slimed each one down but doubled them. :headbang:

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 9:43 pm
by Mor3bane
Owlbear wrote:I would not go as far as suicide but ripping out eyebrows is appropriate in this case fitting each audio bar to the the specific angle is a pain in the butt,especially since I have slimed each one down but doubled them. :headbang:
copy/paste is your friend once the angle is decided - the math get easier - from what I've seen, at that point it is mostly straight-forward addition by simply adding the desired width of the bars, the gaps between them, and their relative position along the angle.
:thumbup:

Re: Is it possible to rotate audiobars?

Posted: June 30th, 2016, 9:50 pm
by Owlbear
Mor3bane wrote:copy/paste is your friend once the angle is decided - the math get easier - from what I've seen, at that point it is mostly straight-forward addition by simply adding the desired width of the bars, the gaps between them, and their relative position along the angle.
:thumbup:
I got the width, hight and gaps coverd with variables, but I gotta do the angle for every bar individually that is what ´s going to take a long long time

Re: Is it possible to rotate audiobars?

Posted: July 1st, 2016, 9:13 am
by Mor3bane
Owlbear wrote:I got the width, hight and gaps coverd with variables, but I gotta do the angle for every bar individually that is what ´s going to take a long long time
Why can't the angle be a variable as well?

Or does it change to sort of a random curve or something?