It is currently April 27th, 2024, 4:51 am

Visualiser Square Edge

Get help with creating, editing & fixing problems with skins
Blue Guy
Posts: 18
Joined: February 9th, 2019, 5:00 pm

Visualiser Square Edge

Post by Blue Guy »

My visualiser does THIS when it goes all the way to the top.

Any way to fix this?

Code for the file:

Code: Select all

[Rainmeter]
Update=(100 / 6)

@include=#@#variables.ini

[Metadata]
Name=music Player
Author=5onderling
Version=0.1
License=feel free to use

[Variables]
; --- for Visualizer --- ;
BarHeight=(#WORKAREAHEIGHT# * 0.#BarHeightPercent#)
BarGapCalc=(#BarGap# * 1)
BarWidthCalc=(#BarWidth# * 1)
BarCountCalc=(#BarCount# + 1)
VisualizerWidth=((#BarGapCalc# + #BarWidthCalc#) * #BarcountCalc# - #BarGapCalc#)
; --- for Progressbar --- ;
ProgressbarWidth=(#VisualizerWidth# - 108)


[Background]
Meter=Image
H=(#BarHeight# + 96)
W=#VisualizerWidth#

; ----------
; Visualizer
; ----------
; Measure AudioLevel - spectrum input
[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=#FFTSize#
FFTOverlap=#FFTOverlap#
FFTAttack=#FFTAttack#
FFTDecay=#FFTDecay#
Bands=#BarCountCalc#
FreqMin=40
FreqMax=18000
Sensitivity=#Sensitivity#

; Script Factory - generates the bars for the visualizer
[ScriptFactoryBars]
Measure=Script
ScriptFile=#@#scripts\Factory.lua
IncFile=#@#include\MeterBars.inc
Number=#BarCount#
SectionName=MeterBar%%
Option0=Meter
Value0=BAR
Option1=BarColor
Value1=#COLOR#
Option2=MeasureName
Value2=MeasureAudioSmoothed{%%+1}
Option3=X
Value3=#BarGapCalc#R
Option4=Y
Value4=0
Option5=W
Value5=#BarWidthCalc#
Option6=H
Value6=#BarHeight#
Option7=BarOrientation
Value7=Vertical
UpdateDivider=-1

[ScriptFactoryRoundedBarBottom]
Measure=Script
ScriptFile=#@#scripts\Factory.lua
IncFile=#@#include\MeterRoundedBarBottom.inc
Number=#BarCount#
SectionName=MeterRoundedBarBottom{%%+1}
Option0=Meter
Value0=Roundline
Option1=X
Value1=#BarGapCalc#R
Option2=Y
Value2=#BarHeight#-#BarWidthCalc#/2
Option3=W
Value3=#BarWidthCalc#
Option4=H
Value4=#BarWidthCalc#
Option5=StartAngle
Value5=0
Option6=RotationAngle
Value6=#BarWidthCalc#
Option7=LineLength
Value7=#BarWidthCalc#/2
Option8=LineColor
Value8=#Color#
Option9=Solid
Value9=1
Option10=AntiAlias
Value10=1
UpdateDivider=-1

[ScriptFactoryRoundedBarTop]
Measure=Script
ScriptFile=#@#scripts\Factory.lua
IncFile=#@#include\MeterRoundedBarTop.inc
Number=#BarCount#
SectionName=MeterRoundedBarTop{%%+1}
Option0=Meter
Value0=Roundline
Option1=X
Value1=#BarGapCalc#R
Option2=Y
Value2=#BarHeight#+#BarHeight#*-[MeasureAudioSmoothed{%%+1}]-#BarWidthCalc#/2
Option3=W
Value3=#BarWidthCalc#
Option4=H
Value4=#BarWidthCalc#
Option5=StartAngle
Value5=0
Option6=RotationAngle
Value6=#BarWidthCalc#
Option7=LineLength
Value7=#BarWidthCalc#/2
Option8=LineColor
Value8=#Color#
Option9=Solid
Value9=1
Option10=AntiAlias
Value10=1
Option11=DynamicVariables
Value11=1
UpdateDivider=-1

; Script Refresher - refreshes the code to apply the changes from the factory scripts
[ScriptRefresher]
Measure=Script
ScriptFile=#@#scripts\Refresher.lua
UpdateDivider=-1
Refreshed=0

; Include the BandMeasures with raw data
@include3=#@#include\BandMeasures.inc

; Include the BandMeasures with smoothed data
@include4=#@#include\BandMeasuresSmoothed.inc

; Include the band meters
@include5=#@#include\MeterBars.inc

[MeterAlignRoundedBarBottom]
Meter=String
X=0
Y=#BarHeight#-#BarWidthCalc#/2

; Include the roundline meters at the bottom
@include6=#@#include\MeterRoundedBarBottom.inc

[MeterAlignRoundedBarTop]
Meter=String
X=0
Y=#BarHeight#-#BarWidthCalc#/2

; Include the roundline meters at the top
@include7=#@#include\MeterRoundedBarTop.inc





; --- Background from Progressbar and Song Information --- ;
[Background2]
Meter=Image
Y=#BarHeight#
H=96
W=#VisualizerWidth#
; ------------
; Preogressbar
; ------------
[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#PlayerName#
PlayerPath=["#PlayerLocation#"]

[mPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=POSITION

[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=PROGRESS

[mDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=DURATION


[StyleTextProgress]
FontFace=#FONT#
FontSize=12
FontColor=#COLOR#
StringStyle=Bold
AntiAlias=1

[Position]
Meter=STRING
MeterStyle=StyleTextProgress
MeasureName=mPosition
X=(#VisualizerWidth# / 2 - (#ProgressbarWidth# / 2 + 6))
Y=30r
StringAlign=RightCenter

[Progress]
Meter=bar
MeasureName=mProgress
X=6r
Y=-2r
W=#ProgressbarWidth#
H=4
BarColor=#COLOR#
BarOrientation=Horizontal
SolidColor=255,255,255,64

[Duration]
Meter=String
MeterStyle=StyleTextProgress
MeasureName=mDuration
X=6R
Y=2r
StringAlign=LeftCenter


; --- link to start player --- ;
[Background3]
Meter=Image
H=48
W=(#VisualizerWidth# - 144)
Y=18r
SolidColor=#BGCOLOR#
LeftMouseDownAction=["#PlayerLocation#"]
; ------ --- -----
; Artist and Title
; ------ --- -----
[MeasureTitle]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=TITLE
UpdateDivider=10
Substitute="":"N/A"

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=ARTIST
UpdateDivider=10
Substitute="":"N/A"

[StyleTextInfo]
FontFace=#FONT#
FontSize=#FONTSIZE#
FontColor=#COLOR#
StringAlign=leftCenter
AntiAlias=1

[MeterArtist]
Meter=STRING
MeterStyle=StyleTextInfo
StringStyle=Bold
Y=24r
X=12r
MeasureName=MeasureArtist
Text="%1 -"

[MeterTrack]
Meter=STRING
MeterStyle=StyleTextInfo
StringStyle=Normal
Y=r
X=R
MeasureName=MeasureTitle
Text="%1"


; ------ --------
; Player Controls
; ------ --------
[mPlaying]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#PlayerName#
PlayerType=STATE
Substitute="0":"#@#img\play.png","1":"#@#img\pause.png","2":"#@#img\play.png"
RegExpSubstitute=1

[buttonStyle]
Padding=12,12,12,12
SolidColor=#BGCOLOR#

[Prev]
Meter=Image
MeterStyle=buttonStyle
ImageName=#@#img\prev.png
Y=-24r
X=(#VisualizerWidth# - 144)
LeftMousedownAction=!Execute [!RainmeterPluginBang "mPlayer Previous"]

[PlayPause]
Meter=Image
MeterStyle=buttonStyle
MeasureName=mPlaying
ImageName=[mPlaying]
H=24
W=24
Y=r
X=R
DynamicVariables=1
LeftMouseDownAction=[!CommandMeasure "mPlayer PlayPause"][!Update]

[Next]
Meter=Image
MeterStyle=buttonStyle
ImageName=#@#img\next.png
Y=r
X=R
LeftMousedownAction=!Execute [!RainmeterPluginBang "mPlayer Next"]
Attachment provided if just the code is not enough.

Thanks.

Edit: Made the picture an attachment cuz I have no idea how to make an image show up.
You do not have the required permissions to view the files attached to this post.
Last edited by Blue Guy on March 7th, 2019, 10:06 am, edited 1 time in total.
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

Re: Visualiser Square Edge

Post by rxtd »

Blue Guy wrote: March 6th, 2019, 12:12 pm
I believe that lines in your skin just go all the way up to the top bound of the skin window, and since nothing can be drawn outside of the skin, it is being cut.

Check if upper bound of lines is > 0.
Also, setting DynamicWindowSize option in the rainmeter section should help, but I feel like this is a hack instead of a solution.

Sorry, I'm too lazy to check if I'm right.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visualiser Square Edge

Post by balala »

Blue Guy wrote: March 6th, 2019, 12:12 pm My visualiser does THIS when it goes all the way to the top.
To be honest, that's a very annoying skin. It uses some lua scripts and rewrites the code of the skin, whenever you're changing anything into it. I'd like to know why anyone writes a such skin, which is extremely hard to be modified and it's not even written correctly, having the mentioned error (that sometimes the Bar meters go too up, practically going outside of the skins surface).
Anyway here is a first solution: first you have to make sure the code won't be rewritten if you refresh the skin. The easiest way to ensure you about this, is to remove the Scripts folder from the @Resources (obviously along with its content - 2 .lua files).
Now rewrite the Formula options of the [MeasureAudioSmoothed1] -[MeasureAudioSmoothed100] Calc measures, within the @Resources\include\BandMeasuresSmoothed.inc file: double the denominator on each of those formulas. For example, instead of the initial Formula of the [MeasureAudioSmoothed1] measure (Formula=(MeasureAudioRaw1+MeasureAudioRaw1+MeasureAudioRaw2)/12), use this: Formula=(MeasureAudioRaw1+MeasureAudioRaw1+MeasureAudioRaw2)/24. In the same way you have to double all those denominators.
If this doesn't fix the issue, you probably will have to contact the author of the skin, to get help from him.
Blue Guy
Posts: 18
Joined: February 9th, 2019, 5:00 pm

Re: Visualiser Square Edge

Post by Blue Guy »

I did that and it worked, but it doesn't look as good now.

Is there any way I can disable the visualizer entirely? I just wanted the player because it fit my theme but I have other visualizers already on my desktop.

Thanks for your help btw. :D
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visualiser Square Edge

Post by balala »

Blue Guy wrote: March 6th, 2019, 4:42 pm Is there any way I can disable the visualizer entirely? I just wanted the player because it fit my theme but I have other visualizers already on my desktop.
Yep, there is, however I don't recommend you to do this, because you'll get a lot of empty spaces on the skin and you'll have to rewrite almost the whole code. Instead I'd recommend you to look for another skin either on the Share Your Creations section of this forum, or on DeviantArt.com. You can find a lot of such skins, with no such issues.
But if you anyway want to try how this skin looks like with the visualizer disabled, just comment out (or remove) all the @Include options, except the first one (@include=#@#variables.ini, existing in the [Rainmeter] section). So, you have to comment out the @nclude options from @include3, to @nclude7.
Blue Guy
Posts: 18
Joined: February 9th, 2019, 5:00 pm

Re: Visualiser Square Edge

Post by Blue Guy »

Removing them hasn't really caused any problems yet so I'll keep it for now.

:thumbup: Thanks again!
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visualiser Square Edge

Post by balala »

Blue Guy wrote: March 6th, 2019, 5:00 pm Removing them hasn't really caused any problems yet so I'll keep it for now.
I'm glad, however I still have a few comments:
  • You probably should have to completely remove the Script measures related to the removed .lua files. for example remove the [ScriptFactoryBars], the [ScriptFactoryRoundedBarBottom], [ScriptFactoryRoundedBarTop] and the [ScriptRefresher] measures. If you leave them in the code, they will give you error messages, so get rid of them.
  • The !CommendMeasure bangs are used in a wrong format: these bangs require two parameters, but in the code you have only one, per !CommendMeasure bang. Practically you have two such parameters, but they are included into one single quotation, so they are behaving as one single parameter. Add one more quotation. For example the !CommandMeasure bang used into the LeftMouseDownAction option of the [PlayPause] meter is this: [!CommandMeasure "mPlayer PlayPause"], but as I said, there are missing some quotations. Add them: [!CommandMeasure "mPlayer" "PlayPause"]. Note that you probably have rewrite some deprecated !PluginBang bangs and those didn1t require the two pairs of quotations, but !CommendMeasure does. Besides, you've forgot to rewrite the !PluginBang bang used into the [Next] meter, leaving this: LeftMousedownAction=!Execute [!RainmeterPluginBang "mPlayer Next"]. This should have to be LeftMouseDownAction=[!CommendMeasure "mPlayer" "Next"]. As the !Execute bang is deprecated as well, I also removed that one too.
  • LeftMouseUpAction is usually preffered over LeftMouseDownAction. On the Note here, you can find out why.
Blue Guy
Posts: 18
Joined: February 9th, 2019, 5:00 pm

Re: Visualiser Square Edge

Post by Blue Guy »

O.O

Thanks for your help!
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Visualiser Square Edge

Post by balala »

Blue Guy wrote: March 6th, 2019, 6:49 pm Thanks for your help!
I'm glad if I did.