Is there a way to reduce the CPU usage of this code? Its an excerpt from a skin I have that makes it look like a spinning vinyl. It has the outer vinyl and then a masked album cover in the middle. It appears that the mask method is very CPU intense because it has to keep doing the matrix calculations, so if I instead had two rotator meters, made the vinyl transparent where the album cover would go as opposed to the image meter maybe it'll improve? Or is there a smarter way I didn't think of to do it?

Code: Select all

```
[Rainmeter]
Update=20
[Variables]
[GetMusicPlayerStatus0]
Measure=Plugin
Plugin=NowPlaying
PlayerName=AIMP
PlayerType=STATUS
[GetMusicPlayerState0]
Measure=Plugin
Plugin=NowPlaying
PlayerName=AIMP
PlayerType=STATE
[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=AIMP
PlayerType=STATE
Substitute="0":"1","1":"0","2":"1"
[GetSongCover0]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[GetMusicPlayerState0]
PlayerType=Cover
UpdateDivider=10
[MeasureRotate]
Measure=Calc
Formula=(GetMusicPlayerState0 = 1 ? (MeasureRotate % 360) + 1 : MeasureRotate)
MaxValue=360
[MeasureSinAngle]
Measure=Calc
Formula=SIN(MeasureRotate/360*2*PI)
[MeasureNegSinAngle]
Measure=Calc
Formula=-(MeasureSinAngle)
[MeasureCosAngle]
Measure=Calc
Formula=COS(MeasureRotate/360*2*PI)
[MeasureTXCover]
Measure=Calc
Formula=#XS#-MeasureCosAngle*#XS#-MeasureSinAngle*#XY#
[MeasureTYCover]
Measure=Calc
Formula=#XY#-MeasureNegSinAngle*#XS#-MeasureCosAngle*#XY#
[VinylRotate]
Meter=Rotator
MeasureName=MeasureRotate
ImageName=vinyl_bg_edit5MidLarger.png
X=1600
Y=765
OffsetX=225
OffsetY=225
W=450
H=450
AntiAlias=1
DynamicVariables=1
[CoverRotate]
Meter=Image
MeasureName=GetSongCover0
MaskImageName=vinyl_mask_small_full.png
X=1733
Y=898
W=186
H=186
TransformationMatrix=[MeasureCosAngle]; [MeasureSinAngle]; [MeasureNegSinAngle]; [MeasureCosAngle]; [MeasureTYCover]; [MeasureTXCover]
AntiAlias=1
DynamicVariables=1
```