Music bar visualizer [customizable]

I would love some feedback on this visualizer I recently made.
I’m not sure if I will make this a free to use model yet but I’m thinking about it.

here is a little preview on it

here when its a bit louder than usual

1 Like

here is how i made the color change on louder volumes

there is a threshold for each color so for example
threshold_red or threshold_orange but threshold_white dosnt exist it just reverses to its original color
which you can see at line 43 till 46*

1 Like

-- looks good! just some suggestions:

-- use ipairs in the for loop instead of pairs, it’s better for lists like the one returned by :GetChildren() while pairs is more for dictionaries
-- consider making the tween targets and the TweenInfo values constants--since you’re reusing them for every bar every frame, it makes more sense to just define them at the start of your script rather than constantly be redefining them
-- since this is running every frame, maybe consider using Lerp for the colors as well, since creating and playing a new Tween every frame is defeating the purpose of Tweens
-- 1-(.01)^dt is a pretty strange value for your Lerp time, something like dt * 10 will work just as well and is much less expensive. it would also be better to make it a variable outside of the for loop--it’s always going to be the same value for every bar, so why redo the math for each one when you only need to do it once
-- math.random(0,100)/100 can be simplified to math.random(), which creates a random decimal value between 0 and 1

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.