Welcome to my Spectrum Visualizer! You will see 2 bar spectrums, and a circle spectrum. You can use this for any game or project you like but remember to credit me! There is a red circle outline which means the radius of the spectrum circle so you can put an image that size in! Just click the green flag to start! Please comment anything that is helpful, or just your opinions.
Here are my python scripts used for accuracy: Be sure you have numpy, pydub, and ffmpeg installed. RecordSound.py (syntax is python RecordSound.py [audiofile]): from pydub import AudioSegment import sys import math def calculate_loudness(segment): samples = segment.get_array_of_samples() if len(samples) == 0: return -float('0') rms = math.sqrt(sum(s * s for s in samples) / len(samples)) if rms == 0: return -float('inf') return 20 * math.log10(rms / (2 ** 15)) audio = AudioSegment.from_file(sys.argv[1]) chunk_length_ms = 10 # 10 ms = 0.01s with open("loudness_output.txt", "w") as f: for i in range(0, len(audio), chunk_length_ms): chunk = audio[i:i + chunk_length_ms] loudness = calculate_loudness(chunk) loudness_shifted = loudness + 50 if loudness_shifted < 0: loudness_shifted = 0 # Clamp to 0 if negative beat_drop = 10 if loudness > -35 else 0 output_value = loudness_shifted + beat_drop f.write(f"{output_value:.2f}\n")