Audio Visualizer System - Parts and GUI Elements

Hey!

I’ve released an open source Audio Visualizer system you can use for free in your games.
It works for parts and GUI elements. It functions in a module script and can be easily added in with full customization!

Find it here: Audio Visualizer - Roblox
GitHub Repository: GitHub - Audio Visualizer

Demo Video:

Features:

  • Visualization for Parts and GUI Elements
  • Fully Customizable Visualizer Properties Such as: Type, Direction, Size, Minimum and Maximum Size, Minimum Reaction Volume, Volume Sync, Randomness, Smoothness and more!

How to Use:

Once you’ve gotten the module script from the Roblox library in a game, put it somewhere into ReplicatedStorage and then you can require it in a server or client script and start using it. The full customization comes in with visualizer settings whenever you are making a visualizer, which are the key component, their usage is documented below with different options.

Visualizer Settings Documentation:

You need to include each of these settings with different values as a dictionary to pass it onto the module script so it can work. Some parts don’t work well. Setting values can be different to look good based on what type of instance you are updating its size. Recommended settings for parts are: Division = 25, Minimum = 0.001 and Maximum = 10. And for GUI elements taking up the whole screen are Division = 1000, Minimum = 0 and Maximum = 1.

Open

Type - The type of movement the visualizer will update to.
Values: Pillar1Side, Pillar2Sides, Pillar4Sides

Direction - The direction of the size updates.
Values: All, Top, Bottom, Left, Right

Size - Settings about the size updates. All values under are in a dictionary inside this element.
Values: Dictionary.

Type - The type of property to change for the visualizer if it’s a GUI element.
Values: Y.Scale, Y.Offset, X.Scale, X.Offset

SyncWithVolume - Syncs the size updates to the sound’s volume.
Values: true, false

ReactionVolumeMinimum - The minimum sound volume needed to cause a size update.
Values: 0 or any number

Divison - Divides the size update so it fits the maximum. Can be lower or higher than the maximum, it depends on the usage.
Values: 0 or any number

Minimum - The minimum number for the size update.
Values: 0 or any number

Maximum - The maximum number for the size update.
Values: 0 or any number

Multiplier - Multiplies the size update by a set amount.
Values: 1 or any number

Randomness - Settings for the randomness of the size update. The size update is multiplied by a random number generated from the values under. All are in a dictionary inside this element.
Values: Dictionary.

Minimum - The minimum random size the size update will follow.
Values: 0.5 or any number

Maximum - The maximum random size the size update will follow.
Values: 1.2 or any number

Smoothness - Makes the size update smoothly update. All values under are in a dictionary inside this element.
Values: Dictionary.

Enabled - Is smoothness enabled.
Values: true or false

Time - The time needed to update smoothly.
Values: 0.1 or any number

Note:

Visualizer types are now supported for GUI elements. Using a Pillar1Side or Pillar2Sides type has the same effect on size. Use the AnchorPoint property to adjust this as needed. Using Pillar4Sides or a direction of All has the same effect on size.

Sound Visualizer Module Script Documentation:

You have to call the “Update” function each time you want to update the size of a visualizer part.
You need to include 3 parameters which are Sound, Destination and VisualizerSettings.

Open

Sound - The sound instance the visualizer will update upon.
Destination - The place where the system will get each child from and update them. Can be a folder or model.
VisualizerSettings - Dictionary with the settings for how the sound updates will look. Read the documentation above for more info.

Example Local Script:

Open
local Workspace = game:GetService("Workspace")
local Sound = Workspace.Sound
local VisualizerParts = Workspace.VisualizerParts
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AudioVisualizer = require(ReplicatedStorage.AudioVisualizer)

local VisualizerSettings = {
	Type = "Pillar1Side",
	Direction = "Top",
	Size = {
		Type = "Y.Scale",
		SyncWithVolume = true,
		ReactionVolumeMinimum = 0,
		Division = 25,
		Minimum = 0.001,
		Maximum = 10,
		Multiplier = 1,
		Randomness = {
			Minimum = 0.5,
			Maximum = 1.2
		},
		Smoothness = {
			Enabled = true,
			Time =  0.1
		}
	}
}

RunService.Heartbeat:Connect(function()
	AudioVisualizer:Update(Sound, VisualizerParts, VisualizerSettings)
end)

Bug Reports and Suggestions Guide:

Leave any bug reports or suggestions as replies in this post.

31 Likes

Yep! I aimed for easy creation of visualizers.

1 Like


Um…
You ok there or is that just some sort of code?

Very cool!

It reminds me of something I had made in the past. Does it just use volume/ loudness values?

Thanks!
Yes, it does use the PlaybackLoudness property.

1 Like

New Update:

:tada: Visualizer types are now supported for GUI elements!

Make sure to read the note at the bottom of the visualizer settings documentation for more info on how to implement this feature properly.

1 Like

I’ve been looking for something like this for SOOO long. You are a life saver.

2 Likes