Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 462 Bytes

AudioSpectrum.md

File metadata and controls

22 lines (18 loc) · 462 Bytes

オーディオスペクトラム

オーディオスペクトラム

# include <Siv3D.hpp>

void Main()
{
	const Sound sound = Dialog::OpenSound();

	sound.play();

	while (System::Update())
	{
		const auto fft = FFT::Analyze(sound);

		for (auto i : step(320))
		{
			RectF(i * 2, Window::Height(), 2, -Pow(fft.buffer[i], 0.6) * 1000).draw(HSV(240 - i));
		}
	}
}