Giter Site home page Giter Site logo

Comments (10)

eclectic-tech avatar eclectic-tech commented on May 13, 2024 2

Hi MarcoPixel!

Been an admirer of your work and thought I would offer a TransformationMatrix to 'tilt' your visualizer. This general formula will work for a few degrees of positive tilt before clipping will occur. SkinWidth, SkinHeight, X & Y values would need to be adjusted to compensate for clipping, positioning, and negative rotation. ;/ Not perfect, or complete, but perhaps you can use it as a start.

[Rainmeter]
Group=Spectrum
Update=16

SkinHeight=((#BarCount#*(#BarWidth#+#BarGap#)*#ScaleVisualizer#)*1.25)
SkinWidth=((#BarCount#*(#BarWidth#+#BarGap#)*#ScaleVisualizer#)*1.5)
....
[Variables]
; Includes the variables/styles used for the skin.
@include=#@#variables.ini
; Include MeasureGenre and Chameleon for dynamic colors.
@include2=#@#include\Measure#MPMode#.inc
@include3=#@#include\MeasureStyling.inc
Rotation=5
...
[ScriptFactoryBars]
Measure=Script
ScriptFile=#@#scripts\Factory.lua
IncFile=#@#include\MeterBars.inc
Number=#BarCount#
SectionName=MeterBar%%
Option0=Meter
Value0=BAR
Option1=Group
Value1=GroupBarColor
Option2=MeasureName
Value2=MeasureAudioSmoothed{%%}
Option3=X
Value3=(#BarGap#*#ScaleVisualizer#)R
Option4=Y
Value4=(10*#ScaleVisualizer#+(#BarHeight#*2))
Option5=W
Value5=(#BarWidth#*#ScaleVisualizer#)
Option6=H
Value6=#BarHeight#
Option7=BarOrientation
Value7=Vertical
Option8=Flip
Value8=#FlipVisualizer#
Option9=TransformationMatrix
Value9=(Cos(Rad(#Rotation#)));(-Sin(Rad(#Rotation#)));(Sin(Rad(#Rotation#)));(Cos(Rad(#Rotation#)));(#CURRENTSECTION#:X-#CURRENTSECTION#:X*Cos(Rad(#Rotation#))-#CURRENTSECTION#:Y*Sin(Rad(#Rotation#)));(#CURRENTSECTION#:Y+#CURRENTSECTION#:X*Sin(Rad(#Rotation#))-#CURRENTSECTION#:Y*Cos(Rad(#Rotation#))
UpdateDivider=-1

I am not a math wiz, and only draw on the wisdom of others, and time.
Hope this help in some small way.

from monstercat-visualizer.

marcopixel avatar marcopixel commented on May 13, 2024

If anyone got some tips or tricks to do this, please write them here or send a pull request.

from monstercat-visualizer.

tjhrulz avatar tjhrulz commented on May 13, 2024

Well I was gonna just suggest just setting the bar orientation option to horizontal but I see that doesn't quite produce the effects the user wanted. With a bit of tweaking you could probably get that to work using that option.

The other more fun (aka hard) option would be to try to use a transformation matrix, but I am not sure that bar meters support that.

from monstercat-visualizer.

tjhrulz avatar tjhrulz commented on May 13, 2024

After some testing if they were to change ScriptFactoryBars to the code below it should work, even keeps intact the flip variable so it can work in either direction still. Probably the easiest way would be maybe have a ScriptFactoryBars and a ScriptFactoryBars90 that enable or disable themselves based on an orientation variable.

If this is implemented should similar changes be made to song information to support it being vertical?

[ScriptFactoryBars]
Measure=Script
ScriptFile=#@#scripts\Factory.lua
IncFile=#@#include\MeterBars.inc
Number=#BarCount#
SectionName=MeterBar%%
Option0=Meter
Value0=BAR
Option1=Group
Value1=GroupBarColor
Option2=MeasureName
Value2=MeasureAudioSmoothed{%%}
Option3=X
Value3=0
Option4=Y
Value4=(#BarGap#*#ScaleVisualizer#)R
Option5=W
Value5=#BarHeight#
Option6=H
Value6=(#BarWidth#*#ScaleVisualizer#)
Option7=BarOrientation
Value7=Horizontal
Option8=Flip
Value8=#FlipVisualizer#
UpdateDivider=-1

from monstercat-visualizer.

tjhrulz avatar tjhrulz commented on May 13, 2024

Just realized that if this is added would you also want to base the visualizer scale to be based on screen height instead of width. Not a big deal if it is not though as the scale as separate now.

from monstercat-visualizer.

marcopixel avatar marcopixel commented on May 13, 2024

Hey @eclectic-tech, thanks for your post!

I have also tried it myself with a similar approach and i also never got it fully working. It seems that to get it working propertly i have to offset the bars but i don't know where to get the values for it. So i'm pretty much stuck for now. I also tried to get some insight by looking at the Fountain of Colors skin but i didn't get that much out of it.

I've still trying to get it work tho, so hang tight.

from monstercat-visualizer.

eclectic-tech avatar eclectic-tech commented on May 13, 2024

Yes, getting the initial positioning for bar 0 is key, and I am not sure how to calculate that either.

I have successfully modified the factory script to let me write multiple sets of meters; first script writes a new file, and the rest append to it. I did this to write rings, dots, and bars/circles in my visualizer using multiple factory measures.

I also modified it to let me use an alternate single line of the first meter; I use that to position bar 0.
You might find it useful... so it is attached (I am a novice lua coder, so you may be able to improve it).

My skin issue is writing a script to automatically generate gradient colors for a varying number of bars... it's no problem with a set number, but no success yet for a user selected number... :(

Factory.zip

from monstercat-visualizer.

marcopixel avatar marcopixel commented on May 13, 2024

Added to master branch with commit ec91a9d

from monstercat-visualizer.

alatsombath avatar alatsombath commented on May 13, 2024

Hi MarcoPixel, sorry for the late reply, congrats on the new release! It is working and looks great as the intended.

If necessary I did prepare edits that does not include Initialize skin or Rotate.lua, if it is a more familiar skin structure (but is also the older version)

To preserve users old settings, I also recommend saving #@#Variables in the skin installer (though default variables that you changed will not update)

(To implement there is also the new Shape meter with a Skew feature, but I did not read how it works yet)

from monstercat-visualizer.

marcopixel avatar marcopixel commented on May 13, 2024

Hi @alatsombath, thanks for your reply :)

Thanks for your feedback and I really love your skins, they are quite something different. So far I have used the code base from the 3.6.11 version of your skin and so far it working fine so I think I will keep it that way.

I also thought about preserving the #@#variables file via the built-in installer but I also did some heavy reworks in the last few updates and at that time I thought it was an bad idea. But now I think the current settings are final so far, so I think I will implement that in the next release.

For the Shape meter I also haven't read too much of the documentation, but it seems to be quite flexible with special shapes. This might be more interesting for my Lano Visualizer and your skins, as the Monstercat one is strictly set to keep the original video looks.

Many thanks for your help 👍

from monstercat-visualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.