Spectral Visualizer

An asset by Bauxite
The page banner background of a mountain and forest
Spectral Visualizer thumbnail image
Spectral Visualizer thumbnail image
Spectral Visualizer image holder but it is empty

Quick Information

0 ratings
Spectral Visualizer icon image
Bauxite
Spectral Visualizer

This is a spectral visualizer that analyzes the frequencies of music and sound, written in Godot 3.1. The bar's length and intensity depend on the amplitude of its corresponding frequency.Important: this requires at least Godot 3.1 Alpha Mono edition. Older versions, such as Godot 3.0.x, will not work.Additionally, you need to install some packages using nuget before running the project. See the readme for more information on how to do this: https://github.com/Bauxitedev/spectral-visualizer/blob/master/README.md

Supported Engine Version
3.1
Version String
v1.0
License Version
MIT
Support Level
community
Modified Date
5 years ago
Git URL
Issue URL

Spectral Visualizer

This is a spectral visualizer that analyzes the frequencies of music and sound, written in Godot 3.1. The bar's length and intensity depend on the amplitude of its corresponding frequency.

README demo

Here's a video of it in action.

Running

Important: this requires Godot 3.1 Alpha Mono edition. Older versions, such as Godot 3.0.x, will not work.

Additionally, you need to install some packages using nuget. You can do this by installing nuget if not yet installed and then running the following command in a terminal in the root of the project folder:

nuget restore

Then you can just open the project and run it as usual.

How it works

The program uses the new Godot 3.1 API which enables you to get the raw byte array from an AudioStream, containing the entire audio file. The byte array is converted to an array of pairs of floats (since the sound is stereo) and then analyzed using MathNet's fourier transform functions. This is the main reason the program uses C# and not GDScript, since currently Godot does not expose any FFT functions to GDScript. Additionally, GDScript would probably be too slow.

Since Godot does not expose the position of the playback head of the stream, the program estimates the playback position by measuring the amount of time spent since the stream started and multiplying that by the sample rate. This works reasonably well, unless the playback is started/stopped regularly, which will cause the visualization to drift off in time compared to what you're seeing on the screen.

In the future I'd like this to work with an actual callback so you can get the stream of bytes in real-time, unfortunately this is not implemented in Godot yet. That would also enable visualization of audio captured in real time from e.g. a microphone.

Music

The song is a cut-up version of Meterorite, a song that appears on my album Meteorite Soundtrack.

License

The code is licensed MIT. The song is released under the CC BY-SA 4.0 license.

This is a spectral visualizer that analyzes the frequencies of music and sound, written in Godot 3.1. The bar's length and intensity depend on the amplitude of its corresponding frequency.

Important: this requires at least Godot 3.1 Alpha Mono edition. Older versions, such as Godot 3.0.x, will not work.

Additionally, you need to install some packages using nuget before running the project. See the readme for more information on how to do this: https://github.com/Bauxitedev/spectral-visualizer/blob/master/README.md

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Spectral Visualizer icon image
Bauxite
Spectral Visualizer

This is a spectral visualizer that analyzes the frequencies of music and sound, written in Godot 3.1. The bar's length and intensity depend on the amplitude of its corresponding frequency.Important: this requires at least Godot 3.1 Alpha Mono edition. Older versions, such as Godot 3.0.x, will not work.Additionally, you need to install some packages using nuget before running the project. See the readme for more information on how to do this: https://github.com/Bauxitedev/spectral-visualizer/blob/master/README.md

Supported Engine Version
3.1
Version String
v1.0
License Version
MIT
Support Level
community
Modified Date
5 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers