Does anyone have any suggestions for what tools to...
# of-graphics
c
Does anyone have any suggestions for what tools to use to build a music visualizer? Preferably something with great performance (e.g. not HTML5 Canvas) and I'm open to learning a new language but ideally I don't have to invent a new system.
i
Well, what are your deploy targets? Do you want something that runs on the web? Do you want to make an app — for which platform?
💯 1
Also, what sort of aesthetic? If you want polygons as part of your off-the-shelf system, that'll force your hand a bit.
c
Goal is purely for fun, though it would be nice to be able to present it somehow. Polygons sound like good abstractions but I'd also like to be able to draw at the pixel-level.
I'm imagining a program where you get an audio buffer in, you can do some FFT / wavelet / correlation math stuff and use that in your visualizer.
j
There are loads of good tools for this. What programming languages/ecosystems are your favorites?
c
Here's a quick video of something I've worked on; but not for a while - I've been concentrating on music not visuals:

https://youtu.be/bVkyWMayq_c

My approach: • An SDL/OpenGL graphics application written in C++ • I read audio buffers from microphone or other and perform FFT. • The FFT is sent to the GPU as a texture. • Shaders interpret it and use it to update the image. • There is also a crude filtering of the FFT into a Float4 which is sent to the vertex shader for manipulating geometry.
I recently ported my FFT code to Sonic Pi - you can get it here: https://github.com/sonic-pi-net/sonic-pi/blob/main/app/gui/qt/visualizer/scope.cpp It does the right thing to convert an audio buffer into FFT bins. It draws the spectrum analyzer.
c
@Jack Rusher I'm open to learning something new. My experience is mostly with JavaScript, Python, and Octave. @Chris Maughan that looks pretty similar to what I'm thinking! How did you set that up?
c
Hi @Chet Corcos- which part? 🙂
c
I guess, do you have any code you can share to get me started? I have no real-world experience writing C 😭
Or if there's a tutorial you'd recommend, that would be great.
c
OK. It depends how you want to go at it. Learning C is a big task, but there are plenty of web tutorials, Code Academy, etc. that can get you started. Regarding Audio, I just pulled things together as I went along. My Audio/Visual stuff isn't OS yet, just because I want to get it into a decent state first. I think it would be too much to take in all at once though. SDL is a good starting point as a library that can get things on screen. I did a starter sample here, but I suspect you'll need a bit more background knowledge to make good use of it: https://github.com/cmaughan/starter-imgui-qt
There are many other starter kits.
Lots of projects/examples here ^
j
That Awesome Audio Visualization link looks like a great resource! If you decide to stick with Python, https://github.com/librosa/librosa is really good for the audio analysis portion, but I don't know what the best drawing library might be.
c
Thanks for the resources! 🙂
n
Magenta Studio is interesting
And in Python and JS
c
If you want to learn some GLSL while also having access to FFT analysis, I would just go with Shadertoy or, for a non-web environment, something like KodeLife or VEDA.
n
openFrameworks is C++, huge collection of libraries and can pretty straightforwardly use GLSL shaders
Unity actually has some fairly powerful procedural tools, and I enjoy C# as a language, but some of the specific approaches you'd want to take for generative art might not be well documented