It is currently April 18th, 2024, 8:05 pm

Is it possible to rotate audiobars?

Get help with creating, editing & fixing problems with skins
User avatar
Owlbear
Posts: 17
Joined: June 29th, 2016, 11:59 pm

Re: Is it possible to rotate audiobars?

Post by Owlbear »

Mor3bane wrote:Why can't the angle be a variable as well?

Or does it change to sort of a random curve or something?
That exactly what it does.
Starting my applied Computer Science calsses in September :cheer: :D :cheer:
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Is it possible to rotate audiobars?

Post by Mor3bane »

Not that I can even concieve the math at that point, but I am fairly certain that there would be an equation for your desired layout.

:twisted:

Image
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible to rotate audiobars?

Post by balala »

If you still need some help, please post your code.
User avatar
Owlbear
Posts: 17
Joined: June 29th, 2016, 11:59 pm

Re: Is it possible to rotate audiobars?

Post by Owlbear »

After fiddeling around for about 2 weeks with the angles, I have come to the conclusion that I once agian need your help. The problem I have is that the individual bars wont fit to the curve, clip into each other and/or the distance to one another gets tucked up.
Bars fucked up.PNG
This is quite the bummer since I liked the color composition I had going with the skin and the desktop, if any of you could give me any advice on how to fix this issue that be great
Code.PNG
You do not have the required permissions to view the files attached to this post.
Starting my applied Computer Science calsses in September :cheer: :D :cheer:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible to rotate audiobars?

Post by balala »

That's not enough. I'd need the whole code, not just those two meters. Usually I don't like to use the TransformationMatrix with some numbers (as you have it in that pic), because in this case if I change anything, the values used in the TransformationMatrix will have to be recalculated. Better would be to create some mathematical expression, which might set the rotation, according to the size and position of the meter(s), but for this I'd need the whole code. So, please post it.
User avatar
Owlbear
Posts: 17
Joined: June 29th, 2016, 11:59 pm

Re: Is it possible to rotate audiobars?

Post by Owlbear »

Here you go.
You do not have the required permissions to view the files attached to this post.
Starting my applied Computer Science calsses in September :cheer: :D :cheer:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible to rotate audiobars?

Post by balala »

1. Despite it's not a problem, usually we like to have an empty line between each two consecutive sections in the code of a skin. Some of these are missing in your code (again: this won't make a skin to not work, but it's easier to look through the code if those empty lines are there).
Some other initial issues: replace the X option of each of the bar meters with x=#X#, except the option of [Metervis1], which will be eg X=10. Also replace the Y options with y=0r, except again the [Metervis1], which will be again Y=0.
2. I didn't understand what's the reason of the [TransformationMatrix] section. Replace it with this:

Code: Select all

[TransformationMatrix]
TransformationMatrix=(Cos(Rad(#Angle#)));(-Sin(Rad(#Angle#)));(Sin(Rad(#Angle#)));(Cos(Rad(#Angle#)));(#RotationCenterX#-#RotationCenterX#*Cos(Rad(#Angle#))-#RotationCenterY#*Sin(Rad(#Angle#)));(#RotationCenterY#+#RotationCenterX#*Sin(Rad(#Angle#))-#RotationCenterY#*Cos(Rad(#Angle#)))
3. This [TransformationMatrix] section uses three new variables: RotationCenterX and RotationCenterY are the coordinates of the rotation center and Angle is the rotation angle, in degrees. So add these variables to the [Variables] section (but be careful to not remove any of the existing variables):

Code: Select all

[Variables]
...
RotationCenterX=900
RotationCenterY=0
Angle=30
Note here that a positive rotation angle means anticlockwise rotation, while a negative one means clockwise rotation).
4. Remove the TransformationMatrix option from the [Metervis1] and [Metervis13] meters. We'll add and use these options otherwise.
5. Add the following option to each Bar meters: MeterStyle=TransformationMatrix
At this point you have to be careful, because depending on the rotation angle, some of the bars could go partially or totally outside of the skin. Maybe you'll have to adapt the size of the background (editing the W and H options of the [MeterBackround] meter), or will have to add the SkinWidth and SkinHeight options to the [Rainmeter] section.
User avatar
Owlbear
Posts: 17
Joined: June 29th, 2016, 11:59 pm

Re: Is it possible to rotate audiobars?

Post by Owlbear »

I once again need your help this time its pretty small problem, I gues....hope. So I took a new approache at my Audiobars and have finally finished the code first in 2 seperate docs ( one for the left side and one for the right).
Audiobars.PNG
Now I tried putting both sides into one doc but the right vanished as soon as I put both together.
Audiobars_1.0.rmskin
'
I would apreciate your help. :welcome:
You do not have the required permissions to view the files attached to this post.
Starting my applied Computer Science calsses in September :cheer: :D :cheer:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is it possible to rotate audiobars?

Post by balala »

Owlbear wrote:Now I tried putting both sides into one doc but the right vanished as soon as I put both together.
This is caused by the [TransformationMatrix2] section of the Audio Left+Right.ini. Its TransformationMatrix option is just partially copied.
This is what you have:

Code: Select all

[TransformationMatrix2]
TransformationMatrix=(Cos(Rad(#Angle2#)));(-Sin(Rad(#Angle2#)));(Sin(Rad(#Angle2#)));(Cos(Rad(#Angle2#)));(#RotationCenterX#-#RotationCenterX#*Cos(Rad(#Angle2#)
and this is what you should have:

Code: Select all

[TransformationMatrix2]
TransformationMatrix=(Cos(Rad(#Angle2#)));(-Sin(Rad(#Angle2#)));(Sin(Rad(#Angle2#)));(Cos(Rad(#Angle2#)));(#RotationCenterX#-#RotationCenterX#*Cos(Rad(#Angle2#))-#RotationCenterY#*Sin(Rad(#Angle2#)));(#RotationCenterY#+#RotationCenterX#*Sin(Rad(#Angle2#))-#RotationCenterY#*Cos(Rad(#Angle2#)))
See that, probably by a mistake, the last part of the option is missing.
Copy the option again and refresh the skin.
User avatar
Owlbear
Posts: 17
Joined: June 29th, 2016, 11:59 pm

Re: Is it possible to rotate audiobars?

Post by Owlbear »

Ohhh wow, now I feel really stupid :o . Thanks so much.
Just noticed that this skin swallows a wopping 40-45% of my CPU (got an Intel Core i5-3570 with 3,40 GHz), Is that normal?
Starting my applied Computer Science calsses in September :cheer: :D :cheer: